5.1.4 Hello World
Prerequisite: TogetheROS.Bot has been successfully installed via either the deb package or source code.
Open two terminals and SSH into your RDK or x86 platform device in both.
- Foxy
- Humble
Run the following in the first terminal:
source /opt/tros/setup.bash
ros2 run examples_rclcpp_minimal_subscriber subscriber_member_function
Run the following in the second terminal:
source /opt/tros/setup.bash
ros2 run examples_rclcpp_minimal_publisher publisher_member_function
Install the packages corresponding to the "Hello World" example:
sudo apt update
sudo apt install ros-humble-examples-rclcpp-minimal-publisher ros-humble-examples-rclcpp-minimal-subscriber
If the sudo apt update command fails or returns an error, please refer to the FAQ section Common Issues, specifically Q10: How to resolve failures or errors when running apt update? for solutions.
Run the following in the first terminal:
source /opt/tros/humble/setup.bash
ros2 run examples_rclcpp_minimal_subscriber subscriber_member_function
Run the following in the second terminal:
source /opt/tros/humble/setup.bash
ros2 run examples_rclcpp_minimal_publisher publisher_member_function
The execution result is shown below:

As shown, the left terminal acts as the publisher (pub), continuously sending "'Hello, world! N", while the right terminal acts as the subscriber (sub), continuously receiving "'Hello, world! N".
Great! tros.b has now been successfully installed and verified!