ROS 2 driver
A reconnect-capable ROS 2 node for live UWB range, TDOA position, serial events, and device health.
Download source (.zip) · View on GitHub
Includes opentags_driver, opentags_msgs, launch files, configuration, and tests under Apache-2.0. No source-access request is needed.
Build
The package targets ROS 2 Jazzy. First install and source ROS 2 Jazzy, and install colcon and rosdep. Extract the ZIP into an empty workspace. From the directory containing ros2/, run:
rosdep install --from-paths ros2 --ignore-src -r -y
colcon build --base-paths ros2 --symlink-install
source install/setup.bash
A checkout of the website repository also includes ros2/; the same commands work from its root. Parser and serial-loopback tests run automatically before publication. A full ROS 2 Jazzy build and physical-device acceptance run have not yet been recorded.
Run
For distance, flash one initiator and one responder using the quickstart; connect the responder to ROS and keep the initiator powered. For location, finish the anchor survey and configuration, then connect only the mobile tag.
Disconnect the browser and other serial readers. On Linux, use ls -l /dev/serial/by-id/ to find the stable device path and replace the example below. If access is denied, check serial-port group permissions; changes to group membership require signing out and back in.
ros2 launch opentags_driver driver.launch.py \
port:=/dev/serial/by-id/your-opentag
In another terminal, source ROS 2 and this workspace's install/setup.bash again, then check the output:
# Distance firmware:
ros2 topic echo /opentags/range
# Or location firmware:
ros2 topic echo /opentags/position
# Device connection and freshness:
ros2 topic echo /diagnostics
Published topics
| Topic | Type | Contents |
|---|---|---|
/opentags/range | opentags_msgs/msg/RangeMeasurement | Distance in metres, sequence, exchange time, and the legacy RSSI field (first-path power). |
/opentags/position | geometry_msgs/msg/PointStamped | TDOA position in metres. |
/opentags/position_raw | opentags_msgs/msg/PositionMeasurement | Position, sequence, and raw TDOA values. |
/opentags/events | std_msgs/msg/String | INFO, DIAG, PHY, MISS, OK, and error records. |
/diagnostics | diagnostic_msgs/msg/DiagnosticArray | Connection, freshness, parsing, sequence gaps, and device data. |
sensor_msgs/Range defines only ultrasound and infrared radiation values, not UWB. Set publish_sensor_range:=true only when an existing consumer requires that message and your application accepts the mapping.
Command services
Each service returns success when the command is written, not when the device confirms it. Check replies on /opentags/events. INFO works with both modes; PING and RESET_STATS are distance-firmware commands and return an error on the current location tag.
ros2 service call /opentags_driver/ping std_srvs/srv/Trigger
ros2 service call /opentags_driver/request_info std_srvs/srv/Trigger
ros2 service call /opentags_driver/reset_statistics std_srvs/srv/Trigger
Configuration and calibration
The launch file exposes port, frame_id (default opentag), and publish_sensor_range. For other settings, edit the included YAML file and run the node from the workspace root:
ros2 run opentags_driver opentags_driver --ros-args \
--params-file ros2/opentags_driver/config/driver.yaml \
-p port:=/dev/serial/by-id/your-opentag
The driver does not restore browser/Python calibration, configure anchors, or publish a TF transform. Verify the device's calibration before starting ROS. A frame ID labels the measurements; your robot must provide the transform from the surveyed frame to its own map.
Failure behavior
- The node reconnects after cable removal, device reset, or serial errors.
- Malformed records are counted and discarded without terminating the node.
- Sequence gaps, missed exchanges, stale data, and host queue drops appear in diagnostics.
- TDOA position uses the surveyed anchor geometry configured for the target environment.
If diagnostics are live but the measurement topic is silent, verify the selected device role and use /opentags/events to inspect MISS records. Sequence-gap estimates remain ambiguous across long outages and device resets.