BaseJoint#

class blueprints.BaseJoint[source]#

Bases: JointType, MoveableThing, NodeThing

The Joint class represents Mujoco joint objects. All Joints inherit from this base class.

Note

Joints enable movement along the degrees of freedom their parent Bodies and not to Bodies attached to the Joints (one cannot attach Bodies to Joints). This might be counterintuitive since real joints move objects which are attached to them.

Most attribute descriptions are partially taken from Mujoco.

Attributes Summary

actuatorforcerange

np.ndarray | list[int | float], optional This attribute specifies whether actuator forces acting on the Joint should be clamped.

armature

Armature inertia (or rotor inertia, or reflected inertia) of all degrees of freedom created by this Joint.

damping

Damping applied to all degrees of freedom created by this joint.

springdamper

When both numbers are positive, the compiler will override any stiffness and damping values specified with the attributes below, and will instead set them automatically so that the resulting mass-spring-damper for this joint has the desired time constant (first value) and damping ratio (second value).

springref

The Joint position or angle in which the joint spring (if any) achieves equilibrium.

stiffness

Joint stiffness.

type

This is a derived attribute, which is used to specify the type attribute in the mujoco joint tag.

Attributes Documentation

actuatorforcerange#

np.ndarray | list[int | float], optional This attribute specifies whether actuator forces acting on the Joint should be clamped.

Return type:

np.ndarray

Type:

actuatorforcerange

armature#

Armature inertia (or rotor inertia, or reflected inertia) of all degrees of freedom created by this Joint.

Return type:

float

damping#

Damping applied to all degrees of freedom created by this joint. Unlike friction loss which is computed by the constraint solver, damping is simply a force linear in velocity. It is included in the passive forces. Despite this simplicity, larger damping values can make numerical integrators unstable, which is why our Euler integrator handles damping implicitly.

Return type:

float

springdamper#

When both numbers are positive, the compiler will override any stiffness and damping values specified with the attributes below, and will instead set them automatically so that the resulting mass-spring-damper for this joint has the desired time constant (first value) and damping ratio (second value).

Return type:

np.ndarray

springref#

The Joint position or angle in which the joint spring (if any) achieves equilibrium.

Return type:

float

stiffness#

Joint stiffness. If this value is positive, a spring will be created with equilibrium position given by springref below. The spring force is computed along with the other passive forces.

Return type:

float

type#

This is a derived attribute, which is used to specify the type attribute in the mujoco joint tag.

Returns:

The type is the lower case name of the Joint class.

Return type:

str

__init__(pos=[0.0, 0.0, 0.0], alpha=0.0, beta=0.0, gamma=0.0, springdamper=[0.0, 0.0], actuatorforcerange=[0.0, 0.0], stiffness=0.0, springref=0.0, armature=0.0, damping=0.0, sensors=None, actuators=None, name=None, copy=True, x=None, y=None, z=None, **kwargs)[source]#
Parameters:
  • pos (np.ndarray | list[int | float], optional) – Represents the position of the object. Changing this attribute also changes the properties x, y and z.

  • alpha (int | float, optional) – (Improper) euler angle of rotation around the x-axis in radian. Changing this value also changes the euler property.

  • beta (int | float, optional) – (Improper) euler angle of rotation around the y-axis in radian. Changing this value also changes the euler property.

  • gamma (int | float, optional) – (Improper) euler angle of rotation around the z-axis in radian. Changing this value also changes the euler property.

  • springdamper (np.ndarray | list[int | float], optional) – When both numbers are positive, the compiler will override any stiffness and damping values specified with the attributes below, and will instead set them automatically so that the resulting mass-spring-damper for this joint has the desired time constant (first value) and damping ratio (second value).

  • actuatorforcerange (np.ndarray | list[int | float], optional) – This attribute specifies whether actuator forces acting on the Joint should be clamped.

  • stiffness (int | float, optional) – Joint stiffness. If this value is positive, a spring will be created with equilibrium position given by springref below. The spring force is computed along with the other passive forces.

  • springref (int | float, optional) – The Joint position or angle in which the joint spring (if any) achieves equilibrium.

  • armature (int | float, optional) – Armature inertia (or rotor inertia, or reflected inertia) of all degrees of freedom created by this Joint. These are constants added to the diagonal of the inertia matrix in generalized coordinates. They make the simulation more stable, and often increase physical realism. This is because when a motor is attached to the system with a transmission that amplifies the motor force by \(c\), the inertia of the rotor (i.e., the moving part of the motor) is amplified by \(c\cdot c\). The same holds for gears in the early stages of planetary gear boxes. These extra inertias often dominate the inertias of the robot parts that are represented explicitly in the model, and the armature attribute is the way to model them.

  • damping (int | float, optional) – Damping applied to all degrees of freedom created by this joint. Unlike friction loss which is computed by the constraint solver, damping is simply a force linear in velocity. It is included in the passive forces. Despite this simplicity, larger damping values can make numerical integrators unstable, which is why our Euler integrator handles damping implicitly.

  • sensors (blue.SensorType | list[blue.SensorType] | None, optional) – The Sensors are attached to the actuator on initialization.

  • actuators (blue.ActuatorType | list[blue.ActuatorType] | None, optional) – The Actuators are attached to the actuator on initialization.

  • name (str | None, optional) – The user specified name. In the case of a naming conflict the name will be altered by an enumeration scheme.

  • copy (bool, optional) – If True, the Sensors and Actuators passed during init will be copied before attachment, otherwise the original Sensor is attached.

  • **kwargs – Keyword arguments are passed to super().__init__.

  • x (int | float | int32 | int64 | float32 | float64 | None)

  • y (int | float | int32 | int64 | float32 | float64 | None)

  • z (int | float | int32 | int64 | float32 | float64 | None)

classmethod __new__(*args, **kwargs)#