Skip to main content
A Zenoh client for handling pose messages. This class inherits from ZenohClient and provides functionality for publishing and receiving pose messages over Zenoh topics.

Fields

numpy.ndarray
Current position as [x, y, z]
numpy.ndarray
Current orientation as quaternion [x, y, z, w]
bool
Whether poses are relative to current position
bool
Whether pose commands block until complete

Constructor

Signature
Initialize the pose client.
dict
required
Configuration dictionary for the client
dict, optional
Dictionary of agent parameters. Defaults to None.
Optional shared Zenoh session. Defaults to None.

Methods

getLatestMessage()

Signature
Return the most recent message from the subscription queue. Blocks for up to one second waiting for a message. Returns: The raw payload bytes of the latest message, or None if no message was received within the timeout.

get_orientation()

Signature
Get the current orientation. Returns: numpy.ndarray: Current orientation as quaternion [x, y, z, w]

get_pose()

Signature
Get the latest pose message. Returns: tuple: (position, orientation) as numpy arrays or None

get_position()

Signature
Get the current position.

msg_cb()

Signature
Handle an incoming Zenoh sample by storing its payload in the queue.
required
The Zenoh sample received from the subscription.

process_latest_msg()

Signature
Process the latest received pose message.

publish()

Signature
Publish data to the topic.
required
Raw bytes to publish on the configured topic.

publish_agent_pose()

Signature
Publish the current pose of the connected agent.

publish_pose()

Signature
Publish a pose message.
array-like
required
Position as [x, y, z]
array-like
required
Orientation as quaternion [x, y, z, w]

run()

Signature
Start the client by declaring a subscriber or publisher on the session.

stop()

Signature
Undeclare the subscriber and close the owned Zenoh session if any.