Atlas Robotics
ROS2 Humble

Atlas C1 — two-computer Mecanum robot, SLAM & Nav2 on ROS2 Humble

Atlas C1 — two-computer Mecanum robot, SLAM & Nav2 on ROS2 Humble

A four-wheel Mecanum (holonomic) mobile robot running ROS2 Humble on a two-computer architecture: a NUC mounted on the robot runs only the real-time hardware side (LiDAR, serial bridge to the ESP32, Mecanum kinematics), while a separate PC runs all of SLAM (slam_toolbox), localization (AMCL) and navigation (Nav2 with the MPPI controller). The ESP32 closes a per-wheel speed PID loop locally from encoders read by the hardware pulse counter (PCNT), and talks to the PC over its own binary serial frame — not a real CAN bus, despite what the class name suggests.

Source code for members

Project gallery

Atlas C1 — two-computer Mecanum robot, SLAM & Nav2 on ROS2 Humble
Atlas C1 — two-computer Mecanum robot, SLAM & Nav2 on ROS2 Humble
Atlas C1 — two-computer Mecanum robot, SLAM & Nav2 on ROS2 Humble
Atlas C1 — two-computer Mecanum robot, SLAM & Nav2 on ROS2 Humble

Version 2 gallery

Atlas C1 — two-computer Mecanum robot, SLAM & Nav2 on ROS2 Humble — Version 2
Atlas C1 — two-computer Mecanum robot, SLAM & Nav2 on ROS2 Humble — Version 2

Demo videos

Mapping & Nav2 demo — SLAM and autonomous navigation on Mecanum wheels

Version 2 demo video

Version 2 demo video

Behind the scenes

Assembling the Atlas C1 hardware

Note: this is a research prototype used to validate the hardware/software architecture of an autonomous mobile robot, not a finished commercial product. The project's original README explicitly documents the code as it currently is, including the unfinished parts; this page keeps that same spirit instead of presenting an idealized version.

How Atlas C1 differs from the other projects

The Mecanum robot proved that a Mecanum-wheel + ESP32 + Raspberry Pi 4 + Cartographer architecture works. Atlas C1 uses the same type of wheels and the same LiDAR family (YDLidar X3 Pro), but changes three important things: the onboard computer moves to a NUC (more powerful than a Raspberry Pi 4); the work is clearly split across 2 computers, with the robot running only the real-time hardware side and all SLAM/Nav2 computation moved to a separate PC on the same ROS domain; and the wheel speed loop becomes a local PID on the ESP32 based on encoders read by the hardware pulse counter (PCNT), instead of open-loop PWM output.

Compared with Atlas A2 (Jetson Orin Nano, YOLOv8, auto-docking, REST API), Atlas C1 is much simpler: no object detection, no automatic docking, no REST/WebSocket service layer. In exchange, Atlas C1 adds an odometry source that neither earlier project had: rf2o_laser_odometry, which estimates velocity directly from two consecutive LiDAR scans using range-flow scan matching. It is useful exactly when wheel encoders are least reliable (Mecanum wheel slip).

System architecture

Atlas C1 system architecture

The two computers share a single ROS domain (Wi-Fi/LAN). There is no separate message bridge; everything is regular ROS2 topics and services:

  • Robot (NUC, onboard): ydlidar_ros2_driver_node reads the LiDAR through /dev/ydlidar (a fixed udev symlink tied to the physical USB port) and publishes /scan; kinematic.py receives /cmd_vel and computes Mecanum inverse kinematics into RPM for the 4 wheels; ros_serial_bridge.py packs the RPM values into a binary frame (0x2a + 4-byte id + 8 data bytes + 0x23) and sends it to the ESP32 through /dev/esp32.
  • PC (control): robot_state_publisher/mecanum_joint_publisher build the robot model for RViz2; scan_relay forwards /scan to /atlas/scan_filtered for rf2o_laser_odometry to compute /atlas/odom; the joystick goes through twist_mux (priority: lateral > joystick > Nav2); atlas_slam runs slam_toolbox/AMCL/Nav2.

In short: the boundary between the 2 machines matches the real-time/non-real-time boundary seen in the other projects. The robot keeps only what must be fast (reading the LiDAR, building serial frames, the /cmd_vel watchdog), and everything compute-heavy (SLAM, Nav2, scan-matching odometry) is pushed to the PC.

Mecanum inverse kinematics and the local PID loop on the ESP32

kinematic.py applies exactly the 4×3 inverse kinematics matrix described in the article Differential Drive/Mecanum in AMR Drive System: [1,−1,−k; 1,1,k; 1,1,−k; 1,−1,k] with k = lx+ly, turning a Twist (vx, vy, ω) into an RPM for each wheel, with a watchdog that sets the RPM back to 0 if no /cmd_vel arrives for more than 1 second.

