Robot

class itmobotics_sim.utils.robot.EEState(ee_link, ref_frame='world')[source]

Bases: object

End Effector State

Parameters:
  • ee_link (str) – name of end effector link in urdf

  • ref_frame (str, optional) – name of base link in urdf. Defaults to “world”.

copy()[source]
Return type:

EEState

property force_torque: ndarray
static from_force_torque(force_torque, ee_link, ref_link='world')[source]

End Effector State

Parameters:
  • force_torque (np.ndarray) – force and torque

  • ee_link (str) – name of end effector link in urdf

  • ref_link (str, optional) – name of base link in urdf. Defaults to “world”.

Returns:

End Effector State

Return type:

EEState

static from_tf(tf, ee_link, ref_link='world')[source]

_summary_

Parameters:
  • tf (SE3) – transformation

  • ee_link (str) – name of end effector link in urdf

  • ref_link (str, optional) – name of base link in urdf. Defaults to “world”.

Returns:

End Effector State

Return type:

EEState

static from_twist(twist, ee_link, ref_link='world')[source]

_summary_

Parameters:
  • twist (np.ndarray) – linear and angular speeds

  • ee_link (str) – name of end effector link in urdf

  • ref_link (str, optional) – name of base link in urdf. Defaults to “world”.

Returns:

End Effector State

Return type:

EEState

inv()[source]

inverse chain

property ref_frame: str
property tf: SE3
transform(tf)[source]

_summary_

Parameters:

tf (SE3) – _description_

property twist: ndarray
class itmobotics_sim.utils.robot.JointLimits(limit_positions, limit_velocities, limit_torques)[source]

Bases: object

Joint limits class

Parameters:
  • limit_positions (Tuple[np.ndarray]) – limit joints positions

  • limit_velocities (Tuple[np.ndarray]) – limit joints velocities

  • limit_torques (Tuple[np.ndarray]) – limit joints torques

clip_joint_state(joint_state)[source]

clip joint state

Clip positions, velocities, torques by limits

Parameters:

joint_state (JointState) – joint_state to clipping

property limit_positions: Tuple[ndarray]

current limit_positions

Type:

np.ndarray

property limit_torques: Tuple[ndarray]

current limit_torques

Type:

np.ndarray

property limit_velocities: Tuple[ndarray]

current limit_velocities

Type:

np.ndarray

property num_joints: int

number of joints

Type:

int

class itmobotics_sim.utils.robot.JointState(num_joints)[source]

Bases: object

_summary_

from_position()[source]
Return type:

JointState

from_torque()[source]
Return type:

JointState

from_velocity()[source]
Return type:

JointState

property joint_positions: ndarray
property joint_torques: ndarray
property joint_velocities: ndarray
property num_joints: int
class itmobotics_sim.utils.robot.Motion(ee_link, num_joints)[source]

Bases: object

Class description

Parameters:
  • ee_link (str) – end link

  • num_joints (int) – num of joints

property ee_state: EEState
static from_ee_state(ee_state)[source]
Parameters:

ee_state (EEState) – End Effector State

Return type:

Motion

static from_joint_state(joint_state)[source]
Parameters:

joint_state (JointState) – JointState

Return type:

Motion

static from_states(joint_state, ee_state)[source]
Parameters:
Return type:

Motion

property joint_state: JointState
class itmobotics_sim.utils.robot.Robot(urdf_filename, base_transform=SE3(array([[1., 0., 0., 0.], [0., 1., 0., 0.], [0., 0., 1., 0.], [0., 0., 0., 1.]])))[source]

Bases: ABC

Robot base class

Parameters:
  • urdf_filename (str) – path to robot URDF

  • base_transform (SE3, optional) – base transform from world to robot

ee_state(ee_link, ref_frame='world')[source]

EE state of robot

Parameters:
  • ee_link (str) – name of end effector link in urdf

  • ref_link (str, optional) – name of base link in urdf. Defaults to “world”.

Returns:

_description_

Return type:

EEState

abstract jacobian(joint_pose, ee_link)[source]
abstract property joint_limits: JointLimits
property joint_state: JointState
property num_joints: int
abstract reset()[source]
abstract reset_joint_state(jstate)[source]
set_control(target_motion, type_ctrl)[source]
Parameters:
Returns:

return True if success

Return type:

bool

class itmobotics_sim.utils.robot.RobotControllerType(value)[source]

Bases: Enum

Robot controller types

Parameters:

Enum (_type_) – type of joint control

JOINT_POSITIONS = 'joint_positions'
JOINT_TORQUES = 'joint_torques'
JOINT_VELOCITIES = 'joint_velocities'
TF = 'tf'
TWIST = 'twist'