Sensor Functions
1. Sensor capabilities
1.1. Overall framework
1.2. Parameter configuration and queries
1.2.1. Service overview
| Service | Description | service_type | Configuration notes | Details |
|---|---|---|---|---|
| /set_camera_option | Dynamically set camera options (gain/exposure/brightness/white_balance, etc.). Send the complete camera_options.json; route by sensor_id to the sensor plugin's ApplySensorOptionFromJson() | rcl_interfaces/srv/SetParameters | SetParameters request; the first parameter's string_value carries the full JSON | JSON / Schema |
| /sensor/sensor_vla_camera/sensor_version | Query versions of all registered sensors, including firmware and device models | robby_sensor_msgs/srv/GetSensorVersions | Service name is formed dynamically from module_name; each RobbySensorCenter process has a unique service name | JSON / Schema |
1.3. Service
1.3.1. Communication JSON: set_camera_option
{
"channels": {
"set_camera_option_rpc": {
"type": "hybrid_rpc",
"hybrid_rpc": {
"service_prefix": "/",
"enable_shm": false,
"enable_ros2": true,
"auto_route": false,
"default_timeout_ms": 2000
},
"ros2": {
"service_prefix": "/",
"service_type": "rcl_interfaces/srv/SetParameters"
}
}
}
}
Invocation method: set_camera_option. Concatenate service_prefix and method for the full service name. This is an RFrame client integration template; Sensor Center registers the server using native ROS2. The 2000 ms client timeout is an example, not a server guarantee.
Service name: The code registers the relative name set_camera_option, which resolves to /set_camera_option in the default root namespace. Adjust it for ROS namespaces or remapping. The node's standard parameter service /SensorCenterNode0x54/set_parameters does not replace this application callback.
1.3.1.1. Type Schema
Type: rcl_interfaces/srv/SetParameters
Source: rcl_interfaces
# A list of parameters to set.
Parameter[] parameters
---
# Indicates whether setting each parameter succeeded or not and why.
SetParametersResult[] results
1.3.1.2. Type Schema
Type: rcl_interfaces/msg/Parameter
Source: rcl_interfaces
# This is the message to communicate a parameter. It is an open struct with an enum in
# the descriptor to select which value is active.
# The full name of the parameter.
string name
# The parameter's value which can be one of several types, see
# `ParameterValue.msg` and `ParameterType.msg`.
ParameterValue value
uint8 type
bool bool_value
int64 integer_value
float64 double_value
string string_value
byte[] byte_array_value
bool[] bool_array_value
int64[] integer_array_value
float64[] double_array_value
string[] string_array_value
1.3.1.3. Type Schema
Type: rcl_interfaces/msg/SetParametersResult
Source: rcl_interfaces
# A true value of the same index indicates that the parameter was set
# successfully. A false value indicates the change was rejected.
bool successful
# Reason why the setting was either successful or a failure. This should only be
# used for logging and user interfaces.
string reason
Request JSON structure (string_value payload):
{
"camera_set_option": [
{
"sensor_id": "0x1",
"color": {
"gain": 0,
"brightness": 0,
"exposure": 156,
"white_balance": 3800,
"gamma": 150,
"auto_exposure": false,
"auto_white_balance": false
},
"depth": {
"gain": 20,
"exposure": 4500,
"auto_exposure": false,
"laser_contrl_bool": true
},
"ir": {
"gain": 20,
"exposure": 4500,
"brightness": 0,
"auto_exposure": false
}
}
]
}
Invocation example
# Set sensor_id=0x1 Color stream exposure to 156 and disable auto-exposure
ros2 service call /set_camera_option rcl_interfaces/srv/SetParameters \
"{parameters: [{name: 'camera_option', value: {type: 4, string_value: '{\"camera_set_option\": [{\"sensor_id\": \"0x1\", \"color\": {\"exposure\": 156, \"auto_exposure\": false}}]}'}}]}"
Semantics: The request is standard SetParameters; the first parameter's string_value contains the complete camera_options.json. The callback parses the camera_set_option array and routes by sensor_id to the sensor plugin's ApplySensorOptionFromJson(). Fields in color / depth / ir sections can be set independently; send only those being changed.
1.3.2. Communication JSON: sensor_version
{
"channels": {
"sensor_version_rpc": {
"type": "hybrid_rpc",
"hybrid_rpc": {
"service_prefix": "/sensor/sensor_vla_camera/",
"enable_shm": false,
"enable_ros2": true,
"auto_route": false,
"default_timeout_ms": 2000
},
"ros2": {
"service_prefix": "/sensor/sensor_vla_camera/",
"service_type": "robby_sensor_msgs/srv/GetSensorVersions"
}
}
}
}
Invocation method: sensor_version. Concatenate service_prefix and method for the full service name. This is an RFrame client integration template; Sensor Center registers the server using native ROS2. The 2000 ms client timeout is an example, not a server guarantee.
1.3.2.1. Type Schema
Type: robby_sensor_msgs/srv/GetSensorVersions
Source: RTypes: robby_sensor_msgs/srv/GetSensorVersions.srv
# GetSensorVersions.srv
# Request
string sensor_type # Sensor type
---
# Response
bool success # Whether the request succeeded
string version # Version information in JSON format
Response JSON structure:
{
"HeadMonoDepthCamera": {
"firmware_ver":"1.6.00",
"hw_ver":"0.1",
"sn":"CP2BC53000H3"
},
"LeftWristMonoDepthCamera": {
"firmware_ver":"1.0.70",
"hw_ver":"0.1",
"sn":"CV2R46P0005T"
}
}
Invocation example
# Query versions of all sensors under the current module
ros2 service call /sensor/sensor_vla_camera/sensor_version robby_sensor_msgs/srv/GetSensorVersions "{sensor_type: ''}"
Semantics: The request includes sensor_type, but the current Sensor Center callback does not read or filter by it. The response contains success and version. With no version records, success=false and version is empty. Otherwise success=true; devices expected to provide a version but unavailable have null values. version is a JSON string keyed by sensor_tag (the unique sensor identifier), with values containing firmware_ver, hw_ver, and sn.
1.3.3. Main configuration
Configuration path: /opt/robby/robby-sensor-center/config/robby_r2_fun/sensor_center/sensor_global_cam_pvt.json
After editing the configuration, restart robby-sensor-center.service (sudo systemctl restart robby-sensor-center.service).
| Field | Type | Default | Meaning | Options / examples |
|---|---|---|---|---|
sync_enable | bool | false | Enable multi-camera hardware synchronization. Cameras use hardware triggers for frame-level synchronization | true (enabled) / false (disabled) |
sync_mode | string | None | Synchronization role, effective only when sync_enable=true | "slave" (slave synchronization) / "master" (outputs trigger signals) / "sw_trigger" (software trigger) |
enable_color | bool | false | Enable the Color stream | true / false |
enable_depth | bool | false | Enable the Depth stream | true / false |
enable_ir | bool | false | Enable IR streams, including Left IR and Right IR | true / false |
time_src | string | "system_time" | Frame timestamp source: system or camera hardware time for each frame's time_stamp | "system_time" (host time) / "camera_time" (camera global timestamp getGlobalTimeStampUs()) |
d2c_enable | bool | true | Enable Depth-to-Color spatial alignment. Align depth coordinates to color coordinates; requires both streams | true (aligned) / false (unaligned) |
filter_max_diff | int32 | 256 | Maximum difference threshold for depth noise filtering. Sets OrbbecSDK OB_PROP_DEPTH_NOISE_REMOVAL_FILTER_MAX_DIFF_INT; adjacent-pixel depth differences exceeding it are treated as noise and removed | 256 (default) / 128 (stricter) / 512 (looser) / 0 (off) |
filter_max_speckle_size | int32 | 300 | Maximum speckle size for depth noise filtering. Sets OB_PROP_DEPTH_NOISE_REMOVAL_FILTER_MAX_SPECKLE_SIZE_INT; contiguous noise regions larger than this are removed | 300 (default) / 150 (more aggressive) / 600 (more conservative) / 0 (off) |
tegra_jpeg | bool | false | Use NVIDIA Tegra hardware JPEG encoding (ARM64/Orin only). Color stream encoding uses GPU hardware acceleration to reduce CPU load | true (Tegra hardware encoding) / false (CPU encoding) |
color_width | int | 0 | Color stream width in pixels | 1280 / 640 / 848 / 1920 |
color_height | int | 0 | Color stream height in pixels | 720 / 480 / 530 / 1080 |
color_fps | int | 0 | Target Color frame rate (fps). In hw_trigger mode, code forces it to 10 | 30 / 10 / 15 / 60 |
depth_width | int | 0 | Depth stream width in pixels | 1280 / 640 / 848 / 800 |
depth_height | int | 0 | Depth stream height in pixels | 720 / 480 / 530 / 576 |
depth_fps | int | 0 | Target Depth frame rate (fps). In hw_trigger mode, code forces it to 10 | 30 / 10 / 15 / 60 |
Field dependencies:
sync_modeapplies only whensync_enable=true.d2c_enable=truerequires bothenable_color=trueandenable_depth=true.
| Model | Brand |
|---|---|
| Gemini 335L | Orbbec |
| Gemini 335 | Orbbec |
| Gemini 335 | Orbbec |
| Gemini 305L | Orbbec |
| Gemini 305 | Orbbec |
| Femto Bolt | Orbbec |
| RealSense D405 | Intel |
| RealSense D415 | Intel |
| RealSense D435 | Intel |
| RealSense D455 | Intel |
Note: 335 and 305 are treated as equivalent (305 can replace 335). RealSense cameras are matched by SN; any device supported by librealsense2 can run. The code does not enforce a model-level allowlist.