Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ROS 2 bridge example #6163

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions examples/cpp/ros2_bridge/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!--[metadata]
title = "ROS 2 bridge"
source = "https://github.com/rerun-io/cpp-example-ros2-bridge"
tags = ["2D", "3D", "Pinhole camera", "ROS", "Time series", "C++"]
thumbnail = "https://static.rerun.io/carla_thumbnail/8ec07c28f8eb901b8246afdd0b6d2b97ff75fb8d/480w.png"
thumbnail_dimensions = [480, 480]
-->

A proof-of-concept Rerun bridge for ROS 2 that subscribes to all supported topics and visualizes the messages in Rerun.

https://vimeo.com/940929187?autoplay=1&loop=1&autopause=0&background=1&muted=1&ratio=2696:1552

## Background

This is an example that shows how to use Rerun's C++ API to log and visualize [ROS 2](https://www.ros.org/) 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](https://github.com/rerun-io/cpp-example-ros2-bridge/tree/main/rerun_bridge/launch) directory for usage examples.

## Run the code

This is an external example, check the [repository](https://github.com/rerun-io/cpp-example-ros2-bridge) for more information.

In a nutshell, clone the repo and run a demo with:

```
pixi run carla_example
```
4 changes: 3 additions & 1 deletion examples/cpp/ros_bridge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ thumbnail = "https://static.rerun.io/ros_bridge/121f72ebaea57a1b895196a5587fd1a4
thumbnail_dimensions = [480, 480]
-->

A proof-of-concept Rerun bridge for ROS 1 that subscribes to all supported topics and visualizes the messages in Rerun.

## Background

This is an example that shows how to use Rerun's C++ API to log and visualize [ROS](https://www.ros.org/) messages.
Expand All @@ -28,7 +30,7 @@ This is an external example, check the [repository](https://github.com/rerun-io/
In a nutshell, clone the repo and run a demo with:

```
pixi run example
pixi run {spot_,drone_}example
```

Note that this example currently supports Linux only.
2 changes: 2 additions & 0 deletions examples/manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ examples = [
# display order, most interesting first
"ros_node",
"nuscenes_dataset",
"ros2_bridge",
"ros_bridge",
"kiss-icp",
"urdf_loader",
Expand Down Expand Up @@ -102,6 +103,7 @@ Integration with 3rd party tools, formats, libraries, and APIs.
examples = [
# display order, most interesting first
"ros_node",
"ros2_bridge",
"ros_bridge",
"urdf_loader",
"vrs",
Expand Down
Loading