CubeState
¶
The current state of the cube.
This class holds the necessary state information of a cube for usage with a robot.
Attributes:
Name | Type | Description |
---|---|---|
cube_is_gripped |
bool |
Flag, indicating whether the cube is currently gripped. |
cube_coordinate_system |
spatial.CoordinateSystem |
The coordinate system of the cube relative to its parent (either mount or tool). |
grip_position |
Optional[grip_target_generation.GripPosition] |
The current grip position of the robot. |
cube_is_in_mount: bool
property
readonly
¶
Flag, indicating whether the cube is located in the mount.
Returns:
Type | Description |
---|---|
bool |
whether the cube is located in the mount. |
exposed_faces: List[core.cube.FacePosition.FacePosition]
property
readonly
¶
The currently exposed faces.
Returns:
Type | Description |
---|---|
List[core.cube.FacePosition.FacePosition] |
a list of all exposed faces in the order of |
mounted_face: FacePosition
property
readonly
¶
The face which is currently mounted in the mount.
Returns:
Type | Description |
---|---|
FacePosition |
the mounted face |
tool_coordinate_system: Optional[core.spatial.CoordinateSystem.CoordinateSystem]
property
readonly
¶
The coordinate system of the tool relative to the grip position.
Returns:
Type | Description |
---|---|
Optional[core.spatial.CoordinateSystem.CoordinateSystem] |
The coordinate system of the tool relative to the grip position. |
exposed_face(self, gripper_face)
¶
Returns the absolute FacePosition (i.e. a color) for a given GripperFace.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
gripper_face |
GripperFace |
the relative gripper face to get the color of |
required |
Returns:
Type | Description |
---|---|
FacePosition |
the absolute face |
Source code in core/manipulator/CubeState.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
|
mount_to_tool(self)
¶
Converts the coordinate system of a mounted cube into the tool coordinate system.
Source code in core/manipulator/CubeState.py
116 117 118 119 120 121 122 123 124 |
|
tool_to_mount(self)
¶
Converts the coordinate system of a gripped cube into the mount coordinate system.
Source code in core/manipulator/CubeState.py
104 105 106 107 108 109 110 111 112 |
|