robot_spec

Definition of robots’ parameters and kinematic models.

This module defines several robot models, including the Panda, FR3, LWR, iiwa, and UR series robots. Each class represents a specific robot, specifying its kinematic properties such as joint limits, joint velocities, TCP (Tool Center Point), and home configurations. Each robot also provides a Kinmodel function that returns the robot’s kinematic model and Jacobian matrix based on the robot’s current joint configuration and TCP.

Included robot specification classes:

  • panda_spec: parameters and kinematics for the Panda robot

  • fr3_spec: parameters and kinematics for the FR3 robot

  • lwr_spec: parameters and kinematics for the LWR robot

  • iiwa_spec: parameters and kinematics for the iiwa robot

  • ur10_spec: parameters and kinematics for the UR10 robot

  • ur10e_spec: parameters and kinematics for the UR10e robot

  • ur5_spec: parameters and kinematics for the UR5 robot

  • ur5e_spec: parameters and kinematics for the UR5e robot

Each robot specification class typically defines common attributes such as Name, nj, TCPGripper, q_home, q_max, q_min, qdot_max, and v_max, and provides a Kinmodel method for forward-kinematics and Jacobian evaluation.

class robotblockset.robot_spec.panda_spec[source]

Bases: robot

Initializes the robot with default values and optional configurations.

Parameters:

**kwargs (Any) – Optional arguments for custom configuration or parameters.

Kinmodel(q: ndarray | None = None, tcp: ndarray | None = None, out: str = 'x') Tuple[ndarray, ndarray] | Tuple[ndarray, ndarray, ndarray][source]

Compute forward kinematics and Jacobian for the robot.

Parameters:
  • q (JointConfigurationType, optional) – Joint angles/positions. Uses the current joint state when None.

  • tcp (TCPType, optional) – Tool center point transform or pose. Uses the current TCP when None.

  • out (str, optional) – Output form (e.g., “x”, “pR”).

Returns:

Pose representation and JacobianType depending on out.

Return type:

tuple

IKin_analytical(x: ndarray, q7: float = 0.7853981633974483, q_initial: ndarray | None = None, tcp: ndarray | None = None, valid: bool = True, closest: bool = True) Tuple[ndarray, ...][source]

Compute the analytical inverse kinematics for the Panda robot.

Parameters:
  • x (Pose3DType) – End-effector pose.

  • q7 (float, optional) – 7th joint value for the elbow rotation.

  • q_initial (JointConfigurationType, optional) – Initial joint configuration for solution selection.

  • tcp (TCPType, optional) – Tool center point transform or pose.

  • valid (bool, optional) – Enforce joint limit validity if True.

  • closest (bool, optional) – Select the closest valid solution if True.

Returns:

Joint solutions as arrays.

Return type:

tuple

class robotblockset.robot_spec.fr3_spec[source]

Bases: robot

Initializes the robot with default values and optional configurations.

Parameters:

**kwargs (Any) – Optional arguments for custom configuration or parameters.

Kinmodel(q: ndarray | None = None, tcp: ndarray | None = None, out: str = 'x') Tuple[ndarray, ndarray] | Tuple[ndarray, ndarray, ndarray][source]

Compute forward kinematics and Jacobian for the robot.

Parameters:
  • q (JointConfigurationType, optional) – Joint angles/positions. Uses the current joint state when None.

  • tcp (TCPType, optional) – Tool center point transform or pose. Uses the current TCP when None.

  • out (str, optional) – Output form (e.g., “x”, “pR”).

Returns:

Pose representation and JacobianType depending on out.

Return type:

tuple

IKin_analytical(x: ndarray, q7: float, q_initial: ndarray, tcp: ndarray | None = None, valid: bool = True, closest: bool = True) Tuple[ndarray, ...][source]

Compute the analytical inverse kinematics for the FR3 robot.

Parameters:
  • x (Pose3DType) – End-effector pose.

  • q7 (float) – 7th joint value for the elbow rotation.

  • q_initial (JointConfigurationType) – Initial joint configuration for solution selection.

  • tcp (TCPType, optional) – Tool center point transform or pose.

  • valid (bool, optional) – Enforce joint limit validity if True.

  • closest (bool, optional) – Select the closest valid solution if True.

Returns:

Joint solutions as arrays.

Return type:

tuple

class robotblockset.robot_spec.lwr_spec[source]

Bases: robot

Initializes the robot with default values and optional configurations.

Parameters:

**kwargs (Any) – Optional arguments for custom configuration or parameters.

