Joint

class compas_robots.model.Joint[source]

Bases: Data

Representation of the kinematics and dynamics of a joint and its safety limits.

Attributes:
namestr

Unique name for the joint.

typestr | int

Joint type either as a string or an index number. See class attributes for named constants and supported types.

originFrame

Frame defining the transformation from the parent link to the child link frame.

parentParentLink | str

Parent link instance or parent link name.

childChildLink | str

Child link instance or name of child link.

axisAxis

Joint axis specified in the joint frame. Represents the axis of rotation for revolute joints, the axis of translation for prismatic joints, and the surface normal for planar joints. The axis is specified in the joint frame of reference.

calibrationCalibration

Reference positions of the joint, used to calibrate the absolute position of the joint.

dynamicsDynamics

Physical properties of the joint. These values are used to specify modeling properties of the joint, particularly useful for simulation.

limitLimit

Joint limit properties.

safety_controllerSafetyController

Safety controller properties.

mimicMimic

Used to specify that the defined joint mimics another existing joint.

attrdict

Non-standard attributes.

child_linkLink

Joint’s child link

positionfloat

The current position of the joint. This depends on the joint type, i.e. for revolute joints, it will be the rotation angle in radians, for prismatic joints the translation in meters.

REVOLUTEint

Revolute joint type.

CONTINUOUSint

Continuous joint type.

PRISMATICint

Prismatic joint type.

FIXEDint

Fixed joint type.

FLOATINGint

Floating joint type.

PLANARint

Planar joint type.

SUPPORTED_TYPESlist[str]

String representations of the supported joint types.

Methods

calculate_continuous_transformation

Returns a transformation of a continuous joint.

calculate_fixed_transformation

Returns an identity transformation.

calculate_floating_transformation

Returns a transformation of a floating joint.

calculate_planar_transformation

Returns a transformation of a planar joint.

calculate_prismatic_transformation

Returns a transformation of a prismatic joint.

calculate_revolute_transformation

Returns a transformation of a revolute joint.

calculate_transformation

Returns the transformation of the joint.

get_urdf_element

is_configurable

Returns True if the joint can be configured, otherwise False.

is_scalable

Returns True if the joint can be scaled, otherwise False.

scale

Scale the joint origin and limit (only if scalable) by a given factor.

transform

Transform the joint in place.

Inherited Methods

ToString

Converts the instance to a string.

copy

Make an independent copy of the data object.

from_json

Construct an object of this type from a JSON file.

from_jsonstring

Construct an object of this type from a JSON string.

sha256

Compute a hash of the data for comparison during version control using the sha256 algorithm.

to_json

Convert an object to its native data representation and save it to a JSON file.

to_jsonstring

Convert an object to its native data representation and save it to a JSON string.

validate_data

Validate the data against the object's data schema.