Skip to main content

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.

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

The execution result is shown below:

hello world

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!