|
nros C API
Lightweight ROS 2 client for embedded real-time systems
|
nros_support_init() reads these at startup when locator is NULL:
| Variable | Description | Default |
|---|---|---|
ROS_DOMAIN_ID | ROS 2 domain ID | 0 |
NROS_LOCATOR | Router address (tcp/…, udp/…, or tls/…). Legacy alias: ZENOH_LOCATOR. | tcp/127.0.0.1:7447 |
NROS_SESSION_MODE | Session mode: client or peer. Legacy alias: ZENOH_MODE. | client |
ZENOH_TLS_ROOT_CA_CERTIFICATE | Path to CA certificate (PEM) for TLS | — |
ZENOH_TLS_ROOT_CA_CERTIFICATE_BASE64 | Base64-encoded CA cert (bare-metal) | — |
Set these environment variables before cmake --build. After changing a value, delete CMakeCache.txt and rebuild to force the new values to take effect.
| Variable | Description | Default |
|---|---|---|
NROS_EXECUTOR_MAX_CBS | Max executor callback slots (shared with Rust API) | 4 |
NROS_SUBSCRIPTION_BUFFER_SIZE | Per-entity receive buffer size (shared with Rust API) | 1024 |
NROS_LET_BUFFER_SIZE | Buffer size for LET semantics per handle | 512 |
NROS_MAX_CONCURRENT_GOALS | Max concurrent goals per action server | 4 |
NROS_MAX_PARAMETERS | Max parameters in parameter server | 32 |
NROS_MAX_PARAM_NAME_LEN | Max parameter name length | 64 |
NROS_MAX_STRING_VALUE_LEN | Max string parameter value length | 256 |
NROS_MAX_ARRAY_LEN | Max parameter array length | 32 |
NROS_MAX_BYTE_ARRAY_LEN | Max byte array parameter length | 256 |
| Variable | Description | Posix | Embedded |
|---|---|---|---|
ZPICO_FRAG_MAX_SIZE | Max reassembled message size | 65536 | 2048 |
ZPICO_BATCH_UNICAST_SIZE | Max unicast batch before fragmentation | 65536 | 1024 |
ZPICO_BATCH_MULTICAST_SIZE | Max multicast batch size | 8192 | 1024 |
ZPICO_SUBSCRIBER_BUFFER_SIZE | Per-subscriber buffer in zenoh shim | 1024 | 1024 |
ZPICO_SERVICE_BUFFER_SIZE | Per-service-server buffer in zenoh shim | 1024 | 1024 |
| Variable | Description | Posix | Embedded |
|---|---|---|---|
XRCE_TRANSPORT_MTU | Transport MTU (also sizes stream buffers) | 4096 | 512 |
XRCE_BUFFER_SIZE | Per-entity static buffer size | 1024 | 1024 |
XRCE_STREAM_HISTORY | Reliable stream history depth (>= 2) | 4 | 4 |
Increase zenoh defrag to 128 KB for large point clouds:
After changing any ZPICO_* or XRCE_* variable, clean the transport build cache: