BaseSite#

class blueprints.BaseSite[source]#

Bases: SiteType, MoveableThing, ColoredThing, NodeThing

Sites are used to make a models sensitive. If a blueprints.sensors.BaseSensor is attached to the Site, it becomes sensitive to collisions of the Site with other physical Things. To do this Sites are not physical Things themselves in the sense, that they do not posses mass. For different Site shapes individual Site classes are available, with shape depended size attributes. All other attributes are specified in BaseSite.

Note

Though units are not bound to one specific system of measurements, it is highly recommended to use MKS, since all defaults are defined based on meters, kilograms and seconds and most mujoco models online also use the metric system. If you want to switch from the imperial to the metric system the following resource might be of interest to convert units from imperial to metric. If you insist on using imperial units, take a look at the following resource to convert units from metric to imperial.

Attributes Summary

ref_actuators

Ref Actuators contain blueprints.actuators.BaseActuator that are attach to another Site to which they apply force, using this Sites reference frame.

type

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

Attributes Documentation

ref_actuators#

Ref Actuators contain blueprints.actuators.BaseActuator that are attach to another Site to which they apply force, using this Sites reference frame.

Returns:

A View of the Actuators that use the reference frame of this Site to apply force to another Site.

Return type:

blueprints.utils.view.View

type#

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

Returns:

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

Return type:

str

__init__(pos=[0.0, 0.0, 0.0], alpha=0, beta=0, gamma=0, material=None, color=None, sensors=None, actuators=None, name=None, copy=True, x=None, y=None, z=None, quat=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.

  • color (blue.ColorType) – The color of the Site. For a detailed description see :class:`Color `

  • sensors (blue.SensorType | list[blue.SensorType] | None, optional) – The sensors argument mus either be a list of sensors.BaseSensor or a single sensors.BaseSensor.

  • actuators (blue.ActuatorType | list[blue.ActuatorType] | None, optional) – The actuators argument mus either be a list of actuators.BaseActuator or a single actuators.BaseActuator.

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

  • copy (bool, optional) – This argument indicates whether the children should be copied before they are attached. If copy if set to False this will result in graph cycles if a parent of the Body is attached resulting in further errors.

  • 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.

  • quat (list [ int | float ] | np.ndarray | None, optional) – If set, the quaternion orientation overwrites the euler angles alpha, beta and gamma.

  • **kwargs – Description

  • material (MaterialType | None)

classmethod __new__(*args, **kwargs)#