Links

MotioSuit is an open-source, active motion capture suit. It reads the angles at which each of the user's limbs are oriented and sends them over Bluetooth to the computer, where the model is updated in Blender to follow the movement.

The original intent for this project was to develop a full-body game controller, but other uses can be animating 3D models with natural movements and in a fraction of the time or even controlling a humanoid robot!

The microcontroller reads every sensor's orientation in quaternions and sends them bundled in a string over Bluetooth to the computer. There the python script in Blender receives the data and breaks it into individual sensor angles which are then passed to each bone in the armature to be updated in the 3D view.

The IMUs used here are Bosch's BNO055, which in addition to an accelerometer, gyroscope and magnetometer includes a 32-bit cortex M0+ microcontroller running a sensor fusion algorithm that is able to produce orientation in both Euler angles and quaternions.

These sensors work over I2C, but have only two selectable addresses. To overcome this, an I2C multiplexer board based on the PCA9548 is used to have different I2C buses with one or two sensors per bus. This expands the number of sensors from 2 (on the microcontroller's bus) to 18 ( eight new buses plus the microcontroller's one). Even more sensors can be added simply adding another multiplexer, up to eight boards can be connected to the same bus (If you need more... multiplex multiplexers! 🙂 ).

To make the suit plug-and-play a bluetooth to usb bridge module was added. The suit's Bluetooth is set as master and instructed to connect to the bridge's MAC address, while the computer searches for any device of type '/dev/ttyACMx'.

On the computer side, two Blender files are available in Github. The 'MotioSuit.blend' is the file ready to be used as in the video, whereas 'Armature.blend' contains the script, logic and armature needed but no model. Use this file to be able to control your own 3D model with the suit, by simply parenting the model to the bones.

To start the program press on "Start Game Engine". Optionally, press on "Record Animation" to record the session.

Both python 3 and pyserial need to be installed for the communication to work.

 

The benefit of using a suit based on IMUs versus other optical systems like visual markers or Kinect cameras is the lower cost, no need to set up a stage and the ability to be used outdoors.

 

 

