simulo.Pose
Represents a 6-DOF pose (position + orientation).
Attributes:
xyz— Position as (x, y, z)quat_wxyz— Orientation as quaternion (w, x, y, z)
Example:
# Using named argumentspose = Pose(position=[0.5, 0.3, 0.7], orientation=[1, 0, 0, 0])
# Using raw attributespose = Pose(xyz=(0.5, 0.3, 0.7), quat_wxyz=(1, 0, 0, 0))
# Position only (identity rotation)pose = Pose.from_xyz(0.5, 0.3, 0.7)Real usage: Pose.identity() is how the shipped training apps place a robot at the origin; Pose(position=...) is how cartpole_eval places a prop off to the side:
self.robot = simulo.Robot(asset=cartpole, initial_pose=simulo.Pose.identity())
prop = simulo.Entity.primitive.cuboid( name="marker_post", size=(0.3, 0.3, 0.5), pose=simulo.Pose(position=(0.0, 1.5, 0.25)),)simulo.Pose( xyz: Tuple[float, float, float] = (0.0, 0.0, 0.0), quat_wxyz: Tuple[float, float, float, float] = (1.0, 0.0, 0.0, 0.0), *, position: Optional[Tuple[float, float, float]] = None, orientation: Optional[Tuple[float, float, float, float]] = None,)from_xyz()
Section titled “from_xyz()”Pose.from_xyz(x: float, y: float, z: float) -> Poseclassmethod
Create a pose with only position (identity rotation).
Args:
x— X coordinatey— Y coordinatez— Z coordinate
Returns:
Pose with specified position and identity rotation
identity()
Section titled “identity()”Pose.identity() -> Poseclassmethod
Create an identity pose (origin with identity rotation).
Returns:
Identity pose
to_translation()
Section titled “to_translation()”Pose.to_translation() -> Tuple[float, float, float]Get translation component.
Returns:
(x, y, z) tuple
to_orientation()
Section titled “to_orientation()”Pose.to_orientation() -> Tuple[float, float, float, float]Get orientation component as quaternion.
Returns:
(w, x, y, z) quaternion tuple