pyrcf.components.robot_interfaces.simulation.sim_robot_base

Classes

SimulatedRobotInterface

Base class for simulated robots.

Module Contents

class pyrcf.components.robot_interfaces.simulation.sim_robot_base.SimulatedRobotInterface(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_with_pinocchio.RobotInterfaceWithPinocchio

Base class for simulated robots.

All simulated robot classes should also expose a the following methods in addition to the standard read() and write() methods:

  1. set_base_pose: This is so that we can use proxy base controlling

    (for mobile manipulators in sim that need stable base motion (which may not be ready for testing)).

  2. get_sim_clock: this is to expose the time in the simulated world.

    This can then be used so that all components in the control loop can use the same clock from the sim world, and makes the velocity measurements in the sim interface more sensible wrt the clock being used in the control loop. (see example 05 to see how this clock is used in the control loop.)

abstract set_base_pose(position: numpy.ndarray, orientation: pyrcf.core.types.QuatType)

Set the pose of the base of the simulated robot in the world frame.

Parameters:
  • position (np.ndarray) – Desired position for the base frame in the world.

  • orientation (QuatType) – Desired orientation quaternion [x,y,z,w] for base frame in the world.

Raises:

NotImplementedError – Raised if this method is not implemented by the child class.

abstract get_sim_clock() pyrcf.utils.time_utils.ClockBase

Get the Clock object that gives the time in this simulated world.

Raises:

NotImplementedError – Raised if this method is not implemented by the child class.

Returns:

The Clock object that can be used to get the current time using its

get_time() method.

Return type:

ClockBase