Instead of just outputting PWM proportional to the desired RPM (open loop), the ESP32 firmware (main.cpp, PlatformIO) reads the 4 wheel encoders with PCNT (pulse counter), the ESP32's hardware pulse-counting peripheral that costs no CPU polling, then runs a local speed PID loop for each wheel, comparing the target RPM from ROS with the measured speed and outputting 2 PWM channels per motor to an H-bridge driver. The whole PID loop runs closed on the microcontroller, following the real-time layering principle from Motor Control for AMRs: ROS does not need to (and should not) take part in this high-frequency control cycle.

SLAM, AMCL and Nav2: the familiar trio, with one notable limitation

atlas_slam uses the same trio seen in the other projects: slam_toolbox (mapping mode, a Karto-based pose graph with loop closing) to build the map, AMCL to localize on the saved static map, and Nav2 with planner_server running NavFn and controller_server running MPPI. The local costmap combines obstacle_layer + voxel_layer (from the LiDAR) + inflation_layer; the global costmap uses static_layer + speed_filter.

The notable point: even though the hardware has Mecanum wheels (holonomic, can move sideways) and lateral_teleop_node.py on the joystick side uses exactly that ability, the Nav2 configuration (atlas_nav2_mppi.yaml) sets motion_model: DiffDrive and locks vy_max = 0. This means Nav2 currently drives Atlas C1 like a two-wheel differential robot and does not use sideways motion during autonomous navigation. The holonomic ability is only really usable through the 2 manual strafe buttons on the joystick.

Known issues / limitations

The list below is taken from the project's own technical documentation; it reflects the real state of the code at the time of writing, not a list of theoretical risks:

IssueDetails
twist_mux does not receive Nav2 commandsNav2/collision_monitor publish directly to /cmd_vel, while twist_mux listens to the "navigation" branch on cmd_vel_nav, which no node publishes. Running Nav2 and the joystick at the same time can make both write to /cmd_vel directly.
No real wheel speed feedback to ROSVelinfo.msg and the encoder-tick sending code in the ESP32 firmware both exist but are commented out; the PID loop runs fully local and ROS does not know the actual wheel speeds.
Kinematic parameters differ between packageskinematic.py uses r=0.035, lx=0.085, ly=0.11; mecanum_joint_publisher.py (only for RViz display) uses R=0.049, Lx=0.11, Ly=0.15; they need to be checked against the real robot dimensions and unified.
Nav2 runs as diff-driveAs described above: motion_model: DiffDrive and vy_max=0 despite holonomic hardware.
Localization parameter file name mismatchThe launch file declares atlas_localization.yaml, but the actual file on disk is atlas_localization_c1.yaml, so running with the old name will not load the intended parameters; the default map also points to a path that does not exist.
RealSense sensor configured but not fittedThe global costmap and collision monitor declare a pointcloud source from /intel_realsense_r200_depth/points, but the current URDF has no camera; this hardware is planned for the future.
Leftover/unused codeThe c1_platform package is empty; the src/atlas_base submodule is not checked out; ESP32_code still contains many CAN-bus/RFID/UDP-debug files from another project's template that main.cpp does not include; atlas_cartographer_real.launch.py and the route_manager.py/route_tool.py tools (a PyQt5 GUI for drawing waypoints) are experiments, not part of the official operating workflow.

The actual hardware

From photos of the real robot: a two-tier frame of acrylic/plywood and metal, 4 Mecanum wheels, the LiDAR on a 3D-printed mount in the middle of the upper tier, the NUC beside it in its own 3D-printed base box, a Wi-Fi access point with 2 antennas used as the local network between the robot and the control PC, and a battery capacity/voltage display mounted at the edge of the frame, handy for a quick check without opening a cover or connecting software.

ComponentModel / detailsConnection
Frame & wheelsTwo-tier acrylic/plywood, 4 Mecanum wheels—
Onboard computerNUC—
MicrocontrollerESP32 (PlatformIO firmware)Serial 115200 baud (/dev/esp32)
LiDARYDLidar X3 Pro — 0.1–12m, 10HzSerial 115200 baud (/dev/ydlidar)
Motor driverH-bridge, 2 PWM channels per motorESP32 GPIO
EncodersRead with the ESP32's PCNT (pulse counter)—
NetworkWi-Fi access point with 2 antennasRobot ↔ PC (same ROS domain)
PowerBattery with a capacity/voltage display—

Version 2: acrylic frame, smaller size

Besides the version described above, the project has a Version 2 (photos, demo video and a full specification comparison at the top/bottom of the page). It keeps the whole two-computer software architecture and the local PID loop on the ESP32 described above, but significantly changes the mechanical frame and a few components: the frame moves almost entirely to acrylic combined with 3D-printed parts (LiDAR mount, onboard computer holder), the overall size shrinks to 32 × 26 × 23cm, and 6.8cm Mecanum wheels are mounted directly on JGA25, 130rpm motors with shaft encoders.

