Dynamix — The simulation platform for complex robotic systemsNarendran Muraleedharan
Narendran Muraleedharan
narendran.m@aptusai.com
Published on Thu May 21 2020

Four years ago, two of my robotics professors at University — Dr. Iacopo Gentilini and Dr. Douglas Isenberg, told me that they had an interesting idea to emulate a free-floating environment on Earth. They were occupied with a lot of other work, and thus wanted me to develop the system. I was a junior working on my undergraduate degree in Aerospace engineering with a minor in robotics, and I was fascinated! The idea was to place a target satellite or space robot on a force-torque sensor which in turn was on the end-effector of a robotic platform. The theory was that if the forces and torques at the end-effector were “zero”, then there is no loss or gain of energy and we conserve linear and angular momentum. This is the definition of a free-floating environment. Our plan was to drive the end-effector of the robotic platform such that we regulate the forces and torques measured by the force-torque sensor by a gravity-compensated zero vector. Such a system would save space agencies billions of dollars in hardware testing costs and mission failures due to lack of testing.

The project itself was a lot of fun, and took up a lot of my time. I definitely skipped a lot of classes to work on this, and I even worked on it during the summers. I was eventually offered to continue working on this as part of my Master’s Thesis in return for a full scholarship. I obviously said yes. You can read my papers on the project including my Master’s Thesis on our research page.

We were originally going to simulate and validate a planar system where gravity was not an issue. The system had a very complex dynamix coupling. Motion of the space robot’s manipulators resulted in a dynamic response for the platform’s joints and vice versa. I had the system equations of motion modeled in MATLAB like we learned for a simple SCARA manipulator during our robotic systems modeling class. I was able to simulate the system and the force-feedback controller with a very basic 2D plotting interface. The problem was that MATLAB being a scripting language, it was ridiculously slow. On the machine I was working with (8-core Intel i7, 64 GB RAM), it took around 20 minutes to simulate 30 seconds at a millisecond simulation time step. This made it very difficult to test different control techniques and tune the control system parameters. I looked at ROS, Gazebo and some open source physics engines but found it almost impossible to define complex dynamical models. I needed flexibility.

The Birth of Dynamix

By that time, I had already spent quite a bit of time developing for FlightGear Flight Simulator, and have developed in C++ and played around with OpenSceneGraph. When I went home for the summer of 2015, I decided to develop a custom simulation platform for the robot. By the end of the summer, the simulator had just a basic integrator, 3D graphics visualizer and a basic scripting interface. It was bare metal, but it was able to simulate my robotic system in real-time on the same machine. That means it took less than 1 minute to simulate 1 minute. In fact, it could actually simulate about 15 minutes every minute. Over the next two years I worked on the project, I optimized the performance even further. The final system simulated for the spatial gravity-compensated free-floating environment emulator had 53 degrees of freedom! The entire suite of Monte-Carlo simulations we needed to run would’ve taken MATLAB over a year and a half to simulate. I was able to simulate it with the custom program in just under a week!

While at University, I also worked on a spherical robot project (also on our research page). After we started Aptus, we worked with a few different clients with some very unique dynamic systems. For all of these projects, this program was the perfect tool to simulate and develop control systems.

It was originally hosted in a repository I called RobotSim, but the name was changed to Dynamix shortly after. While using it to develop control systems for these projects, we added a ton more functionality. We made it very “easy” to define custom models, added a very powerful scripting interface through Lua, added the ability to simulate sensors including optical and added more integrator options.

A Powerful Simulation Platform

Dynamix was created due to the need for a flexible, high performance simulation platform. There are a few good robotic simulators out there that are feature-rich and allow for developing kinematic controllers and navigation algorithms. Dynamix is not for that. Dynamix is designed for roboticists that live for a good challenge. Dynamix is meant to be used to develop unique and complex robotic systems. Dynamix let’s you define the system model by literally entering the equations of motion as a function. You’re not limited by serial links or a node drag-drop system. You define the equations yourself. This also means you better know how to derive those equations! (But don’t worry, I wrote an article last month on how to do just that)

Here is a list of features that Dynamix already has:

  • Powerful and flexible dynamical model definition — define your equations of motion in C++ code

  • Newton-Euler recursive dynamics algorithm — define DH parameters for serially linked robots (or combine with custom code!)

  • Feature-rich 3D graphics visualization

  • Lua interpreter to allow for testing without re-compiling model

  • Easy-to-use “dmx” format to define the model, animations and parameters

  • Open-source sensor models for IMUs, distance sensors, cameras etc.

  • Interface with external GNU plot for live plotting

  • Property tree to manage variables and data between languages

  • Detailed API reference for C++ and Lua functionality

Our team at Aptus is also developing additional features for the next version of Dynamix:

  • Built-in internal live plotting interface

  • LiDAR sensor model and functionality

  • Carnegie Robotics MultiSense S7 sensor model and functionality

  • Line follower sensor model and functionality

  • Console functionality — start custom scripts, make property tree calls etc. during run time

  • Python interpreter for scripting in addition to Lua

  • Automatic updates

Release to the Public

Until now, this project has been private and limited to within our company. However, due to the interest and potential to help other roboticists, we have decided to make a public release very soon. Dynamix is a very powerful tool and can save companies a lot of money in high performance simulation and testing. We will release it for commercial use under a licensing agreement. However, we will be providing a free license to hobbyists. The free license will include the full-featured platform functionality — you just can’t use it for commercial purposes.

We wanted to make the research early this month but we’re spending more time on documentation and cleaning up the program. We expect to have an initial release by the end of the month! We’ll then continue to develop the remaining functionality we’re working on and stage that for release sometime during the second quarter of the year.

I’ve very excited to finally get this powerful program to help as many roboticists as it can!

We’re also looking to learn more about what others can possibly use this for! What features do you want to see in Dynamix? Are there any sensors or robots you’re working with that you’d like to simulate? Let us know! Feel free to contact us to let us know if you have anything you’d like to contribute or anything you’re looking for in the simulator. I look forward to hearing from you!