Kinmodel(q: ndarray | None = None, tcp: ndarray | None = None, out: str = 'x') Tuple[ndarray, ndarray] | Tuple[ndarray, ndarray, ndarray][source]

Compute forward kinematics and Jacobian for the robot.

Parameters:
  • q (JointConfigurationType, optional) – Joint angles/positions. Uses the current joint state when None.

  • tcp (TCPType, optional) – Tool center point transform or pose. Uses the current TCP when None.

  • out (str, optional) – Output form (e.g., “x”, “pR”).

Returns:

Pose representation and JacobianType depending on out.

Return type:

tuple

class robotblockset.robot_spec.iiwa_spec[source]

Bases: robot

Initializes the robot with default values and optional configurations.

Parameters:

**kwargs (Any) – Optional arguments for custom configuration or parameters.

Kinmodel(q: ndarray | None = None, tcp: ndarray | None = None, out: str = 'x') Tuple[ndarray, ndarray] | Tuple[ndarray, ndarray, ndarray][source]

Compute forward kinematics and Jacobian for the robot.

Parameters:
  • q (JointConfigurationType, optional) – Joint angles/positions. Uses the current joint state when None.

  • tcp (TCPType, optional) – Tool center point transform or pose. Uses the current TCP when None.

  • out (str, optional) – Output form (e.g., “x”, “pR”).

Returns:

Pose representation and JacobianType depending on out.

Return type:

tuple

class robotblockset.robot_spec.ur10_spec[source]

Bases: robot

Initializes the robot with default values and optional configurations.

Parameters:

**kwargs (Any) – Optional arguments for custom configuration or parameters.

Kinmodel(q: ndarray | None = None, tcp: ndarray | None = None, out: str = 'x') Tuple[ndarray, ndarray] | Tuple[ndarray, ndarray, ndarray][source]

Compute forward kinematics and Jacobian for the robot.

Parameters:
  • q (JointConfigurationType, optional) – Joint angles/positions. Uses the current joint state when None.

  • tcp (TCPType, optional) – Tool center point transform or pose. Uses the current TCP when None.

  • out (str, optional) – Output form (e.g., “x”, “pR”).

Returns:

Pose representation and JacobianType depending on out.

Return type:

tuple

class robotblockset.robot_spec.ur10e_spec[source]

Bases: robot

Initializes the robot with default values and optional configurations.

Parameters:

**kwargs (Any) – Optional arguments for custom configuration or parameters.

Kinmodel(q: ndarray | None = None, tcp: ndarray | None = None, out: str = 'x') Tuple[ndarray, ndarray] | Tuple[ndarray, ndarray, ndarray][source]

Compute forward kinematics and Jacobian for the robot.

Parameters:
  • q (JointConfigurationType, optional) – Joint angles/positions. Uses the current joint state when None.

  • tcp (TCPType, optional) – Tool center point transform or pose. Uses the current TCP when None.

  • out (str, optional) – Output form (e.g., “x”, “pR”).

Returns:

Pose representation and JacobianType depending on out.

Return type:

tuple

class robotblockset.robot_spec.ur5_spec[source]

Bases: robot

Initializes the robot with default values and optional configurations.

Parameters:

**kwargs (Any) – Optional arguments for custom configuration or parameters.

Kinmodel(q: ndarray | None = None, tcp: ndarray | None = None, out: str = 'x') Tuple[ndarray, ndarray] | Tuple[ndarray, ndarray, ndarray][source]

Compute forward kinematics and Jacobian for the robot.

Parameters:
  • q (JointConfigurationType, optional) – Joint angles/positions. Uses the current joint state when None.

  • tcp (TCPType, optional) – Tool center point transform or pose. Uses the current TCP when None.

  • out (str, optional) – Output form (e.g., “x”, “pR”).

Returns:

Pose representation and JacobianType depending on out.

Return type:

tuple

class robotblockset.robot_spec.ur5e_spec[source]

Bases: robot

Initializes the robot with default values and optional configurations.

Parameters:

**kwargs (Any) – Optional arguments for custom configuration or parameters.

Kinmodel(q: ndarray | None = None, tcp: ndarray | None = None, out: str = 'x') Tuple[ndarray, ndarray] | Tuple[ndarray, ndarray, ndarray][source]

Compute forward kinematics and Jacobian for the robot.

Parameters:
  • q (JointConfigurationType, optional) – Joint angles/positions. Uses the current joint state when None.

  • tcp (TCPType, optional) – Tool center point transform or pose. Uses the current TCP when None.

  • out (str, optional) – Output form (e.g., “x”, “pR”).

Returns:

