Simulation the solo8 robot : mim_control

We are a team of students attempting to recreate the solo8 project. We are using the master board and BLCM drivers.

We’ve been able to acquire and modify most of the hardware and have started looking at how to simulate the robot and generate trajectories.

At this point we have a computer running ubuntu 18.04 LTS with most of the packages required for programming and simulating the robot installed via the ubuntu_installation_scripts (GitHub - machines-in-motion/ubuntu_installation_scripts: Scripts for installing dependencies useful for programming robots).

By cloning and installing ($ pip3 install .) the bullet_utils and robot_properties_solo repositories, we are able to run the demo called However, this example has no controller implemented, so we assume that the next step is to figure out how to control the robot in the simulation.

We found the repository mim_control (GitHub - machines-in-motion/mim_control) that contains some generic controllers, but as of now we are struggeling with implementing them. We had hoped that we were able to try some of the demos contained there, but the repository seems to missing a file?

We are also unsure if this is the correct approach in getting closer to being able to control the robot in the simulation.

  1. Is there a file missing in the mim_control repository?
    1. If not, how should this be installed, so that the demos contained in mim_control and solo_walking can be executed? (We get an error stating ERROR: No matching distribution found for mim_control when trying to pip3 install . the solo_walking repository)
  2. Can you provide us with some instructions or pointers on how to implement the controllers defined in mim_control?
  3. Also, is this the correct approach at all or should we be focusing on something else? E.g. executing and modifying a different demo or learning how to write implement or own controller.

Any answers or help regarding these questions would be greatly appreciated.


Hi Kevin,

at this point the mim_control package needs to be build using a colcon workspace. You can find some description here 1.

mim_control contains basic controller but nothing that will get the robot to walk right out of the box. What you can do though is optimize a walking trajectory using the kino-dynamic-planner 2 and then reply them using the centroidal and impedance controller from the mim_control package.

Note that we are working on a walking demo but that is for solo12.

Does that make sense?


1 Like

In addition to this I would add that colcon doing the equivalent of:

cd mim_control
mkdir build
cd build
cmake ..
make install

the only tuning is that it does this operation to all cmake package it encounters in your “workspace”.

See this to understand what is colcon and why we use it: super_build_and_cmake · machines-in-motion/ Wiki · GitHub

And here on a simple reminder on how to use colcon: use_colcon · machines-in-motion/ Wiki · GitHub

1 Like

Thank you for the quick replies!

I still cannot seem to be able to run any of the examples in mim_control. I’ve tried building with colcon and with make install, but I am still not able to import mim_control from anywhere but the src folder it is located in.

The steps I’ve taken are as follows:

Made a folder to work in:
mkdir mim_control_demos
cd mim_control_demos

Cloned the mim_control repository using treep
git clone git clone
treep --clone MIM_CONTROL

The mim_control_demos folder now looks like this:

  • treep_machines_in_motion
    • Config files for dowloading code base
  • workspace
    • src
      • googletest
      • mim_control
      • mpi_cmake_modules
      • pybind11
      • yaml_utils

I’ve tried building inside mim_control_demos as described in the Readme located in the mim_control repository :

colcon build

I’ve also tried bulding inside the workspace, src and mim_control folders.

Whenever I try running one of the demos :
cd ~/mim_control_demos/workspace/src/mim_control/demos
source /opt/openrobots/setup.bash
python demo_robot_impedance

I still get an error stating:
ModuleNotFoundError: No module named ‘mim_control’

This is a pretty minor problem stemming from missing something fundemental about building python packages, I’m sure.

Even after being able to run the demos, I am still not sure how to go about optimizing a trajectory using the kino-dynamic-planner. Can you point me to any reading material that could be helpful in understanding how to do this?


Hi Kevin,

besides sourcing the source /opt/openrobots/setup.bash, did you also source your install/setup.bash at the top of your workspace?

BTW, you might want to use the following command to build as by default colcon build creates a slower debug build:

colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release

Let me know if that helps,

