Skip to main content

5.1.4 Run "Hello World"

Prerequisite: TogetheROS.Bot has been successfully installed via DEB package or source code installation.

Start two terminals, both ssh logged into the RDK or X86 platform device.

Run in the first terminal

source /opt/tros/setup.bash
ros2 run examples_rclcpp_minimal_subscriber subscriber_member_function

Run in the second terminal

source /opt/tros/setup.bash
ros2 run examples_rclcpp_minimal_publisher publisher_member_function

The running effect is shown below

hello world You can see the left terminal acts as pub, continuously sending "'Hello, world! N", and the right terminal acts as sub, continuously receiving "'Hello, world! N"

OK, tros.b has been successfully installed and verified!