PROJECT · SOFTWARE

Your first ROS 2 application

Build an original publisher/subscriber pair from a complete downloadable workspace.

The outcome

Build an original publisher/subscriber pair from a complete downloadable workspace.

TimerString publisherROS topicSubscriber log
An original overview of the information or commissioning sequence.
Verification boundary

Documented target: Ubuntu 24.04 · ROS 2 Jazzy · Gazebo Harmonic where used. Browser labs tested; ROS/Ubuntu/hardware execution not performed here.

Before you begin

  • Ubuntu 24.04 + ROS 2 Jazzy
  • colcon and development tools
  • Two sourced terminals

Prepare with Nodes, packages and workspaces, Publish and subscribe with meaningful messages.

Download project files →

Build, observe, explain.

1

Build the starter

Extract the ZIP into a new directory; build from the directory containing src.

first-ros2-application-1.txt
source /opt/ros/jazzy/setup.bash
colcon build --symlink-install
source install/setup.bash

Expected: A successful nexviora_demo package build.

2

Run both nodes

Start in separate terminals after sourcing the same workspace.

first-ros2-application-2.txt
ros2 run nexviora_demo talker
# Other terminal:
ros2 run nexviora_demo listener

Expected: Sequential Nexviora messages reach the listener.

3

Inspect and change

Change the timer in talker.py, rebuild and compare.

first-ros2-application-3.txt
ros2 topic hz /nexviora/status
ros2 topic info /nexviora/status --verbose

Expected: Observed rate reflects the timer subject to scheduling.

Troubleshooting

Executable not found
Check console_scripts entries, rebuild and source.
Listener silent
Check exact topic, type, QoS and domain.

Take it further

  • Use structured sensor messages.
  • Add a launch file and second namespace.

Documentation and next steps

Explore another project · Return to learning · Report a project issue