Skip to main content

PoseClient

Inherits from: ZenohClient A Zenoh client for handling pose messages. This class inherits from ZenohClient and provides functionality for publishing and receiving pose messages over Zenoh topics. Attributes: position (numpy.ndarray): Current position as [x, y, z] orientation (numpy.ndarray): Current orientation as quaternion [x, y, z, w] relative (bool): Whether poses are relative to current position blocking (bool): Whether pose commands block until complete

Inherited methods

  • From ZenohClient: getLatestMessage, msg_cb, run, publish, stop

init

PoseClient.__init__(client_dict, agent_dict = None, shared_session = None)
Initialize the pose client.
Arguments
client_dict (dict)
dict
required
Configuration dictionary for the client
agent_dict (dict, optional)
dict, optional
Dictionary of agent parameters. Defaults to None.
shared_session
Optional shared Zenoh session. Defaults to None.

publish_pose

PoseClient.publish_pose(position, orientation)
Publish a pose message.
Arguments
position (array-like)
array-like
required
Position as [x, y, z]
orientation (array-like)
array-like
required
Orientation as quaternion [x, y, z, w]

get_pose

PoseClient.get_pose() -> Optional[tuple]
Get the latest pose message.
Returns
tuple
Optional[tuple]
(position, orientation) as numpy arrays or None

process_latest_msg

PoseClient.process_latest_msg()
Process the latest received pose message.

publish_agent_pose

PoseClient.publish_agent_pose()
Publish the current pose of the connected agent.

get_position

PoseClient.get_position()
Get the current position.

get_orientation

PoseClient.get_orientation()
Get the current orientation.
Returns
numpy.ndarray
Current orientation as quaternion [x, y, z, w]