Skip to content

Commit 77e3fdb

Browse files
authored
Set Micro XRCE-DDS RMW on tutorials (#311)
1 parent c93ce3e commit 77e3fdb

5 files changed

Lines changed: 14 additions & 11 deletions

File tree

_docs/tutorials/core/first_application_linux/index.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,15 @@ To give micro-ROS access to the ROS 2 dataspace, run the agent:
7474
ros2 run micro_ros_agent micro_ros_agent udp4 --port 8888
7575
```
7676

77-
And then, in another command line, run the micro-ROS node (remember sourcing the ROS 2 and micro-ROS installations):
77+
And then, in another command line, run the micro-ROS node (remember sourcing the ROS 2 and micro-ROS installations, and setting the RMW Micro XRCE-DDS implementation):
7878

7979
```bash
80-
source /opt/ros/foxy/setup.bash
80+
source /opt/ros/$ROS_DISTRO/setup.bash
8181
source install/local_setup.bash
8282

83+
# Use RMW Micro XRCE-DDS implementation
84+
export RMW_IMPLEMENTATION=rmw_microxrcedds
85+
8386
# Run a micro-ROS node
8487
ros2 run micro_ros_demos_rclc ping_pong
8588
```
@@ -96,7 +99,7 @@ each:
9699
```bash
97100
cd microros_ws
98101

99-
source /opt/ros/foxy/setup.bash
102+
source /opt/ros/$ROS_DISTRO/setup.bash
100103
source install/local_setup.bash
101104

102105
ros2 run micro_ros_demos_rclc ping_pong

_docs/tutorials/core/zephyr_emulator/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Finally, in order to run the micro-ROS node inside of the Zephyr RTOS emulator,
7777
open a new command shell and execute the flash step by means of the flashing command:
7878

7979
```bash
80-
source /opt/ros/foxy/setup.bash
80+
source /opt/ros/$ROS_DISTRO/setup.bash
8181
source install/local_setup.bash
8282

8383
# Flash/run step

_includes/first_application_common/build_system.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Once you have a ROS 2 installation in the computer, follow these steps to instal
1515

1616
```bash
1717
# Source the ROS 2 installation
18-
source /opt/ros/foxy/setup.bash
18+
source /opt/ros/$ROS_DISTRO/setup.bash
1919

2020
# Create a workspace and download the micro-ROS tools
2121
mkdir microros_ws

_includes/first_application_common/test_app_host.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Open a new command line. We are going to listen to the `ping` topic
66
with ROS 2 to check whether the micro-ROS Ping Pong node is correctly publishing the expected pings:
77

88
```bash
9-
source /opt/ros/foxy/setup.bash
9+
source /opt/ros/$ROS_DISTRO/setup.bash
1010

1111
# Subscribe to micro-ROS ping topic
1212
ros2 topic echo /microROS/ping
@@ -35,7 +35,7 @@ So, first of all, let's subscribe with ROS 2 to the `pong` topic from a new shel
3535
(notice that initially we don't expect to receive any pong, since none has been sent yet):
3636

3737
```bash
38-
source /opt/ros/foxy/setup.bash
38+
source /opt/ros/$ROS_DISTRO/setup.bash
3939

4040
# Subscribe to micro-ROS pong topic
4141
ros2 topic echo /microROS/pong
@@ -44,7 +44,7 @@ ros2 topic echo /microROS/pong
4444
And now, let's publish a `fake_ping` with ROS 2 from yet another command line:
4545

4646
```bash
47-
source /opt/ros/foxy/setup.bash
47+
source /opt/ros/$ROS_DISTRO/setup.bash
4848

4949
# Send a fake ping
5050
ros2 topic pub --once /microROS/ping std_msgs/msg/Header '{frame_id: "fake_ping"}'

_includes/first_application_common/test_app_rtos.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Open a new command line. We are going to listen to the `ping` topic
77
with ROS 2 to check whether the micro-ROS Ping Pong node is correctly publishing the expected pings:
88

99
```bash
10-
source /opt/ros/foxy/setup.bash
10+
source /opt/ros/$ROS_DISTRO/setup.bash
1111

1212
# Subscribe to micro-ROS ping topic
1313
ros2 topic echo /microROS/ping
@@ -36,7 +36,7 @@ So, first of all, let's subscribe with ROS 2 to the `pong` topic from a new shel
3636
(notice that initially we don't expect to receive any pong, since none has been sent yet):
3737

3838
```bash
39-
source /opt/ros/foxy/setup.bash
39+
source /opt/ros/$ROS_DISTRO/setup.bash
4040

4141
# Subscribe to micro-ROS pong topic
4242
ros2 topic echo /microROS/pong
@@ -45,7 +45,7 @@ ros2 topic echo /microROS/pong
4545
And now, let's publish a `fake_ping` with ROS 2 from yet another command line:
4646

4747
```bash
48-
source /opt/ros/foxy/setup.bash
48+
source /opt/ros/$ROS_DISTRO/setup.bash
4949

5050
# Send a fake ping
5151
ros2 topic pub --once /microROS/ping std_msgs/msg/Header '{frame_id: "fake_ping"}'

0 commit comments

Comments
 (0)