Skip to content

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 arguments
pose = Pose(position=[0.5, 0.3, 0.7], orientation=[1, 0, 0, 0])
# Using raw attributes
pose = 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,
)
Pose.from_xyz(x: float, y: float, z: float) -> Pose

classmethod

Create a pose with only position (identity rotation).

Args:

  • x — X coordinate
  • y — Y coordinate
  • z — Z coordinate

Returns:

Pose with specified position and identity rotation

Pose.identity() -> Pose

classmethod

Create an identity pose (origin with identity rotation).

Returns:

Identity pose

Pose.to_translation() -> Tuple[float, float, float]

Get translation component.

Returns:

(x, y, z) tuple

Pose.to_orientation() -> Tuple[float, float, float, float]

Get orientation component as quaternion.

Returns:

(w, x, y, z) quaternion tuple