A guide to create animated human models for Gazebo using MakeHuman and Blender

Click on the video below to watch a short preview that illustrates what we are going to learn ahead!

Preview of the capability of MakeHuman + Blender + Gazebo

Gazebo simulator comes pre-installed with plenty of models already. However, sometimes the users need to add their own models. For that, Gazebo offers the capability of importing custom built models by virtue of creating meshes externally using tools such as Blender , SketchUp, or using pre-built models on 3D warehouse. Further, Gazebo also supports animated models called actors. I am specifically interested in animated human models such as the one illustrated in this Gazebo tutorial. The problem is that the variety of human actors available in Gazebo is not a whole lot. So, I decided to explore if there was a way to import custom made animated human actors from elsewhere. And guess what!

In the era where Internet is widely available, there is always a way to find answer to a problem. In the tutorial below, I will share the detailed steps I followed to create custom made animated human actors in MakeHuman and Blender and further how they were work in Gazebo.

This tutorial is divided in the following sections.

Prerequisites

In order to follow along, the reader must have the MakeHuman, Blender, and Gazebo installed. Feel free to install any version you like that is equal to or higher than the versions I used in this tutorial. Additionally, the user must have motion capture files to be used for animation later on. For this tutorial, I used pre-recorded motion capture files from cgspeed.com.

The versions of tools used in this tutorial are as follows.

Create static human models in MakeHuman

MakeHuman has one of the friendliest user interface in my opinion. It makes the task of creating human models seamlessly easy. Since there are sources already available for creating models in MakeHuman, I will skip over the details. Instead, I will refer you to the this tutorial on Youtube, which I found the most helpful. Note that there are few more steps that we must adopt for our purposes that are not mentioned in the tutorial on Yoututbe. So, let’s get started.

  1. Follow the tutorial thoroughly until about 3:27 minutes where the instructions to install MkaeHuman and configure a plugin called makewalk are given.
  2. Download and configure Mhx2 plugin. This is not covered by the Youtube tutorial but it is something that is essential for exporting and will make exporting easier, especially if the desire is to export with texture.
  3. Next, resume the tutorial on Yotutube to download motion capture data from cgspeed.com and then create a human model. Follow the tutorial until 5:27 minutes.
  4. Make sure to set the eyes of the model to Low Poly, select teeth and tongue as well. These are few things that are not mentioned in the video tutorial. See images below showing the required selection. (Note, this is not covered in the Youtube video)
  5. Export the human model as mhx2 as shown in Figure 2 below.
Figure 2: Exporting as mhx2

Finally, the model is exported model is exported and saved. For reference, I created the following model in MakeHuman.

Figure 3: Human Model made in MakeHuman

Add animation in Blender

Next, we switch to Blender. Here, we import first import the .mhx2 model created using MakeHuman, followed by targeting the pre-recorded motion capture to this model. Finally, we export the animated human model as a COLLADA (.dae) file. So, let’s go through the steps one by one.

  1. Import the human model in Blender. Note: In order to import the .mhx2 model, you will have to use the panel on the left as shown below in Figure 4.
  2. Once the file is imported in Blender, follow the Youtube tutorial from 7:30 minutes onward to load and retarget motion capture data to the static human model we just imported from MakeHuman.
    • It is very important that we are in ‘Blender Render’ view when the model is imported. See Figure 5 below.
  3. Verify that the animation works. See results from my animation in Figure 6 below.
  4. Finally, export the animated model as a COLLADA (.dae) file for use in Gazebo. It is important to note that the COLLADA file must be exported with the options shown in Figure 7 checked. This will ensure that the exported model has the proper texture.
Figure 4: Importing .mhx2 file in Blender
Figure 5: Must be in Blender Render
Figure 7: When exporting in Blender, make sure to check the above two boxes to retain texture information
Figure 6: Animation Preview in Blender

That is it for Blender and MakeHuman. Let’s move on to using the animated human model in Gazebo simulator. See you on the next page!

Leave a Reply

Your email address will not be published. Required fields are marked *