blueprints.joints module#
- class blueprints.joints.BaseJoint[source]#
Bases:
JointType,MoveableThing,NodeThingThe 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.
- __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 propertiesx,yandz.alpha (
int | float, optional) – (Improper) euler angle of rotation around the x-axis in radian. Changing this value also changes theeulerproperty.beta (
int | float, optional) – (Improper) euler angle of rotation around the y-axis in radian. Changing this value also changes theeulerproperty.gamma (
int | float, optional) – (Improper) euler angle of rotation around the z-axis in radian. Changing this value also changes theeulerproperty.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)
- property type: str#
This is a derived attribute, which is used to specify the
typeattribute in the mujocojointtag.- Returns:
The type is the lower case name of the Joint class.
- Return type:
str
- property springdamper: ndarray#
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
- property actuatorforcerange: ndarray#
np.ndarray | list[int | float], optional This attribute specifies whether actuator forces acting on the Joint should be clamped.
- Return type:
np.ndarray- Type:
- property stiffness: float#
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
- property springref: float#
The Joint position or angle in which the joint spring (if any) achieves equilibrium.
- Return type:
float
- property armature: float#
Armature inertia (or rotor inertia, or reflected inertia) of all degrees of freedom created by this Joint.
- Return type:
float
- property damping: float#
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
- class blueprints.joints.Hinge[source]#
-
Most attribute descriptions are partially taken from Mujoco.
- __init__(pos=[0.0, 0.0, 0.0], axis=[0.0, 0.0, 1.0], range=[0.0, 0.0], ref=0.0, frictionloss=0.0, name=None, 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 propertiesx,yandz.axis (
np.ndarray | list[int | float] | str, optional) – This attribute specifies the axis of rotation for hinge Joints and the direction of translation for Slides.range (
np.ndarray | list[int | float], optional) – The reference position or angle of the Joint. It defines the joint value corresponding to the initial model configuration.ref (
int | float, optional) – The reference position or angle of the Joint. It defines the joint value corresponding to the initial model configuration.frictionloss (
int | float, optional) – Friction loss due to dry friction. This value is the same for all degrees of freedom created by this Joint.name (
str | None, optional) – The user specified name. In the case of a naming conflict the name will be altered by an enumeration scheme.**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)
- property axis: ndarray#
This attribute specifies the axis of rotation for hinge Joints and the direction of translation for Slides.
- Return type:
np.ndarray
- property range: ndarray#
The reference position or angle of the Joint. It defines the joint value corresponding to the initial model configuration.
- Return type:
np.ndarray
- property ref: float#
The reference position or angle of the Joint. It defines the joint value corresponding to the initial model configuration.
- Return type:
float
- property frictionloss: float#
Friction loss due to dry friction. This value is the same for all degrees of freedom created by this Joint.
- Return type:
float
- class blueprints.joints.Slide[source]#
-
Most attribute descriptions are partially taken from Mujoco.
- __init__(pos=[0.0, 0.0, 0.0], axis=[0.0, 0.0, 1.0], range=[0.0, 0.0], ref=0, frictionloss=0.0, name=None, 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 propertiesx,yandz.axis (
np.ndarray | list[int | float] | str, optional) – This attribute specifies the axis of rotation for hinge Joints and the direction of translation for Slides.range (
np.ndarray | list[int | float], optional) – The reference position or angle of the Joint. It defines the joint value corresponding to the initial model configuration.ref (
int | float, optional) – The reference position or angle of the Joint. It defines the joint value corresponding to the initial model configuration.frictionloss (
int | float, optional) – Friction loss due to dry friction. This value is the same for all degrees of freedom created by this Joint.name (
str | None, optional) – The user specified name. In the case of a naming conflict the name will be altered by an enumeration scheme.**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)
- property axis: ndarray#
This attribute specifies the axis of rotation for hinge Joints and the direction of translation for Slides.
- Return type:
np.ndarray
- property range: ndarray#
The reference position or angle of the Joint. It defines the joint value corresponding to the initial model configuration.
- Return type:
np.ndarray
- property ref: float#
The reference position or angle of the Joint. It defines the joint value corresponding to the initial model configuration.
- Return type:
float
- property frictionloss: float#
Friction loss due to dry friction. This value is the same for all degrees of freedom created by this Joint.
- Return type:
float
- class blueprints.joints.Ball[source]#
-
Most attribute descriptions are partially taken from Mujoco.
- __init__(pos=[0.0, 0.0, 0.0], range=[0.0, 0.0], frictionloss=0.0, name=None, 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 propertiesx,yandz.range (
np.ndarray | list[int | float], optional) – The reference position or angle of the Joint. It defines the joint value corresponding to the initial model configuration.frictionloss (
int | float, optional) – Friction loss due to dry friction. This value is the same for all degrees of freedom created by this Joint.name (
str | None, optional) – The user specified name. In the case of a naming conflict the name will be altered by an enumeration scheme.x (
int | float |np.int32 | np.int64 | np.float32 | np.float64 | None, optional) – If pos is not specified, this argument sets the X position coordinate.y (
int | float |np.int32 | np.int64 | np.float32 | np.float64 | None, optional) – If pos is not specified, this argument sets the Y position coordinate.z (
int | float |np.int32 | np.int64 | np.float32 | np.float64 | None, optional) – If pos is not specified, this argument sets the Z position coordinate.**kwargs – Keyword arguments are passed to
super().__init__.
- property range: ndarray#
The reference position or angle of the Joint. It defines the joint value corresponding to the initial model configuration.
- Return type:
np.ndarray
- property frictionloss: float#
Friction loss due to dry friction. This value is the same for all degrees of freedom created by this Joint.
- Return type:
float