Kod*Lab Mjbots SDK
Developing an opensource SDK for creating dynamic legged machines using the Mjbots motor controllers
The goal of this project was to find an open source alternative to commercially available high performance BLDC motor driver + control frameworks. After discovering Mjbots which satisfied the hardware needs, the goal shifted to creating an SDK which allowed for communication at 1kHz with the motors, logging, and the ability to communicate with the robot from a laptop. This project served as an opportunity for me to explore modern C++, concurrency, and realtime computing. The resulting SDK can be found here: https://github.com/KodlabPenn/kodlab_mjbots_sdk
The kodlab_mjbots_sdk’s main features are:
- Cross compiling support from ubuntu 20.04 to Raspberry pi
- Integration with NYU realtime_tools library:https://github.com/machines-in-motion/real_time_tools for better realtime performance
- Integration with LCM (https://lcm-proj.github.io/) for remote logging and remote input to the robot
- The
MjbotsControlLoop
object which handles the structure of the control loop for the easy creation of new behaviors - The
MjbotsRobotInterface
which provides a convenient interface for communicating with any number of moteus motor controllers at 1 kHz
In order to test the SDK we used it to develop a simple demo hopper. The source code for the demo hopper can be found here: https://github.com/KodlabPenn/kodlab_mjbots_sdk/blob/master/examples/leg_example.cpp
Going forward I aim to add support for limb level control to the MjbotsRobotInterface
and allow for sending PD commands to the motors in addition to just torques.