engine

class jiminy_py.core.system

Bases: Boost.Python.instance

Raises an exception This class cannot be instantiated from Python

property callbackFct
property controller
property name
property robot
class jiminy_py.core.EngineMultiRobot((object)arg1) None

Bases: Boost.Python.instance

add_system((EngineMultiRobot)self, (str)system_name, (Robot)robot) hresult_t

add_system( (EngineMultiRobot)self, (str)system_name, (Robot)robot, (AbstractController)controller) -> hresult_t

add_system( (EngineMultiRobot)self, (str)system_name, (Robot)robot, (AbstractController)controller, (object)callback_function) -> hresult_t

static compute_forward_kinematics((system)system, (object)q, (object)v, (object)a) None
compute_systems_dynamics((EngineMultiRobot)self, (float)t_end, (object)q_list, (object)v_list) object
property forces_coupling
property forces_impulse
property forces_profile
get_log((EngineMultiRobot)arg1) tuple
get_options((EngineMultiRobot)arg1) dict
get_system((EngineMultiRobot)self, (str)system_name) system
get_system_state((EngineMultiRobot)self, (str)system_name) SystemState
property is_simulation_running
static read_log_binary((str)filename) tuple
register_force_coupling((EngineMultiRobot)self, (str)system_name_1, (str)system_name_2, (str)frame_name_1, (str)frame_name_2, (object)force_function) hresult_t :

Add a force linking both systems together

This function registers a callback function forceFct that links both systems by a given force. This function must return the force that the second systems applies to the first system, in the global frame of the first frame (i.e. expressed at the origin of the first frame, in word coordinates).

Parameters
  • systemName1 – Name of the first system (the one receiving the force)

  • systemName2 – Name of the second system (the one applying the force)

  • frameName1 – Frame on the first system where the force is applied.

  • frameName2 – Frame on the second system where (the opposite of) the force is applied.

  • forceFct – Callback function returning the force that systemName2 applies on systemName1, in the global frame of frameName1.

register_force_impulse((EngineMultiRobot)self, (str)system_name, (str)frame_name, (float)t, (float)dt, (object)F) None :

Apply an impulse force on a frame for a given duration at the desired time. The force must be given in the world frame.

register_force_profile((EngineMultiRobot)self, (str)system_name, (str)frame_name, (object)force_function[, (float)update_period=0.0]) None
register_viscoelastic_directional_force_coupling((EngineMultiRobot)self, (str)system_name_1, (str)system_name_2, (str)frame_name_1, (str)frame_name_2, (float)stiffness, (float)damping) hresult_t

register_viscoelastic_directional_force_coupling( (EngineMultiRobot)self, (str)system_name, (str)frame_name_1, (str)frame_name_2, (float)stiffness, (float)damping) -> hresult_t

register_viscoelastic_force_coupling((EngineMultiRobot)self, (str)system_name_1, (str)system_name_2, (str)frame_name_1, (str)frame_name_2, (object)stiffness, (object)damping) hresult_t

register_viscoelastic_force_coupling( (EngineMultiRobot)self, (str)system_name, (str)frame_name_1, (str)frame_name_2, (object)stiffness, (object)damping) -> hresult_t

remove_all_forces((EngineMultiRobot)arg1) hresult_t
remove_forces_coupling((EngineMultiRobot)self, (str)system_name_1, (str)system_name_2) hresult_t

remove_forces_coupling( (EngineMultiRobot)self [, (str)system_name]) -> hresult_t

remove_forces_impulse((EngineMultiRobot)self[, (str)system_name]) hresult_t
remove_forces_profile((EngineMultiRobot)self[, (str)system_name]) hresult_t
remove_system((EngineMultiRobot)self, (str)system_name) hresult_t
reset((EngineMultiRobot)self[, (bool)reset_random_generator=False[, (bool)remove_all_forces=False]]) None
set_controller((EngineMultiRobot)self, (str)system_name, (AbstractController)controller) hresult_t
set_options((EngineMultiRobot)arg1, (dict)arg2) hresult_t
simulate((EngineMultiRobot)self, (float)t_end, (object)q_init_list, (object)v_init_list[, (object)a_init_list=None]) hresult_t :

Run a simulation of duration tEnd, starting at xInit.

Parameters
  • tEnd – End time, i.e. amount of time to simulate.

  • qInit – Initial configuration of every system, i.e. at t=0.0.

  • vInit – Initial velocity of every system, i.e. at t=0.0.

  • aInit – Initial acceleration of every system, i.e. at t=0.0. Optional: Zero by default.

property simulation_duration_max
start((EngineMultiRobot)self, (object)q_init_list, (object)v_init_list[, (object)a_init_list=None]) hresult_t :

Reset the engine and compute initial state.

This function does NOT reset the engine, robot and controller. It is up to the user to do so, by calling reset method first.

Parameters
  • qInit – Initial configuration of every system.

  • vInit – Initial velocity of every system.

  • aInit – Initial acceleration of every system. Optional: Zero by default.

step((EngineMultiRobot)self[, (float)dt_desired=-1]) hresult_t :

Integrate system from current state for a duration equal to stepSize

This function performs a single ‘integration step’, in the sense that only the endpoint is added to the log. The integrator object is allowed to perform multiple steps inside of this interval. One may specify a negative timestep to use the default update value.

Parameters

stepSize – Duration for which to integrate ; set to negative value to use default update value.

property stepper_state
stop((EngineMultiRobot)self) None :

Stop the simulation.

It releases the lock on the robot and the telemetry, so that it is possible again to update the robot (for example to update the options, add or remove sensors…) and to register new variables or forces.

property systems
property systems_names
write_log((EngineMultiRobot)self, (str)filename[, (str)format='hdf5']) hresult_t
class jiminy_py.core.StepperState

Bases: Boost.Python.instance

Raises an exception This class cannot be instantiated from Python

property a
property dt
property iter
property iter_failed
property q
property t
property v
class jiminy_py.core.SystemState

Bases: Boost.Python.instance

Raises an exception This class cannot be instantiated from Python

property a
property command
property f_external
property q
property u
property u_custom
property u_internal
property u_motor
property v
class jiminy_py.core.Engine((object)arg1) None

Bases: jiminy_py.core.EngineMultiRobot

add_system()

object add_system(tuple args, dict kwds)

property controller
property forces_impulse
property forces_profile
initialize((Engine)self, (Robot)robot[, (AbstractController)controller=None[, (object)callback_function=None]]) hresult_t
property is_initialized
register_force_coupling((Engine)self, (str)frame_name_1, (str)frame_name_2, (object)force_function) hresult_t
register_force_impulse((Engine)self, (str)frame_name, (float)t, (float)dt, (object)F) None
register_force_profile((Engine)self, (str)frame_name, (object)force_function[, (float)update_period=0.0]) None
register_viscoelastic_directional_force_coupling((Engine)self, (str)frame_name_1, (str)frame_name_2, (float)stiffness, (float)damping) hresult_t
register_viscoelastic_force_coupling((Engine)self, (str)frame_name_1, (str)frame_name_2, (object)stiffness, (object)damping) hresult_t
remove_system((Engine)self, (str)system_name) hresult_t
property robot
set_controller((Engine)self, (AbstractController)controller) hresult_t
simulate((Engine)self, (float)t_end, (object)q_init, (object)v_init[, (object)a_init=None[, (bool)is_state_theoretical=False]]) hresult_t
start((Engine)self, (object)q_init, (object)v_init[, (object)a_init=None[, (bool)is_state_theoretical=False]]) hresult_t
property stepper_state
property system
property system_state