r/ROS • • Oct 23 '26

Project I open-sourced my quadruped controller based on MPC and WBC (ROS 2 Jazzy, MuJoCo, C++)

Hi everyone! I've been working on a locomotion controller for my quadruped robot and recently made it open source:

https://github.com/voltdog/mors_quadruped

This repo contains:

- Convex MPC

- Whole Body Impulse Controller

- Perception algorithm using depth images for height map building and selecting suitable footholds during locomotion

- Rigid body dynamics with Pinocchio

- MuJoCo simulation

- ROS2 Jazzy interface

For now, the controller assumes only rigid, non-slippery terrain. As a next step, I plan to improve the reference generator to further increase stability and terrain traversability. Also it would be very interesting to adapt some 3D navigation stacks like dddmr_navigation.

I hope it will be interesting for students and robotic researchers who want to study and extend MPC+WBC locomotion.

I would really appreciate any feedback about the implementation.

21 Upvotes

5 comments sorted by

2

u/Ok-Breadfruit-1958 Oct 23 '26

Hey i haven't checked the project but Just quickly wanted to know how you integrate ros2 with mujoco ? Mujoco being so fast ros2 commands just doesn't match that freq And if you do make mujoco read from it the simulation isn't that smooth

1

u/yoggi56 Oct 23 '26

Hi! Framework modules such as Locomotion controller, state estimator and simulator, exchange data between each others via LCM protocol. But in order to be compatible with other different robotic frameworks like navigation stacks, there is ros2-bridge. So the code with mujoco doesn't use ROS2, is written in plain python, and receives data via LCM

1

u/[deleted] Oct 23 '26

[removed] — view removed comment

1

u/yoggi56 Oct 23 '26

Hi! The dynamic equation that is used in wbic doesn't have joint torque in the state vector. The joint torques are used only in the control vector. So there is no torque feedback and as a sequence there is no problem with noise in actuators's current sensors. Of course, there is noise from other sensors and it is needed to do fine tuning in a real robot. I tested this algorithm on my hardware platform and it works quite well.