module documentation

Units and poses: what a TF transform is in OPC UA terms and back.

Function inverted Return the pose that undoes one: if the pair is the transform T, this is T inverse.
Function _as_transform Return one OPC UA pose as the transform ROS2 wants.
Constant _LEVEL Undocumented
Constant _ORIGIN Undocumented
Constant _ZERO Undocumented
def inverted(position: Position, orientation: Orientation) -> tuple[Position, Orientation]:

Return the pose that undoes one: if the pair is the transform T, this is T inverse.

For an integrator who knows where an object sits in some frame and has to publish the opposite link, because a ROS2 frame has one parent (map -> odom from the robot's pose in the map). It lives on this side of the seam because it constructs opensmi types.

Parameters
position:PositionWhere the frame sits, in metres.
orientation:OrientationHow it is turned, as A, B and C in degrees.
Returns
tuple[Position, Orientation]The inverse pose, in the same units.
def _as_transform(position: Position, orientation: Orientation) -> Transform:

Return one OPC UA pose as the transform ROS2 wants.

Metres stay metres and degrees become a unit quaternion through ~opensmi.ros2.server.spatial.rotation, the inverse of the inward conversion.

_LEVEL =

Undocumented

Value
Orientation(0.0, 0.0, 0.0,
            unit=DEGREES)
_ORIGIN =

Undocumented

Value
Pose(_ZERO, _LEVEL)
_ZERO =

Undocumented

Value
Position(0.0, 0.0, 0.0,
         unit=METRES)