cpp-example-ros-bridge
                                
                                 cpp-example-ros-bridge copied to clipboard
                                
                                    cpp-example-ros-bridge copied to clipboard
                            
                            
                            
                        An example implementation of a ROS to Rerun bridge
C++ Example: ROS Bridge
This is an example that shows how to use Rerun's C++ API to log and visualize ROS messages.
It works by subscribing to all topics with supported types, converting the messages, and logging the data to Rerun. It further allows to remap topic names to specific entity paths, specify additional timeless transforms, and pinhole parameters via an external config file. See the launch directory for usage examples.
https://github.com/rerun-io/cpp-example-ros-bridge/assets/9785832/fcdf62ad-89f3-47c6-8996-9bc88a5bfb70
This example is built for ROS 1. For more ROS examples, also check out the ROS 2 example, and the URDF data-loader.
NOTE: Currently only
geometry_msgs/{PoseStamped,TransformStamped},nav_msgs/Odometry,tf2_msgs/TFMessage, andsensor_msgs/{Image,CameraInfo,Imu}are supported. However, extending to other messages should be straightforward.
Compile and run using pixi
The easiest way to get started is to install pixi.
The pixi environment described in pixi.toml contains all required dependencies, including rosbags, and the Rerun viewer. To run the drone example use
pixi run drone_example
and to run the Spot example use
pixi run spot_example
Compile and run using existing ROS environment
If you have an existing ROS workspace and would like to add the Rerun node to it, clone this repository into the workspace's src directory and build the workspace.