controller¶
- class jiminy_py.core.AbstractController¶
Bases:
Boost.Python.instance
Raises an exception This class cannot be instantiated from Python
- get_options((AbstractController)arg1) dict : ¶
Get the configuration options of the controller.
- Returns
Dictionary with the parameters of the controller
- initialize((AbstractController)self, (Robot)robot) hresult_t : ¶
Set the parameters of the controller.
- Parameters
robot –
Robot
- return
Return code to determine whether the execution of the method was successful.
- property is_initialized¶
- register_variable((AbstractController)self, (str)fieldname, (object)value) hresult_t : ¶
Dynamically registered a Eigen Vector to the telemetry.
Internally, all it does is to store a reference to the variable, then it logs its value periodically. There is no update mechanism what so ever nor safety check. So the user has to take care of the life span of the variable, and to update it manually whenever it is necessary to do so.
- Parameters
fieldnames – Name of each element of the variable. It will appear in the header of the log.
values –
Eigen vector to add to the telemetry. It accepts non-contiguous temporary.
- return
Return code to determine whether the execution of the method was successful.
- remove_entries((AbstractController)arg1) None : ¶
Remove all variables dynamically registered to the telemetry.
Note that one must reset Jiminy Engine for this to take effect.
- reset((AbstractController)self[, (bool)reset_dynamic_telemetry=False]) hresult_t : ¶
Reset the internal state of the controller.
Note that it resets the configuration of the telemetry.
Note
This method is not intended to be called manually. The Engine is taking care of it when its own reset method is called.
- Parameters
resetDynamicTelemetry – Whether or not variables dynamically registered to the telemetry must be removed. Optional: False by default
- property robot¶
- property sensors_data¶
- set_options((AbstractController)arg1, (dict)arg2) None : ¶
Set the configuration options of the controller.
Note that one must reset Jiminy Engine for this to take effect.
- Parameters
ctrlOptions –
Dictionary with the parameters of the controller
- return
Return code to determine whether the execution of the method was successful.
- class jiminy_py.core.BaseController((object)arg1) None ¶
Bases:
jiminy_py.core.AbstractController
- compute_command((BaseController)self, (float)t, (object)q, (object)v, (object)command) hresult_t : ¶
Compute the command.
It assumes that the robot internal state (including sensors) is consistent with other input arguments. It fetches the sensor data automatically.
- param t
Current time
- param q
Current configuration vector
- param v
Current velocity vector
- param command
Output effort vector
- return
Return code to determine whether the execution of the method was successful.
compute_command( (BaseController)arg1, (float)arg2, (object)arg3, (object)arg4, (object)arg5) -> None
- internal_dynamics((BaseController)self, (float)t, (object)q, (object)v, (object)u_custom) hresult_t : ¶
- Emulate internal dynamics of the system at are not included in the
physics engine.
- param t
Current time
- param q
Current configuration vector
- param v
Current velocity vector
- param uCustom
Output effort vector
- return
Return code to determine whether the execution of the method was successful.
Internal dynamics of the robot.
Overload this method to implement a custom internal dynamics for the robot.
Warning
It is likely to result in an overhead of about 100% of the simulation, which is not often not acceptable in production, but still useful for prototyping. One way to solve this issue would be to compile it using CPython.
Note
This method is time-continuous as it is designed to implement physical laws.