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

# Sub

> Mark a method parameter as a Zenoh subscriber

```python theme={null}
from grid_nexus_program import Sub
```

Mark a method parameter as a Zenoh subscriber.

The parameter will subscribe to `robot/&#123;robot_id&#125;/&#123;topic&#125;`
and must receive fresh data every cycle for the method to fire.

Can be used as a bare class (`image=Sub`) in which case the topic
suffix defaults to the parameter name, or instantiated with a custom
topic suffix (`image=Sub("camera/rgb")`).

## Constructor

```python Signature theme={null}
Sub(topic: str | None = None)
```


## Related topics

- [CortexHubClient](/python-api/grid-cortex-client/cortexhubclient.md)
- [ROS2 Communication](/simulation/isaac/comms.md)
- [GRID Cortex Client](/models/cortex.md)
