calamity's blog

Pinocchio playing drums (almost)

calamity's picture

A little video for demonstration of the IntegratedMovement service.

The position of the cymbal and the tom are scripted, but how the inMoov choose to move the stick to the tom or cymbal is fully determined by the service. 

Servo speed control, explaination how it work

calamity's picture

I have recently make many change on the Servo speed control to have a method that don't change the speed with modification to MRLComm or load on it and that are backyard compatibable with scripts users currently had. Sorry if it cause some confusion on the way. I writing this post to clear out how to use it

there is 3 methods relate to the speed control


Tracking problem

calamity's picture

Today I have try to fix the Tracking service without success

The problem seem to be relate to the servo map function

At his original state, Tracking was working when NOT using map function

Data used by Tracking are mix data from map input and output

it use servo.getPos() (input) and servo.getMax() or servo.getMin() (output)


I try to use all input data (servo.getPos(), servo.getMaxInput() and servo.getMinInput()

but it make the Tracking service run without limits when servo limits are not set using map function.

Trying to understand old style servo speed control

calamity's picture

After many unsuccessful try to bring back compatibility for servo speed control into the new MRLComm, I decide to run some test to understand better the old style speed control

I modify MRLComm used with version 107 and version 1412 to report the time it take to move the servo from 0 to 180 (or 180 to 0) at various speed setting and compute the angular velocity at those speed setting

Here`s the results

Servo speed control back compatibility

calamity's picture

I have some problem with the servo speed control

In the previous version of MRLComm (less than 1412), the speed control was adding some delay (skip on the main loop) before incrementing the position toward the target position. This will create:

Integrating robots part movement

calamity's picture

Currently, the different InMoov body part are moved by modifying the joints angle of the parts. It's working good, but we need to do a lot of input to do a simple movement.

What I think would be great is to be able to issue simple command, like move("fingertip", x, y, z) or move("rightPalm", x, y, z, roll, pitch, yaw) and have MRL compute the different joints angles of the body part to reach that point.

Servo speed

calamity's picture


With the refactoring of the MRLComm, I have reworked how the servo speed method as the old one got broken.

The new method will give a more realistic speed control, but require some more work to use

To have real speed control, the servo must know at wich speed it can turn. You can tell him is maximum speed by setting with servo.setMaxVelocity(degree/s)

Each servo could have different value, as it's much more faster to turn the head than raise the arm.

Arduino Serial communication

calamity's picture

I have start to implement a way to detect if the Serial communication between MRL and arduinos is still active. The goal is to put both MRL and arduinos in a stanby state and try to reestablish connection.

The principle is simple. Arduino service in MRL send msg at fixed time and expect to get a reply (ACK) from the arduino before the timeout expired, and arduino expect to get at least 1 msg before it's timeout expire.


Using multiple Arduino using only 1 USB connection (COM port)

calamity's picture


Arduino Mega have 4 serial ports so I think it could be useful to take advantage of this to be able to connect other serial device or Arduino running MRLComm.

With version 1559 of MRL, you can connect multiple Arduino to an host Arduino that is already connected to MRL. Each Arduino connected that way can also become an host for other Arduino. Only Arduino Mega can be use as host (Uno have only 1 serial port).

To activate this, you need at least 2 wires