Unlike the first version, the encoders in Version 2 come integrated with the motor assembly instead of being mounted separately, but they are still read through PCNT on the ESP32 and feed the same local speed PID loop described above, with no changes needed in the firmware.

The onboard computer is no longer fixed to a NUC; a mini PC or Raspberry Pi can be fitted depending on the configuration, trading performance for lower cost and size, in line with Version 2's smaller frame. The network between the robot and the control PC also changes from the 2-antenna access point to a regular Tenda Wi-Fi router.

In short: Version 2 is more of a mechanical problem than a software one (smaller frame, different materials, motors with integrated encoders), while the ROS2 architecture, the PID loop on the ESP32 and the SLAM/AMCL/Nav2 trio stay the same. One thing to watch in practice: the 6.8cm wheel diameter and the smaller frame mean the wheel radius r and the wheel center distances lx, ly in kinematic.py must be measured and recalibrated for the new frame. Reusing the old kinematic parameters from the first version gives the wrong scale, exactly the kind of parameter mismatch listed under "Known issues / limitations" above.

Summary and next steps

Summary

Atlas C1 is a notable architectural variant within the project's line of Mecanum robot research: it keeps the core problem (SLAM + AMCL + Nav2 on ROS2 Humble) but tests 2 specific changes. It separates real-time computation (robot/NUC) from SLAM/Nav2 computation (a separate PC) instead of running everything on one machine like the Mecanum robot, and it closes the wheel speed loop with a local PID on the ESP32 instead of running open loop. The project's technical documentation is unusually transparent about what is unfinished, a rare good practice that tells anyone reading the code later exactly which parts to trust and which to fix before relying on them.

Next steps

  • Fix twist_mux: add a node that publishes cmd_vel_nav from the Nav2 output instead of letting Nav2 write directly to /cmd_vel, restoring the priority mechanism as designed.
  • Enable holonomic motion in Nav2: change motion_model from DiffDrive to an omnidirectional configuration and unlock vy_max so Nav2 actually uses the Mecanum wheels during autonomous navigation, not only when driving by hand.
  • Restore wheel speed feedback: re-enable the encoder-tick sending code in the ESP32 firmware and publish Velinfo.msg, so ROS can monitor the real wheel speeds instead of blindly trusting the local PID loop.
  • Unify the kinematic parameters: check the real robot dimensions and synchronize r, lx, ly between kinematic.py and mecanum_joint_publisher.py so the RViz model matches the real motion.
  • Clean up leftover code: remove the unused CAN-bus/RFID/UDP-debug files from ESP32_code, and decide whether to keep or drop the empty c1_platform package and the unchecked-out atlas_base submodule.

Specifications

OriginalVersion 2
Drive type4 Mecanum wheels (holonomic)4 Mecanum wheels (holonomic)
FrameTwo-tier acrylic/plywoodAcrylic + 3D-printed parts
Overall sizeNot measured / not published32 × 26 × 23cm
Mecanum wheelsDiameter not stated6.8cm diameter
MotorsModel not statedJGA25, 130rpm, with shaft encoder
MicrocontrollerESP32 — local per-wheel speed PID (encoders via PCNT)ESP32 — local per-wheel speed PID (encoders via PCNT)
Onboard computerNUC — LiDAR + ESP32 serial bridge + Mecanum kinematicsMini PC or Raspberry Pi (depending on build) — LiDAR + ESP32 serial bridge + Mecanum kinematics
Control computerSeparate PC — SLAM/AMCL/Nav2, RViz2, joystickSeparate PC — SLAM/AMCL/Nav2, RViz2, joystick
LiDAR sensorYDLidar X3 Pro — 0.1–12m, 10Hz, serial 115200 baudYDLidar X3 Pro — 0.1–12m, 10Hz, serial 115200 baud
Motor driverH-bridge, 2 PWM channels per motorH-bridge, 2 PWM channels per motor
ESP32 ↔ PC linkSerial 115200 baud, binary frame 0x2a…0x23Serial 115200 baud, binary frame 0x2a…0x23
Extra odometryrf2o_laser_odometry — range-flow scan matching from LiDARrf2o_laser_odometry — range-flow scan matching from LiDAR
NetworkWi-Fi access point with 2 antennasTenda Wi-Fi router
Operating systemUbuntu 22.04 LTSUbuntu 22.04 LTS
FrameworkROS2 HumbleROS2 Humble
SLAMslam_toolbox (pose graph, Karto, loop closing)slam_toolbox (pose graph, Karto, loop closing)
LocalizationAMCLAMCL
NavigationNav2 — NavFn planner, MPPI controller, behavior treeNav2 — NavFn planner, MPPI controller, behavior tree
Manual controlJoystick via twist_mux (priority: lateral > joystick > nav)Joystick via twist_mux (priority: lateral > joystick > nav)
Atlas C1 — two-computer Mecanum robot, SLAM & Nav2 on ROS2 Humble — Atlas Robotics