WIP - MILOU: Mapping & Inertial Legged Odometry Unit
Mapping & Inertial Legged Odometry Unit: bringing ROS 2 and LiDAR SLAM to my Open Quadruped

This project builds on my Open Quadruped build. In fall 2024 at BU’s RASTIC facility, I built the Open Quadruped originally designed by Maurice Rahme and Adham Elarabawy, got it walking in the ARENA, and then worked with Professor Kenn Sebesta on a round of redesigns. We gave the legs multi-material construction with PETG gear teeth to stop the belts skipping, swapped the tensioners for brass rods, enlarged the battery compartment, reorganized the electronics bay, and standardized the hardware on M3. That version of the robot walked well, but it was effectively blind: it could follow a gait, but it had no sense of where it was or what was around it. MILOU is my effort to change that, giving the robot a LiDAR, a camera, and the software to build a map of its surroundings.
New Eyes
The first step was mechanical. I designed two new mounts for the redesigned body: one on the top-front for an LDROBOT LD19 2D LiDAR, and one at the front for an Arducam IMX219 camera. The LiDAR mount had a stricter requirement than it first appears. The 2D SLAM algorithms I plan to use assume a level scan plane, so the sensor’s spin axis must be truly vertical when the robot is standing. Both mounts drop into the existing chassis without disturbing the rest of the build.
Below are videos of the pre-existing motion capabilities of MILOU:
Why ROS 2
The harder problem was software. When I first brought the robot up, getting the original ROS 1 stack to run was the hardest part of the build. It meant chasing outdated libraries, juggling package versions, and at one point replacing the Fortran compiler. Upstream development stopped in 2020, and ROS 1 reached end-of-life in May 2025. Meanwhile, every tool I wanted for mapping and navigation, including Nav2, SLAM Toolbox, and the drivers for my new sensors, now lives in ROS 2. Building new perception work on a platform with no future made little sense, so I decided to port the stack to ROS 2 Jazzy, which I chose over the newest release for its more mature ecosystem.
Porting the Stack
The port is currently underway. Before touching any code, I audited the codebase to work out what actually depended on ROS, and that audit shrank the job considerably. The gait generator, inverse kinematics, and trained policy turned out to be pure Python with no ROS dependencies, so they carry over untouched. The Pi-to-Teensy link was a bigger surprise. In my original post, I described it as ROSSerial, since that’s what the files are named. After tracing it properly, I found the commands and sensor data actually travel over a custom ASCII serial protocol, so the Teensy firmware doesn’t need to change; only the Python wrapper on the Pi side does. I also found that the robot’s ros_control configuration was used only by the Gazebo simulation. On the real robot, joint angles are computed directly and streamed to the Teensy, so ros2_control sits entirely off the critical path for hardware.
What remains is the robot’s main ROS package, and I’m working through it in layers. Jazzy targets Ubuntu 24.04, so the Pi is moving to a fresh install. I’m keeping the original SD card as a known-good fallback. On top of that, the build system moves from catkin to ament and colcon, and the package’s seven custom messages and calibration service are regenerated under ROS 2’s interface system, which is stricter about how message fields are named.
The nodes themselves are the bulk of the work: about 490 lines of C++ for the state machine and teleop, and about 840 lines of Python for the hardware interface, sensor interface, and servo calibration.
Porting them is less about renaming API calls than about adapting to ROS 2's program structure. Each node becomes a class built on the ROS 2 node type. The old fixed-rate while loops become timer callbacks run by an executor. Parameters are declared explicitly rather than pulled from a global server, and every publisher and subscriber gets an explicit quality-of-service profile. Along the way, I’m also clearing out leftover Python 2 scripts that sat alongside the Python 3 code.
The most important node is the hardware interface. It loads the gait and policy, computes joint angles every control cycle, writes them to the Teensy, and reads IMU and foot-contact data back over the same serial line. I’m restructuring it so those reads can’t stall the control loop. I'm converting the XML launch files to Python launch files with YAML parameter files. For teleop, I’m porting the original node rather than swapping in a generic package, because its mode switching and e-stop logic are worth keeping. My rule for the whole port is simple: the robot has to walk under ROS 2 exactly as it did before anything new goes on top.
Perception
Once it does, the new sensors come online. Each gets its own frame in an updated URDF, with the robot state publisher as the single source of truth for the transform tree. That avoids the conflicts that arise when sensor drivers publish their own transforms. The LD19 publishes laser scans through its ROS 2 driver, and the IMX219 runs through camera_ros, the modern libcamera-based path for CSI cameras on a Pi. Those feed SLAM Toolbox for mapping and, eventually, Nav2 for autonomous navigation.
Odometry Without Wheels
The most interesting problem in the project is state estimation. SLAM needs an odometry estimate to work from, and a legged robot has no wheel encoders to provide one, so I have to synthesize it from other sources. Each has its own weakness:
IMU: the BNO055 from the original build gives good short-term orientation, but drifts almost immediately when used for position.
Leg odometry: computing body motion through the kinematics of whichever legs are on the ground avoids that drift, but only works if the robot knows exactly when each foot is in contact.
LiDAR scan matching: comes almost for free once the LD19 is running.
Visual-inertial odometry: from the camera, planned as a later refinement.
My baseline is to fuse these with an extended Kalman filter. The direction I’m most excited about, though, is a contact-aided invariant EKF, where foot contact, tied to the gait phase, becomes an explicit measurement in the filter. That’s the same family of estimators used on the MIT Mini Cheetah. It also turns the feet into a genuine design problem. The original hall-effect contact sensors are undocumented, and I’m weighing hall-effect, force-sensitive-resistor, strain-gauge, and current-sensing replacements.
Where It Stands
MILOU walks reliably on its original stack, the new sensor mounts are in place, and the ROS 2 port is in progress. Once it walks under ROS 2, I’ll bring the LiDAR and camera online, get mapping working, and move on to state estimation, where I expect the most interesting results. I’ll update this post as each piece comes together.
Thanks again to Maurice Rahme and Adham Elarabawy for the open-source foundation this is built on, and to Professor Kenn Sebesta for his help with the redesigns that made it possible.




Comments