Using ROS2 with OmniBot V2

This page introduces ROS2 Humble in a practical way for OmniBot V2 developers. The goal is not only to help you run commands, but to understand why ROS2 is powerful and how OmniBot V2 is designed to take advantage of that ecosystem.

Why ROS2 Matters on OmniBot V2

ROS2 gives you a standard communication framework for robotics software. Instead of writing one monolithic program, you compose behavior from interoperable nodes that exchange messages over topics, transforms, services, and actions.

With OmniBot V2, this means you can:

For OmniBot-specific nodes, see the Drivers page. This ROS2 page focuses on core framework workflows you will use every day.

Environment Setup (ROS2 Humble)

OmniBot V2 is designed for Ubuntu 22.04 with ROS 2 Humble.

In each new terminal:

source /opt/ros/humble/setup.bash
source ~/ros2_ws/install/setup.bash

If your package is not built yet:

cd ~/ros2_ws
colcon build --symlink-install
source install/setup.bash

ROS2 Graph Basics

A quick mental model:

Essential CLI Tooling

Discover topics

ros2 topic list

Common OmniBot-related topics you will often see:

Inspect topic type and publishers/subscribers

ros2 topic info /odom
ros2 topic info /scan

Echo live message data

ros2 topic echo /odom
ros2 topic echo /scan

For a single sample:

ros2 topic echo --once /odom

Measure publish frequency

ros2 topic hz /odom
ros2 topic hz /scan

Publish test commands

You can manually send motion commands to test the command path:

ros2 topic pub --rate 10 /cmd_vel geometry_msgs/msg/Twist "{linear: {x: 0.1}, angular: {z: 0.0}}"

Always test at low speed in a safe area.

Topic Remapping (Core ROS2 Skill)

Remapping lets you adapt node interfaces without modifying source code.

Example: remap teleop output from /cmd_vel to /cmd_vel_recv so a safety node can evaluate and forward to /cmd_vel:

ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r /cmd_vel:=/cmd_vel_recv

General remap pattern:

--ros-args -r <from_topic>:=<to_topic>

This is one of the most useful ROS 2 capabilities when integrating OmniBot V2 with custom pipelines.

Understanding Key OmniBot Topics

/cmd_vel (commanded velocity)

/odom (odometry)

Check one message:

ros2 topic echo --once /odom

Check update rate:

ros2 topic hz /odom

/scan (2D lidar scan)

Check scan rate:

ros2 topic hz /scan

TF2: The Coordinate Frame System

TF2 describes how frames relate over time. For mobile robots, this is foundational.

Typical OmniBot frame chain:

Why this matters:

Useful TF commands:

ros2 run tf2_ros tf2_echo odom base_link
ros2 topic echo --once /tf
ros2 topic echo --once /tf_static

Important rule: only one node should publish each transform relationship (for example, odom -> base_link).

RViz: Visual Debugging and Validation

RViz is your main visualization and debugging tool for ROS 2.

Launch:

rviz2

Recommended displays when validating OmniBot bring-up:

  1. TF
  2. LaserScan (topic: /scan)
  3. Odometry (topic: /odom)
  4. RobotModel (if URDF is loaded)
  5. Map (when SLAM/Nav2 map is available)

Typical workflow:

  1. Set Fixed Frame (map or odom, depending on your stack state)
  2. Confirm TF tree is connected
  3. Confirm scan data aligns with expected geometry
  4. Confirm odometry updates smoothly while moving

Nav2 provides autonomous goal-based navigation using planners, controllers, behavior trees, and lifecycle-managed nodes.

Typical prerequisites:

Start Nav2 with a map (example):

ros2 launch nav2_bringup bringup_launch.py use_sim_time:=false map:=/home/gyropalm/maps/omnibot_lab.yaml

Open Nav2 RViz config:

rviz2 -d $(ros2 pkg prefix nav2_bringup)/share/nav2_bringup/rviz/nav2_default_view.rviz

In RViz:

  1. Set 2D Pose Estimate to initialize localization
  2. Send a Nav2 Goal to command autonomous motion

OmniBot V2 also supports convenience launch files in the OmniBot package for mapping and navigation workflows.

High-Value ROS2 Tools to Learn Next

Quick Troubleshooting

If behavior is not as expected:

  1. Confirm environment is sourced (/opt/ros/humble and workspace install/setup.bash)
  2. Confirm expected nodes are running (ros2 node list)
  3. Confirm key topics exist and are active (ros2 topic list, ros2 topic hz)
  4. Confirm TF connectivity and frame names
  5. Confirm only one publisher owns each critical transform chain
  6. Validate command path from input source to /cmd_vel

Final Takeaway

The strength of OmniBot V2 is not just the hardware. It is the combination of robust hardware plus a ROS2-native software interface that lets you inspect, customize, and scale behavior with industry-standard tools. Once you are comfortable with topics, TF2, RViz, and Nav2, you can build advanced autonomy workflows quickly and with confidence.