mani_skill.agents.controllers.pd_joint_pos ========================================== .. py:module:: mani_skill.agents.controllers.pd_joint_pos Classes ------- .. autoapisummary:: mani_skill.agents.controllers.pd_joint_pos.PDJointPosController mani_skill.agents.controllers.pd_joint_pos.PDJointPosControllerConfig mani_skill.agents.controllers.pd_joint_pos.PDJointPosMimicController mani_skill.agents.controllers.pd_joint_pos.PDJointPosMimicControllerConfig Module Contents --------------- .. py:class:: PDJointPosController(config, articulation, control_freq, sim_freq = None, scene = None) Bases: :py:obj:`mani_skill.agents.controllers.base_controller.BaseController` Base class for controllers. The controller is an interface for the robot to interact with the environment. .. py:method:: _get_joint_limits() .. py:method:: _initialize_action_space() .. py:method:: before_simulation_step() Called before each simulation step in one control step. .. py:method:: get_state() Get the controller state. .. py:method:: reset() Resets the controller to an initial state. This is called upon environment creation and each environment reset .. py:method:: set_action(action) Set the action to execute. The action can be low-level control signals or high-level abstract commands. .. py:method:: set_drive_property() Set the joint drive property according to the config. .. py:method:: set_drive_targets(targets) .. py:method:: set_state(state) .. py:attribute:: _start_qpos :value: None .. py:attribute:: _target_qpos :value: None .. py:attribute:: config :type: PDJointPosControllerConfig .. py:attribute:: sets_target_qpos :value: True Whether the controller sets the target qpos of the articulation .. py:attribute:: sets_target_qvel :value: False Whether the controller sets the target qvel of the articulation .. py:class:: PDJointPosControllerConfig Bases: :py:obj:`mani_skill.agents.controllers.base_controller.ControllerConfig` .. py:attribute:: controller_cls .. py:attribute:: damping :type: Union[float, Sequence[float]] .. py:attribute:: drive_mode :type: Union[Sequence[mani_skill.utils.structs.types.DriveMode], mani_skill.utils.structs.types.DriveMode] :value: 'force' .. py:attribute:: force_limit :type: Union[float, Sequence[float]] :value: 10000000000.0 .. py:attribute:: friction :type: Union[float, Sequence[float]] :value: 0.0 .. py:attribute:: interpolate :type: bool :value: False .. py:attribute:: lower :type: Union[None, float, Sequence[float]] .. py:attribute:: normalize_action :type: bool :value: True .. py:attribute:: stiffness :type: Union[float, Sequence[float]] .. py:attribute:: upper :type: Union[None, float, Sequence[float]] .. py:attribute:: use_delta :type: bool :value: False .. py:attribute:: use_target :type: bool :value: False .. py:class:: PDJointPosMimicController(config, articulation, control_freq, sim_freq = None, scene = None) Bases: :py:obj:`PDJointPosController` Base class for controllers. The controller is an interface for the robot to interact with the environment. .. py:method:: __repr__() .. py:method:: _get_joint_limits() .. py:method:: _initialize_joints() .. py:method:: set_action(action) Set the action to execute. The action can be low-level control signals or high-level abstract commands. .. py:attribute:: config :type: PDJointPosMimicControllerConfig .. py:class:: PDJointPosMimicControllerConfig Bases: :py:obj:`PDJointPosControllerConfig` PD Joint Position mimic controller configuration. This kind of controller is used to emuluate a mimic joint. For some simulation backends mimic joints are not well simulated and/or are hard to tune and so a mimic controller can be used for better stability as well as alignment with a real robot. The `joint_names` field is expected to be a list of all the joints, whether they are the joints to be controlled or the joints that are controlled via mimicing. `mimic` is a dictionary that maps the mimic joint name to a dictionary of the format dict(joint: str, multiplier: float, offset: float). `joint` is the controlling joint name and is required. All given joints in `joint_names` must be in the `mimic` dictionary as either a key or a value. The ones that are keys are referred to as the mimic joints and the ones that are values are referred to as the control joints. Mimic joints are the ones directly controlled by the agent/user and control joints are implicitly controlled by following the mimic joints via the following equation: q_mimic = q_controlling * multiplier + offset By default, the multiplier is 1.0 and the offset is 0.0. .. py:attribute:: controller_cls .. py:attribute:: mimic :type: dict[str, dict[str, float]] float, offset: float) :type: the mimic targets. Maps the actual mimic joint name to a dictionary of the format dict(joint :type: str, multiplier