pyrcf.components.robot_interfaces.robot_interface_with_pinocchio

Classes

RobotInterfaceWithPinocchio

Extension to the RobotInterface base class to provide easier interfacing with

Module Contents

class pyrcf.components.robot_interfaces.robot_interface_with_pinocchio.RobotInterfaceWithPinocchio(robot_urdf: str = None, ee_names: List[str] = (), floating_base: bool = False, verbose: bool = True, create_pinocchio_interface: bool = True)

Bases: pyrcf.components.robot_interfaces.robot_interface_base.RobotInterface

Extension to the RobotInterface base class to provide easier interfacing with PinocchioInterface.

NOTE: Any class inheriting this base class should call the constructor using ``` super().__init__(

robot_urdf=robot_urdf, ee_names=ee_names, floating_base=floating_base, verbose=verbose, create_pinocchio_interface=create_pinocchio_interface,

)

To update pinocchio in the control loop at every time, call self.update_pinocchio_robot_state(robot_state=robot_state) in the read() method implementation of the child class

_pin_interface: pyrcf.utils.kinematics_dynamics.PinocchioInterface = None
_urdf_path
get_pinocchio_interface() pyrcf.utils.kinematics_dynamics.PinocchioInterface

Get the pinocchio interface associated with this robot.

NOTE: this is a mutable object, and will be updated automatically

whenever the read() method of this class instance is called.

Returns:

A mutable copy of the PinocchioInterface object for

this robot.

Return type:

PinocchioInterface

update_pinocchio_robot_state(robot_state: pyrcf.core.types.RobotState, update_ee_states: bool = True) pyrcf.core.types.RobotState

Update the PinocchioInterface kinematics and dynamics data using the provided robot state, and return update robot state with info from pinocchio.

Parameters:
  • robot_state (RobotState) – RobotState read from the robot.

  • update_ee_states (bool, optional) – If True, will populate

  • pinocchio. (robot_state.state_estimates.end_effector_states data using data from)

  • True. (Defaults to)

Returns:

updated RobotState object.

Return type:

RobotState

property has_pinocchio_interface: bool

Check if this robot has a usable pinocchio interface.

Returns:

True if the robot interface has a PinocchioInterface.

Return type:

bool

property urdf_path: str

Path to the urdf used for creating this robot’s pinocchio model.