Agent#
- class blueprints.Agent[source]#
-
This class emulates a Body which serves as an interface for sensors, cameras and actuators of an Agent. It provides uniform access to the observation and action relevant Things.
Attributes Summary
The shapes of both action types (activations and forces)
All activations of Actuators that have an activation state.
Instead of returning just the children all descending Actuators are returned.
Instead of returning just the children all descending Cameras are returned.
All forces of Actuators of the Agent
The returned name might differ from the user specification by an enumerations scheme that is applied if two Things of the same type in a kinematic tree share the same name.
The dictionary contains the name of all observables and their data.
The dictionary contains the names of all observables and their shapes.
Instead of returning just the children all descending Sensors are returned.
Attributes Documentation
- action_shape#
The shapes of both action types (activations and forces)
- Return type:
dict
- activation#
All activations of Actuators that have an activation state. Actuators with
'dyntype' == 'none'do not have an activation.- Return type:
list
- actuators#
Instead of returning just the children all descending Actuators are returned.
- Returns:
The view is routed to all actuators of the agent (instead of just those that follow directly in the kinematic hierarchy).
- Return type:
- cameras#
Instead of returning just the children all descending Cameras are returned.
- Returns:
The view is routed to all cameras of the agent (instead of just those that follow directly in the kinematic hierarchy).
- Return type:
- force#
All forces of Actuators of the Agent
- Return type:
list
- name#
The returned name might differ from the user specification by an enumerations scheme that is applied if two Things of the same type in a kinematic tree share the same name.
- Returns:
possibly extended name of the Thing
- Return type:
str
- observation#
The dictionary contains the name of all observables and their data.
- Return type:
dict
- observation_shape#
The dictionary contains the names of all observables and their shapes.
- Return type:
dict
- sensors#
Instead of returning just the children all descending Sensors are returned.
- Returns:
The view is routed to all sensors of the agent (instead of just those that follow directly in the kinematic hierarchy).
- Return type:
- __init__(pos=[0.0, 0.0, 0.0], alpha=0.0, beta=0.0, gamma=0.0, geoms=None, sites=None, joints=None, bodies=None, lights=None, cameras=None, actuators=None, placeholders=None, name=None, copy=True, x=None, y=None, z=None, quat=None, **kwargs)#
- Parameters:
pos (
list[int | float] | np.ndarray, optional) – Represents the position of the object. Changing this attribute also changes the propertiesx,yandz.alpha (
int | float | None, optional) – (Improper) euler angle of rotation around the x-axis in radian. Changing this value also changes theeulerproperty.beta (
int | float | None, optional) – (Improper) euler angle of rotation around the y-axis in radian. Changing this value also changes theeulerproperty.gamma (
int | float | None, optional) – (Improper) euler angle of rotation around the z-axis in radian. Changing this value also changes theeulerproperty.geoms (
list[blue.ThingType] | blue.ThingType | None, optional) – Thegeomsargument mus either be a list of Geoms or a single Geom.sites (
list[blue.ThingType] | blue.ThingType | None, optional) – Thesitesargument mus either be a list of Sites or a single Site.joints (
list[blue.ThingType] | blue.ThingType | None, optional) – Thejointsargument mus either be a list of Joints or a single Joint.bodies (
list[blue.ThingType] | blue.ThingType | None, optional) – Thebodiesargument mus either be a list of Bodies or a single Body.lights (
list[blue.ThingType] | blue.ThingType | None, optional) – Thelightsargument mus either be a list of Lights or a single Light.cameras (
list[blue.ThingType] | blue.ThingType | None, optional) – Thecamerasargument mus either be a list of Cameras or a single Camera.actuators (
list[blue.ThingType] | blue.ThingType | None, optional) – Theactuatorsargument mus either be a list of Actuators or a single Actuator.placeholders (
list[blue.ThingType] | blue.ThingType | None, optional) – Theplaceholdersargument mus either be a list of Placeholders or a single Placeholder.name (
str | None, optional) – The user specified name of the Body. 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 anglesalpha,betaandgamma.**kwargs – Keyword arguments are passed to
super().__init__.
- Return type:
None
- classmethod __new__(*args, **kwargs)#