Skip to content

rerun-io/cpp-example-ros-bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

ros-bridge-spot.mp4

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, and sensor_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.