> ## Documentation Index
> Fetch the complete documentation index at: https://docs.generalrobotics.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# PoseClient

## PoseClient

Inherits from: [`ZenohClient`](/robot-api/reference/sim/zenoh/base_client/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`](/robot-api/reference/sim/zenoh/base_client/ZenohClient): `getLatestMessage`, `msg_cb`, `run`, `publish`, `stop`

### **init**

```python theme={null}
PoseClient.__init__(client_dict, agent_dict = None, shared_session = None)
```

Initialize the pose client.

<ResponseField name="Arguments">
  <ParamField query="client_dict (dict)" type="dict" required>
    Configuration dictionary for the client
  </ParamField>

  <ParamField query="agent_dict (dict, optional)" type="dict, optional">
    Dictionary of agent parameters. Defaults to None.
  </ParamField>

  <ParamField query="shared_session" type="">
    Optional shared Zenoh session. Defaults to None.
  </ParamField>
</ResponseField>

### publish\_pose

```python theme={null}
PoseClient.publish_pose(position, orientation)
```

Publish a pose message.

<ResponseField name="Arguments">
  <ParamField query="position (array-like)" type="array-like" required>
    Position as \[x, y, z]
  </ParamField>

  <ParamField query="orientation (array-like)" type="array-like" required>
    Orientation as quaternion \[x, y, z, w]
  </ParamField>
</ResponseField>

### get\_pose

```python theme={null}
PoseClient.get_pose() -> Optional[tuple]
```

Get the latest pose message.

<ResponseField name="Returns">
  <ResponseField name="tuple" type="Optional[tuple]">
    (position, orientation) as numpy arrays or None
  </ResponseField>
</ResponseField>

### process\_latest\_msg

```python theme={null}
PoseClient.process_latest_msg()
```

Process the latest received pose message.

### publish\_agent\_pose

```python theme={null}
PoseClient.publish_agent_pose()
```

Publish the current pose of the connected agent.

### get\_position

```python theme={null}
PoseClient.get_position()
```

Get the current position.

### get\_orientation

```python theme={null}
PoseClient.get_orientation()
```

Get the current orientation.

<ResponseField name="Returns">
  <ResponseField name="numpy.ndarray" type="">
    Current orientation as quaternion \[x, y, z, w]
  </ResponseField>
</ResponseField>