Thank you, Julian!

source install/setup.bash
did the trick.

I was missing some more dependencies, but I was able to resolve them with the same method. We’re now able to run all the demos, in the mim_control and kino_dynamic_opt repos.

However, we are still unsure of how the process of planning and executing simple motions should look like. We have very little experience with the relevant python packages (ROS, pinocchio, etc…) and are therefore struggling with getting an overview of the entire process. In that regard, we have some more questions :

The motions in the kino_dynamic_opt repository seems to be entirely described by the different config files, like this one cfg_solo8_trot.yaml. (?) As of right now we see no way of learning how we should develop our own motion in such a config file, or if that is even the correct way of developing different motions for the robot.

  1. Is the process of defining motions in .yaml files based on any well documented package or tool that we could learn in order to define our own motions?

We have only introductory level knowledge about this subject and we are using this project as a starting point to learn more advanced robotics. However, at the moment we are a bit stuck and reading through the source code is not providing us the keywords we are looking for.

  1. Could you somehow describe what goes into the process of having the robot perform a simple task?
    What python packages and tools are involved?
    Where should we begin when it comes to learning this process?

For example, we know that some of the infrastructure is based on ROS. Would it be worth it to start learning the workflow most commonly associated with ROS? Or is ROS such a small part of this infrastructure that learning ROS wouldn’t improve our understanding much?

The way we understand it, as long as we can generate some trajectory, we can sample it and save it in a format that follows the dynamic graph format, regardless of how the trajectory is generated.

  1. Would it be possible to generate the trajectories using the solo8 urdf file in a different simulation software, that would be simpler for us to learn?

We understand that these are very broad questions and that a detailed answer would pretty much be equivalent to a full documentation of your code, but any answer you can provide that could nudge us in the right direction, would be very helpful. We are very eager to spend time on and learn from this project.

Best regards,

Ok this is gonna be hard to guide you through all of the steps but I will try to guide you through the main ideas:

First of all you need to understand what you are doing when you try to build any code base:

I know I have send you this link before but it very important to understand the concepts.
In addition to this page you need to understand that your computer (Operating System) has no idea about your workspace if it;s not registered anywhere. The way to register folders is to changed the environment variable of your system:

  • PATH (registered where the executables are)
  • LD_LIBRARY_PATH (where the built library are)
  • PYTHONPATH (where the python packages and python bindings are)
  • etc.
    In order to check if they are active you can do env | grep <VAR_NAME>
    Doing this by hand is cumbersome but fortunately for us colcon offer us a tool to register the workspace install folder to your system: the setup.XXX system.
    Sourcing the corresponding setup file expose the instal folder to your system and allow you to use whatever is inside. source setup.bash

For our code base, it is split into 2 ways:

  • Running the simulation, simply using python/python bindings and pybullet.
  • Running controllers on the real robot, more involved using ROS and dynamic-graph.

First step for you is to handle the simulation.
In order to simulate Solo8 or solo12 you need to read this README:

Instead of installing the packages with pip I suggest you clone then in your workspace using treep:
treep --clone <package_name>
You colcon build to build and install the python packages in the workspace install folder
Then cd to the <package_name>/demos/ and run the python scripts. ipython demos/
Play around with the simulation a bit adding yourself a PD controller.
If a demos is not workling report it on a github issue!!!

Then you may want to add controllers.
With mim_control you may find some whole body controllers.
These controllers are both Python and C++/Pythonbindings based.
Hence you need to build the repo.
Once the simu is working you should be able to run the demos in mim_control the same way as before.
It is the same methode to use the kyno-dyn-opt: build and run the demos.
I am deeply sorry for the lack of documentation we are working on it but you can also contribute if you want. It is always beneficial for the doc to have users adding stuff.
You can add part of the doc in a github issue and we will introduce it in the wiki once checked out.

Running the real robot:
get familiar with ros2:
at least:

Then read this doc main structure:
Then we come back to how to run the robots.
Let us know once the first steps are taken.

1 Like