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:
- ROS2 package (
omnibot2) for controller and integration nodes - Serial device aliasing (
udev+systemd) so ports remain stable across reboots and reconnects - Microcontroller firmware interfaces (ESP32-based subsystems) for motors, lidar, and power/control peripherals
- Standard ROS2 tooling for visualization, teleoperation, safety filtering, mapping, and navigation
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:
- Accepts commanded velocity input
- Sends wheel-motion commands to the motor control subsystem
- Reads wheel feedback and publishes odometry (
/odom) - Optionally publishes
odom -> base_linkTF
TF Ownership Rule
Only one node should publish odom -> base_link.
- If using controller-only odometry, leave TF publishing enabled (default)
- If using EKF (
robot_localization) to fuse IMU and odom, disable controller TF publishing:
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:
- Input commands on
/cmd_vel_recv - Safety filtering using
/scan - Safe output commands on
/cmd_vel
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:
/web_goal/web_cancel_nav
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
- Devices are first detected under generic
esp32_<ttyUSB>aliases. - A
systemdservice runsidentify_esp32.pyon USB events and system startup. - 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:
- Set
serial_portto/dev/esp32_lidar - Configure valid range (
range_min,range_max) for your environment - Publish static TF from
base_linkto lidar frame (example Z offset0.65 mwhen mounted at that height)
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:
- Launch camera node (
usb_cam) - Rectify frames (
image_proc) - 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:
- Verify
/odomis publishing:
ros2 topic echo --once /odom
- Verify odometry rate:
ros2 topic hz /odom
- Verify lidar scan:
ros2 topic hz /scan
- Verify only one node owns
odom -> base_linkTF
Notes on Reliability and Safety
- Keep serial aliases enabled in production deployments.
- Do not run multiple competing velocity publishers unless intentionally multiplexed.
- Do not run multiple TF broadcasters for the same transform chain.
- For teleoperation, cap speed to conservative values during validation and testing (i.e. 0.3 meters /sec or less)
- Safety filtering reduces risk but does not eliminate collision risk. In some cases, safety filtering may provide a false sense of security in unique cases where lidar is physically unable to sense (e.g. glass walls or reflective panels). Always be mindful when operating the robot.
- As per the disclaimer, by operating OmniBot V2, the end-user accepts full risk and responsibility for their actions when driving the robot.