OmniBot V2 Drivers

This page describes how OmniBot V2 interfaces with its onboard hardware through ROS2 drivers, serial device mapping, and core control nodes. It is written to help you understand the software-hardware boundary and bring the robot online reliably.

Driver Stack Overview

OmniBot V2 uses a layered driver model:

At runtime, host-side ROS2 nodes exchange commands and telemetry with onboard controllers over UART while preserving stable device names such as /dev/esp32_motors and /dev/esp32_lidar.

Core Driver Components

omnibot2_controller (base driver)

The omnibot2_controller node is the primary base driver. It:

TF Ownership Rule

Only one node should publish odom -> base_link.

ros2 run omnibot2 omnibot2_controller --ros-args -p disable_publish_tf:=true

Default behavior is equivalent to:

ros2 run omnibot2 omnibot2_controller --ros-args -p disable_publish_tf:=false

lidar_safety_field (safety gate)

lidar_safety_field evaluates incoming motion commands against lidar geometry and blocks unsafe commands that would move the robot toward near obstacles.

Typical flow:

This driver-level safety gate is helpful for teleoperation workflows but is not a substitute for responsible operation.

gyropalm_control_recv (wearable receiver bridge)

This node receives control data from the GyroPalm receiver and publishes ROS 2 drive commands. When using lidar safety gating, set this node to output on /cmd_vel_recv. Using an ESP32 microcontroller, such as the M5StickC Plus or a typical ESP32, this node can be used to drive ROS2 robots either in simulation or real environments.

web_goal_bridge (web to Nav2 bridge)

This node extends RosBridge-based control by adding goal-oriented navigation topics for browser clients:

Stable USB/Serial Driver Mapping

Multiple onboard devices can share similar USB identifiers. To prevent random /dev/ttyUSB* assignment from breaking launches, OmniBot V2 uses automatic aliasing by analyzing the incoming serial data when a device is plugged in.

How It Works

  1. Devices are first detected under generic esp32_<ttyUSB> aliases.
  2. A systemd service runs identify_esp32.py on USB events and system startup.
  3. The script listens to device data signatures and assigns final aliases (for example, /dev/esp32_motors, /dev/esp32_lidar).

Install Auto-Aliasing

From the package scripts directory:

chmod +x setup_identify_esp32.sh
sudo ./setup_identify_esp32.sh

This installs required Python dependency (pyserial if missing), creates the identify-esp32 service, and installs the needed udev rules.

Uninstall Auto-Aliasing

chmod +x uninstall_identify_esp32.sh
sudo ./uninstall_identify_esp32.sh

List Current Devices

chmod +x list_devices.sh
sudo ./list_devices.sh

Bring-Up: Build and Run

Before first build:

rosdep install --from-paths src --ignore-src -r -y

Build and run:

colcon build --symlink-install
source install/setup.bash
ros2 run omnibot2 omnibot2_controller

Lidar Driver Integration (Slamtec S2)

OmniBot V2 commonly uses the sllidar_ros2 package for Slamtec S2.

Key integration points:

After configuration, launch with:

ros2 launch sllidar_ros2 sllidar_s2_launch.py

For quick visualization:

ros2 launch sllidar_ros2 view_sllidar_s2_launch.py

Camera and Vision Driver Path

For the front USB camera pipeline:

  1. Launch camera node (usb_cam)
  2. Rectify frames (image_proc)
  3. Consume rectified stream for perception (for example AprilTag detection)

Example:

ros2 launch usb_cam camera.launch.py
ros2 run image_proc image_proc --ros-args -r image:=/camera1/image_raw -r camera_info:=/camera1/camera_info
ros2 run image_view image_view --ros-args -r image:=/image_rect

RosBridge Driver Interface

RosBridge allows external clients to publish and subscribe over WebSocket.

Launch:

ros2 launch rosbridge_server rosbridge_websocket_launch.xml address:=0.0.0.0

Then optionally start:

ros2 run omnibot2 web_goal_bridge

This enables browser-based drive and navigation integration while preserving ROS-native control nodes onboard.

Driver Validation Checklist

After bring-up, validate these first:

  1. Verify /odom is publishing:
ros2 topic echo --once /odom
  1. Verify odometry rate:
ros2 topic hz /odom
  1. Verify lidar scan:
ros2 topic hz /scan
  1. Verify only one node owns odom -> base_link TF

Notes on Reliability and Safety