Placeholder#
- class blueprints.Placeholder[source]#
Bases:
PlaceholderType,MoveableThingThis class is available through the shortcut
blueprints.Placeholder.Placeholders can be attached to a
blueprints.body.Bodyto mark special places and orientations for attachment. It will not be included into the xml.- 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.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.**kwargs – Keyword arguments are passed to
super().__init__.
- parent#
When a Thing is attached to the Placeholder, it instead gets attached to the parent and its position and orientation will be adjusted such that it is positioned and oriented as if it were attached of the Placeholder.
- Type:
blue.NodeThingType | None
Methods Summary
attach(*args)Things that are attached to a Placeholder are instead attached to the Placeholders parent Body in a position and orientation as if they were attached to the Placeholder directly.
detach(*args)This method redirects to the Placeholders parent.
Methods Documentation
- attach(*args)[source]#
Things that are attached to a Placeholder are instead attached to the Placeholders parent Body in a position and orientation as if they were attached to the Placeholder directly.
- Parameters:
*args – the Things that sould be attached to the Placeholders
parent- Raises:
Expection – If the Placeholder is not attached to a parent an error is raised.
- detach(*args)[source]#
This method redirects to the Placeholders parent. This means, that Things that have not been attached to the parent directly (not via the Placeholder) can also be detached with this method.
- Parameters:
*args – the Things that sould be detached from the Placeholders
parent
- __init__(pos=[0.0, 0.0, 0.0], alpha=0.0, beta=0.0, gamma=0.0, name=None, x=None, y=None, z=None, quat=None, **kwargs)#
MoveableThing implements multiple Thing location and orientation in (improper) euler angles in radians.
- Parameters:
pos (
list[int | float] | np.ndarray | None, 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.name (
str | None, optional) – The user specified name for the Thing.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__.
- classmethod __new__(*args, **kwargs)#