calamity's blog

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

MrlMsg class in MrlComm

calamity's picture
Hey guys
I was giving some thinking about how to implement the MrlMessage class and would like to open a discussion so we are all on the same wave.
The goal of MrlMessage class will be to
isolate the Serial access from the rest of the code
make it easier for maintenance if we need to change message structure
make it possible to implement other communication way, like using WiFi on esp8266,  I2C protocol etc

Neopixel ring running on MRLComm

calamity's picture


I have found a way to be able to use a Neopixel ring on an arduino running MRLComm (direct communication to MRL). No need of a slave controller to drive the neopixel hardware


mrlComm memory usage

calamity's picture

I very like the new mrlComm with sensor and servo regroup under a device structure. It will make it much more managable.

But i'm worrying about the memory usage

the default  inMoov hardware map have 10 servo and 5 sensors, so 15 "devices".

quickly looking at the device structure, each device will take about 70-80 bytes of memory

15 * 80 = 1200 bytes for all the devices.

compiling on the UNO, it say about 1350 bytes available. wich leave a very low amount of memory for the stack.

PIR Sensor and some bugs trackings

calamity's picture


I was trying to get the PIR sensor working on my InMoov. I saw some method about it in but it was no worky.

Today I have dig into the code to found out what's going on and it look like it's stuck in a between state with the arduino MRLComm change. Things are not hard to fix, but i'm a bit confuse about wich way to go


Robyn problems

calamity's picture

I have try to find the trouble with Robyn

I did not manage to replicate the problem as Markus told, but I was seeing from time to time some MRL->Arduino rx error

I was not caused by a buffer overflow, monitoring serial.available() show no number close the the Buffer size

So I decide to monitor the the incoming message in the arduino by echoing it to a 2nd arduino connected via I2C who can output the message to the serial monitor (that was fun to build)

I had the rothead and neck servo moving from 90 to 30/20 and robyn was speaking

Neopixel ring controlled by MRL test

calamity's picture


I'm trying to create a service to control the neopixel ring that will be mounted on my InMoov

the problem is that the neopixel library use the same interrupt as the servo motor. So it's not compatible and to neopixel ring need to be drive by a separated controller.