25 thoughts on “MotioSuit

  1. Andy Hawkins Reply

    Heya,

    This is great. I’ve been looking for a low cost mocap solution for our college. I think this would make an interesting build project for the game developers I teach as well. Im going to try and build this.

  2. Alvaro Post authorReply

    Thanks!
    Please do, it’d be awesome if you shared pics/video of your build 🙂

  3. Andy Hawkins Reply

    Yep will definitely make a blog and share it. I need to get my head around the tech first, having only built RPi arcade machines and done a few Arduino projects.

  4. Scott Reply

    This is awesome. Thinking of having some of my high school students build a couple of these. What did parts cost you?

    • Alvaro Post authorReply

      Hi, great idea!
      I don’t recall exactly how much the total price was, but the main cost is in the sensors. While I designed and hand-soldered the board to keep the price at around 10€/sensor, assembled modules have recently started appearing online for that price, so that would be the way to go 🙂
      Apart from that, you’d need a bluetooth-enabled controller, a battery and the I2C multiplexer.

  5. Raul Lapeira Reply

    Hola alvaro:

    Me estoy haciendo uno para la liga de robots. Javi isabel me hablo de ti. porfa dame un toque es importante.

  6. boredj Reply

    Hi Alvaro, when i tried importing the blend into unity the inspector stated that there was not enough bones. Perhaps this needs to be updated

    • Alvaro Post authorReply

      Hi, that’s a Blender file, try opening it there. I’ve never used Unity so I’m afraid I can’t help you with that.

  7. Xavier Reply

    Hi Alrvaro,

    Congratulations Excellent project, I would like to receive your help I am trying to do something similar but instead of using sensors I need to use a web cam, first I am trying to move the bones in BGE mode using a python script but I have not managed to give with the solution to the problem.

    • Alvaro Post authorReply

      Thanks!
      Take a look at the python file MotioSuit.py, the blender part should be taken care of just by changing the serial communications to whatever method you choose to send the angles’ data.
      You would only need to write the angles to a 2D matrix, with one line per angle and one column per quaternion, the actual movement of the bones in BGE is from line 72 to the end.
      Hope this helps!

  8. Xavier Reply

    Thanks Alvaro,
    I am trying to modify the MotioSuit.py file for now to test I need to move a bone inside a mesh in BGE mode so I have manually assigned the angles to the varibale angles, but at the moment of pressing P, no movement is generated. I have sent a message to the mail with the test file blender, I hope to receive your help and acceptance.

  9. OAXP Reply

    Hey, please I want to make great Mocap with MPU 6050 sensors, Arduino Uno and Bluetooth. I don’t understand well, can you please explain me by e-mail? I founded a similar project : http://herrzig.ch/work/bewegungsfelder/ .
    I don’t know if I can combine them or not. Please Help me.

    • Alvaro Post authorReply

      Basically, I read the absolute orientation of the sensors in quaternions to avoid gimbal lock and sent the matrix of values over bluetooth to the computer running Blender with a python script that updated the model. Since the sensor’s address was 1bit, I used an I2C multiplexer to be able to read all the sensors one bus at a time.
      I don’t know if the MPU6050 calculates the orientation or if you’d have to take care of the sensor fusion algorithm as well.
      As for the other project, it looks cool but I’m not sure I can help you with it since I don’t know how it works.

  10. Fareeha Reply

    Your project is wonderful and your work is remarkably helpful. Kindly let me know what are your CPU specifications that you are using to run this animation in blender ?

    • Alvaro Post authorReply

      Thanks! Unfortunately, I can’t tell. This was done on a company laptop almost two years ago, I really don’t remember.
      Sorry!

  11. Ahmet NARMAN Reply

    Hello,

    We have been working on a project similar to yours using blender and your work really helped us understand what we are supposed to do. Thank you for that. We had a problem with serial connection though. We could establish serial connection using python IDE (pycharm) but while working on blender game engine, our access to the serial port was denied. We have been looking for solutions but could not find a conclusive one. Did you face with such a problem? Do you recommend us any way to solve this problem?

    Thank you.

    • Alvaro Post authorReply

      Hi! I’m glad you’ve found the project helpful!

      Actually yeah, I had the same problem at the beginning, I think you can solve it by either copying pyserial to blender’s internal python folder or by adding it to the system path with ” sys.path.append(“/usr/lib/python3/dist-packages”) ” in the script.

      Good luck!

  12. AMC Reply

    Hi Alvaro,

    i have the same problem as Xavier, when i try to move a mesh, i can move manually in the viewport, but then when i press P nothing is moving. Would be great if you could give some lead on this.

    Thanks!

    • Alvaro Post authorReply

      Hi!
      In your mail you mention that you’re unable to move the bones programmatically, but I understand that you can move them by hand and the mesh follows along, right?
      If that’s the case, could it be that the bones’ names don’t correspond to those in the script?

  13. AMC Reply

    Hi Alvaro,

    From the script i’m calling the bones by its right name, if not it would be throwing an error. Also, i’m printing out the rotational values i’m changing and they change, but visually the mesh it’s not deformed. Seems like it’s not rendering properly…

    • Alvaro Post authorReply

      I’d have to take a look to see if I can find the problem. Can you send it to me by mail or upload it somewhere?

  14. Dale Reply

    Hi Alvaro,

    This is an amazing project, well done.

    I saw on hackaday back in 2016 you were thinking of going wireless, can I ask how that is going and what components you were using to achieve that?

    • Alvaro Post authorReply

      Thanks!

      Well, I’ve only recently started working on the new version, so I’m still at the board development phase, but here’s what I’ve got at the moment (https://hackaday.io/project/88133-motio)

      I’m working with the same BNO055 IMU but this time the processor is the nRF51822 (Cortex M0) with integrated BLE and each module has its own battery with onboard charger

Leave a Reply

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