engine¶
- class jiminy_py.core.ProfileForce¶
Bases:
instance
Raises an exception This class cannot be instantiated from Python
- property force¶
fget( (jiminy_py.core.core.ProfileForce)self) -> pinocchio.pinocchio_pywrap.Force
- property frame_index¶
fget( (jiminy_py.core.core.ProfileForce)self) -> int
- property frame_name¶
fget( (jiminy_py.core.core.ProfileForce)self) -> str
- property func¶
fget( (jiminy_py.core.core.ProfileForce)self) -> object
- property update_period¶
fget( (jiminy_py.core.core.ProfileForce)self) -> float
- class jiminy_py.core.ImpulseForce¶
Bases:
instance
Raises an exception This class cannot be instantiated from Python
- property dt¶
fget( (jiminy_py.core.core.ImpulseForce)self) -> float
- property force¶
fget( (jiminy_py.core.core.ImpulseForce)self) -> pinocchio.pinocchio_pywrap.Force
- property frame_index¶
fget( (jiminy_py.core.core.ImpulseForce)self) -> int
- property frame_name¶
fget( (jiminy_py.core.core.ImpulseForce)self) -> str
- property t¶
fget( (jiminy_py.core.core.ImpulseForce)self) -> float
- class jiminy_py.core.CouplingForce¶
Bases:
instance
Raises an exception This class cannot be instantiated from Python
- property func¶
fget( (jiminy_py.core.core.CouplingForce)self) -> object
- property robot_index_1¶
fget( (jiminy_py.core.core.CouplingForce)self) -> int
- property robot_index_2¶
fget( (jiminy_py.core.core.CouplingForce)self) -> int
- property robot_name_1¶
fget( (jiminy_py.core.core.CouplingForce)self) -> str
- property robot_name_2¶
fget( (jiminy_py.core.core.CouplingForce)self) -> str
- class jiminy_py.core.Engine((object)arg1)¶
Bases:
instance
- static compute_forward_kinematics((Robot)robot, (numpy.ndarray)q, (numpy.ndarray)v, (numpy.ndarray)a) None ¶
- property coupling_forces¶
fget( (jiminy_py.core.core.Engine)self) -> jiminy_py.core.core.CouplingForceVector
- get_robot_state((Engine)self, (str)robot_name) RobotState ¶
- get_simulation_options((Engine)arg1) dict : ¶
Get the options of the engine and all the robots.
The key ‘engine’ maps to the engine options, whereas robot.name maps to the individual options of each robot for multi-robot simulations, ‘robot’ for single-robot simulations.
- property impulse_forces¶
fget( (jiminy_py.core.core.Engine)self) -> dict
- property is_simulation_running¶
fget( (jiminy_py.core.core.Engine)self) -> bool
- property log_data¶
fget( (jiminy_py.core.core.Engine)self) -> dict
- property profile_forces¶
fget( (jiminy_py.core.core.Engine)self) -> dict
- static read_log((str)fullpath[, (object)format=None]) dict : ¶
Read a logfile from jiminy.
Note
This function supports both binary and hdf5 log.
- Parameters:
fullpath – Name of the file to load.
format – Name of the file to load.
- Returns:
Dictionary containing the logged constants and variables.
- register_coupling_force((Engine)self, (str)robot_name_1, (str)robot_name_2, (str)frame_name_1, (str)frame_name_2, (object)force_func) None : ¶
Add a force linking both robots together.
This function registers a callback function that links both robots by a given force. This function must return the force that the second robots applies to the first robot, in the global frame of the first frame, i.e. expressed at the origin of the first frame, in word coordinates.
- Parameters:
robotName1 – Name of the robot receiving the force.
robotName2 – Name of the robot applying the force.
frameName1 – Frame on the first robot where the force is applied.
frameName2 – Frame on the second robot where the opposite force is applied.
forceFunc – Callback function returning the force that robotName2 applies on robotName1, in the global frame of frameName1.
- register_impulse_force((Engine)self, (str)robot_name, (str)frame_name, (float)t, (float)dt, (numpy.ndarray)force) None : ¶
Apply an impulse force on a frame for a given duration at the desired time.
Warning
The force must be given in the world frame.
- register_profile_force((Engine)self, (str)robot_name, (str)frame_name, (object)force_func[, (float)update_period=0.0]) None ¶
- register_viscoelastic_coupling_force((Engine)self, (str)robot_name_1, (str)robot_name_2, (str)frame_name_1, (str)frame_name_2, (numpy.ndarray)stiffness, (numpy.ndarray)damping[, (float)alpha=0.5]) None ¶
register_viscoelastic_coupling_force( (Engine)self, (str)robot_name, (str)frame_name_1, (str)frame_name_2, (numpy.ndarray)stiffness, (numpy.ndarray)damping [, (float)alpha=0.5]) -> None
- register_viscoelastic_directional_coupling_force((Engine)self, (str)robot_name_1, (str)robot_name_2, (str)frame_name_1, (str)frame_name_2, (float)stiffness, (float)damping[, (float)rest_length=0.0]) None ¶
register_viscoelastic_directional_coupling_force( (Engine)self, (str)robot_name, (str)frame_name_1, (str)frame_name_2, (float)stiffness, (float)damping [, (float)rest_length=0.0]) -> None
- remove_coupling_forces((Engine)self, (str)robot_name_1, (str)robot_name_2) None ¶
remove_coupling_forces( (Engine)self [, (str)robot_name]) -> None
- property robot_states¶
fget( (jiminy_py.core.core.Engine)self) -> list
- property robots¶
fget( (jiminy_py.core.core.Engine)self) -> object
- set_simulation_options((Engine)arg1, (dict)arg2) None : ¶
Set the options of the engine and all the robots.
- Parameters:
simulationOptions – Dictionary gathering all the options. See getSimulationOptions for details about the hierarchy.
- simulate((Engine)self, (float)t_end, (dict)q_init_dict, (dict)v_init_dict[, (object)a_init_dict=None[, (object)callback=None]]) None ¶
- simulate( (Engine)self, (float)t_end, (numpy.ndarray)q_init, (numpy.ndarray)v_init [, (object)a_init=None [, (bool)is_state_theoretical=False [, (object)callback=None]]]) -> None :
Run a simulation of duration tEnd, starting at xInit.
- param tEnd:
Duration of the simulation.
- param qInit:
Initial configuration of every robots, i.e. at t=0.0.
- param vInit:
Initial velocity of every robots, i.e. at t=0.0.
- param aInit:
Initial acceleration of every robots, i.e. at t=0.0. Optional: Zero by default.
- param callback:
Callable that can be specified to abort simulation. It will be evaluated after every simulation step. Abort if false is returned.
- simulation_duration_max = 922337203.6854776¶
- start((Engine)self, (dict)q_init_dict, (dict)v_init_dict[, (object)a_init_dict=None]) None ¶
- start( (Engine)self, (numpy.ndarray)q_init, (numpy.ndarray)v_init [, (object)a_init=None [, (bool)is_state_theoretical=False]]) -> None :
Start the simulation
Warning
This function calls reset internally only if necessary, namely if it was not done manually at some point after stopping the previous simulation if any.
- param qInit:
Initial configuration of every robots.
- param vInit:
Initial velocity of every robots.
- param aInit:
Initial acceleration of every robots. Optional: Zero by default.
- step((Engine)self[, (float)step_dt=-1]) None : ¶
Advance the ongoing simulation forward by a given amount of time.
Internally, the integrator must perform multiple steps, which may involve calling the controller to compute command or internal dynamics.
- Parameters:
stepSize – Duration of integration. For convenience, a sensible default will be selected automatically a negative value is specified. This default either corresponds the discrete-time controller update period, the discrete-time sensor update period, or stepper option ‘dtMax’, depending on which one of this criteria is applicable, in this priority order. Optional: -1 by default.
- property stepper_state¶
fget( (jiminy_py.core.core.Engine)self) -> jiminy_py.core.core.StepperState
- stop((Engine)self) None : ¶
Stop the simulation completely.
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. Resuming a simulation is not supported.
- telemetry_time_unit = 1e-10¶
- class jiminy_py.core.StepperState¶
Bases:
instance
Raises an exception This class cannot be instantiated from Python
- property a¶
fget( (jiminy_py.core.core.StepperState)self) -> object
- property dt¶
fget( (jiminy_py.core.core.StepperState)self) -> float
- property iter¶
fget( (jiminy_py.core.core.StepperState)self) -> int
- property iter_failed¶
fget( (jiminy_py.core.core.StepperState)self) -> int
- property q¶
fget( (jiminy_py.core.core.StepperState)self) -> object
- property t¶
fget( (jiminy_py.core.core.StepperState)self) -> float
- property v¶
fget( (jiminy_py.core.core.StepperState)self) -> object
- class jiminy_py.core.RobotState¶
Bases:
instance
Raises an exception This class cannot be instantiated from Python
- property a¶
fget( (jiminy_py.core.core.RobotState)self) -> numpy.ndarray
- property command¶
fget( (jiminy_py.core.core.RobotState)self) -> numpy.ndarray
- property f_external¶
fget( (jiminy_py.core.core.RobotState)self) -> pinocchio.pinocchio_pywrap.StdVec_Force
- property q¶
fget( (jiminy_py.core.core.RobotState)self) -> numpy.ndarray
- property u¶
fget( (jiminy_py.core.core.RobotState)self) -> numpy.ndarray
- property u_custom¶
fget( (jiminy_py.core.core.RobotState)self) -> numpy.ndarray
- property u_internal¶
fget( (jiminy_py.core.core.RobotState)self) -> numpy.ndarray
- property u_motor¶
fget( (jiminy_py.core.core.RobotState)self) -> numpy.ndarray
- property u_transmission¶
fget( (jiminy_py.core.core.RobotState)self) -> numpy.ndarray
- property v¶
fget( (jiminy_py.core.core.RobotState)self) -> numpy.ndarray