Pose representation and JacobianType depending on out.

Return type:

tuple

class robotblockset.robot_spec.crx20_spec[source]

Bases: robot

Initializes the robot with default values and optional configurations.

Parameters:

**kwargs (Any) – Optional arguments for custom configuration or parameters.

Kinmodel(q: ndarray | None = None, tcp: ndarray | None = None, out: str = 'x') Tuple[ndarray, ndarray] | Tuple[ndarray, ndarray, ndarray][source]

Compute forward kinematics and Jacobian for the robot.

Parameters:
  • q (JointConfigurationType, optional) – Joint angles/positions. Uses the current joint state when None.

  • tcp (TCPType, optional) – Tool center point transform or pose. Uses the current TCP when None.

  • out (str, optional) – Output form (e.g., “x”, “pR”).

Returns:

Pose representation and JacobianType depending on out.

Return type:

tuple

class robotblockset.robot_spec.hc20_spec[source]

Bases: robot

Initializes the robot with default values and optional configurations.

Parameters:

**kwargs (Any) – Optional arguments for custom configuration or parameters.

Kinmodel(q: ndarray | List[float] | List[int] | Tuple[float, ...] | Tuple[int, ...] | None = None, tcp: ndarray | List[float] | List[int] | Tuple[float, ...] | Tuple[int, ...] | None = None, out: str = 'x') Tuple[ndarray, ndarray] | Tuple[ndarray, ndarray, ndarray][source]

Compute forward kinematics and Jacobian for the robot.

Parameters:
  • q (ArrayLike, optional) – Joint angles/positions. Uses the current joint state when None.

  • tcp (ArrayLike, optional) – Tool center point transform or pose. Uses the current TCP when None.

  • out (str, optional) – Output form (e.g., “x”, “pR”).

Returns:

Pose representation and JacobianType depending on out.

Return type:

tuple

class robotblockset.robot_spec.z1_spec[source]

Bases: robot

Initializes the robot with default values and optional configurations.

Parameters:

**kwargs (Any) – Optional arguments for custom configuration or parameters.

Kinmodel(q: ndarray | List[float] | List[int] | Tuple[float, ...] | Tuple[int, ...] | None = None, tcp: ndarray | List[float] | List[int] | Tuple[float, ...] | Tuple[int, ...] | None = None, out: str = 'x') Tuple[ndarray, ndarray] | Tuple[ndarray, ndarray, ndarray][source]

Compute forward kinematics and Jacobian for the robot.

Parameters:
  • q (ArrayLike, optional) – Joint angles/positions. Uses the current joint state when None.

  • tcp (ArrayLike, optional) – Tool center point transform or pose. Uses the current TCP when None.

  • out (str, optional) – Output form (e.g., “x”, “pR”).

Returns:

Pose representation and JacobianType depending on out.

Return type:

tuple

class robotblockset.robot_spec.b2_spec[source]

Bases: robot

Initializes the robot with default values and optional configurations.

Parameters:

**kwargs (Any) – Optional arguments for custom configuration or parameters.

Kinmodel(q: ndarray | List[float] | List[int] | Tuple[float, ...] | Tuple[int, ...] | None = None, tcp: ndarray | List[float] | List[int] | Tuple[float, ...] | Tuple[int, ...] | None = None, out: str = 'x') Tuple[ndarray, ndarray] | Tuple[ndarray, ndarray, ndarray][source]

Compute forward kinematics and Jacobian for the robot.

Parameters:
  • q (ArrayLike, optional) – Joint angles/positions. Uses the current joint state when None.

  • tcp (ArrayLike, optional) – Tool center point transform or pose. Uses the current TCP when None.

  • out (str, optional) – Output form (e.g., “x”, “pR”).

Returns:

Pose representation and JacobianType depending on out.

Return type:

tuple

Classes

b2_spec()

Initializes the robot with default values and optional configurations.

crx20_spec()

Initializes the robot with default values and optional configurations.

fr3_spec()

Initializes the robot with default values and optional configurations.

hc20_spec()

Initializes the robot with default values and optional configurations.

iiwa_spec()

Initializes the robot with default values and optional configurations.

lwr_spec()

Initializes the robot with default values and optional configurations.

panda_spec()

Initializes the robot with default values and optional configurations.

ur10_spec()

Initializes the robot with default values and optional configurations.

ur10e_spec()

Initializes the robot with default values and optional configurations.

ur5_spec()

Initializes the robot with default values and optional configurations.

ur5e_spec()

Initializes the robot with default values and optional configurations.

z1_spec()

Initializes the robot with default values and optional configurations.