Joint

class urdfpy.Joint(name, joint_type, parent, child, axis=None, origin=None, limit=None, dynamics=None, safety_controller=None, calibration=None, mimic=None)[source]

Bases: urdfpy.URDFType

A connection between two links.

There are several types of joints, including:

  • fixed - a joint that cannot move.
  • prismatic - a joint that slides along the joint axis.
  • revolute - a hinge joint that rotates about the axis with a limited range of motion.
  • continuous - a hinge joint that rotates about the axis with an unlimited range of motion.
  • planar - a joint that moves in the plane orthogonal to the axis.
  • floating - a joint that can move in 6DoF.
Parameters:
  • name (str) – The name of this joint.
  • parent (str) – The name of the parent link of this joint.
  • child (str) – The name of the child link of this joint.
  • joint_type (str) – The type of the joint. Must be one of Joint.TYPES.
  • axis ((3,) float, optional) – The axis of the joint specified in joint frame. Defaults to [1,0,0].
  • origin ((4,4) float, optional) – The pose of the child link with respect to the parent link’s frame. The joint frame is defined to be coincident with the child link’s frame, so this is also the pose of the joint frame with respect to the parent link’s frame.
  • limit (JointLimit, optional) – Limit for the joint. Only required for revolute and prismatic joints.
  • dynamics (JointDynamics, optional) – Dynamics for the joint.
  • safety_controller (:class`.SafetyController`, optional) – The safety controller for this joint.
  • calibration (JointCalibration, optional) – Calibration information for the joint.
  • mimic (JointMimic, optional) – Joint mimicry information.

Attributes Summary

TYPES
axis The joint axis in the joint frame.
calibration The calibration for this joint.
child The name of the child link.
dynamics The dynamics for this joint.
joint_type The type of this joint.
limit The limits for this joint.
mimic The mimic for this joint.
name Name for this joint.
origin The pose of child and joint frames relative to the parent link’s frame.
parent The name of the parent link.
safety_controller The safety controller for this joint.

Methods Summary

get_child_pose([cfg]) Computes the child pose relative to a parent pose for a given configuration value.
is_valid(cfg) Check if the provided configuration value is valid for this joint.

Attributes Documentation

TYPES = ['fixed', 'prismatic', 'revolute', 'continuous', 'floating', 'planar']
axis

The joint axis in the joint frame.

Type:(3,) float
calibration

The calibration for this joint.

Type:JointCalibration
child

The name of the child link.

Type:str
dynamics

The dynamics for this joint.

Type:JointDynamics
joint_type

The type of this joint.

Type:str
limit

The limits for this joint.

Type:JointLimit
mimic

The mimic for this joint.

Type:JointMimic
name

Name for this joint.

Type:str
origin

The pose of child and joint frames relative to the parent link’s frame.

Type:(4,4) float
parent

The name of the parent link.

Type:str
safety_controller

The safety controller for this joint.

Type:SafetyController

Methods Documentation

get_child_pose(cfg=None)[source]

Computes the child pose relative to a parent pose for a given configuration value.

Parameters:cfg (float, (2,) float, (6,) float, or (4,4) float) –

The configuration values for this joint. They are interpreted based on the joint type as follows:

  • fixed - not used.
  • prismatic - a translation along the axis in meters.
  • revolute - a rotation about the axis in radians.
  • continuous - a rotation about the axis in radians.
  • planar - the x and y translation values in the plane.
  • floating - the xyz values followed by the rpy values, or a (4,4) matrix.

If cfg is None, then this just returns the joint pose.

Returns:pose – The pose of the child relative to the parent.
Return type:(4,4) float
is_valid(cfg)[source]

Check if the provided configuration value is valid for this joint.

Parameters:cfg (float, (2,) float, (6,) float, or (4,4) float) – The configuration of the joint.
Returns:is_valid – True if the configuration is valid, and False otherwise.
Return type:bool