> ## 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.

# VelocityClient

> VelocityClient

```python theme={null}
from grid_sim_client.isaac import VelocityClient
```

## Constructor

```python Signature theme={null}
VelocityClient(
    *,
    client_dict: dict,
    agent_dict: Optional[dict] = None,
    shared_session: Any = None,
)
```

## Methods

### `getLatestMessage()`

```python Signature theme={null}
getLatestMessage() -> Any
```

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.

### `msg_cb()`

```python Signature theme={null}
msg_cb(sample: Any) -> None
```

Handle an incoming Zenoh sample by storing its payload in the queue.

<ParamField body="sample" required>
  The Zenoh sample received from the subscription.
</ParamField>

### `process_latest_msg()`

```python Signature theme={null}
process_latest_msg() -> Optional[Tuple[np.ndarray, np.ndarray]]
```

### `publish()`

```python Signature theme={null}
publish(data: bytes) -> None
```

Publish data to the topic.

<ParamField body="data" required>
  Raw bytes to publish on the configured topic.
</ParamField>

### `publish_velocity()`

```python Signature theme={null}
publish_velocity(
    linear_velocity: np.ndarray,
    angular_velocity: Optional[np.ndarray] = None,
) -> None
```

### `run()`

```python Signature theme={null}
run() -> None
```

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

### `stop()`

```python Signature theme={null}
stop() -> None
```

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


## Related topics

- [RemoteRobot](/python-api/grid-nexus-client/remoterobot.md)
- [MDP Config](/simulation/isaac/session_configuration/mdp.md)
- [Customizing RL Training](/simulation/isaac/reinforcement-learning/customizing-training.md)
- [Overview](/simulation/isaac/teleoperation/overview.md)
- [Sensors](/simulation/isaac/sensors.md)
