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

Added README.md for demo_cpp_nodes_native #597

Merged
Merged
Changes from 2 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
46 changes: 46 additions & 0 deletions demo_nodes_cpp_native/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
## **What Is This?**

This demo provides an example of creating and running a ROS 2 node using the native **rmw_fastrtps_cpp** API directly, rather than doing so through vanilla **rclcpp**.
cardboardcode marked this conversation as resolved.
Show resolved Hide resolved

## **Build**

```bash
colcon build --packages-up-to demo_nodes_cpp_native
```

## **Run**

```bash
ros2 run demo_nodes_cpp_native talker
```

## **Verify**

When executed correctly, the following strings should be printed to the terminal similar to what is shown below:

```bash
[INFO] [1674525877.083735645] [talker_native]: eprosima::fastdds::dds::DomainParticipant * 94193367466752
[INFO] [1674525877.084105822] [talker_native]: eprosima::fastdds::dds::DataWriter * 94193370040688
[INFO] [1674525877.584006930] [talker_native]: Publishing: 'Hello World: 1'
[INFO] [1674525878.083967966] [talker_native]: Publishing: 'Hello World: 2'
[INFO] [1674525878.583917242] [talker_native]: Publishing: 'Hello World: 3'
[INFO] [1674525879.083963276] [talker_native]: Publishing: 'Hello World: 4'
[INFO] [1674525879.583918839] [talker_native]: Publishing: 'Hello World: 5'
#...
```

## **FAQ**

`Q`: Why use native `rmw_fastrtps_cpp` API directly, instead of using `rclcpp`?

`A`: Doing so would allow for better fault isolation and debugging. However, it would be with the obvious drawback of having to include `rmw_fastrtps_cpp` dependency manually.

`Q`: Is it still called `Fast RTPS`?

`A`: No. `Fast RTPS` has been renamed to `Fast DDS` since `ROS 2 Foxy`.

## **References**

1. [Fast DDS](https://www.eprosima.com/index.php/products-all/eprosima-fast-dds)
2. [What Is RTPS?](https://www.eprosima.com/index.php/resources-all/whitepapers/rtps)
3. [Fast RTPS Becomes Fast DDS in Foxy](https://discourse.ros.org/t/fast-rtps-becomes-fast-dds-in-foxy/15020/2)