Pepper やNaoで使用されているNaoqi OSのメモです。

概要> | API>? | Advanced>?

What is the DCM

The DCM is a software module, part of NAOqi, in charge of the communication with almost every electronic device in robots (boards, sensors, actuators ...), excepting sound (in or out) and cameras.

It manages the main communication buses between the head and the body, and also the communication inside the head. The DCM is thus the link between the “upper level” software (others naoqi modules) and the “lower level” software (soft in electronic boards). Modules like ALMotion and ALLeds directly send commands to Actuators using the DCM, while extractors and other modules use sensor results returned by the DCM in ALMemory.

The DCM is the NAOqi module part of another software named HAL – i.e. Hardware Abstraction Layer.

As the DCM runs some software security, its use is mandatory to access the robot hardware.

The DCM runs in constant-time cycle, typically between 1 and 10 ms, depending the robot.


The DCM has two main purposes:

Send commands to Actuators,
Update Actuator and Sensor values.

What are Actuators and Sensors

Actuators and Sensors, from a DCM point of view, could be “physical” actuators (joint position, LEDs, motor current...) of “virtual” ones (like stiffness which is a parameter off the control loop).

For further details, see: nao Actuator & Sensor list or pepp Actuator & Sensor list.

How it works

  • The DCM API allows sending commands to Actuators. You can update, with one call, one or more Actuator(s). Commands include a time information of when the Actuator needs to receive the value.
  • To get Actuator and Sensors values, you need to read them in the ALMemory. The DCM updates them as far as they change.
AA NAOqi module or your code sends a request, listing timed commands to apply to one or more Actuator(s).
For further details, see: Building and sending requests.
BTimed commands are stored in a buffer.
At each cycle, DCM engine analyzes, for each Actuator, the previous and the next order (if there are some) based on the current time and computes the appropriate command to send using a linear interpolation.
For further details, see: Learning more about timed commands treatment.
CComputed value is sent to the Electronic devices.
The Actuator value is also updated in ALMemory with the sent command.
DDCM reads the updated Sensor values and updates them in ALMemory.

Why two values in ALMemory

Actuators store the last requested commands while Sensors store the real values obtained.
In many cases, they may be slightly different: command out of possible range, obstacle...

Concurrent access

NAOqi modules as well as user code using NAOqi may access to the DCM API, and then send Actuator commands.
The DCM has no priority or blocking system to avoid concurrency access on Actuator. It will apply all order, and if there is conflict, the last one will be applied.

NAOqi modules, like ALMotion or ALLeds send new order continuously, and may prevent you to access Actuators. So you need either to deactivate these modules, or to look in their API how to prevent them to access the Actuator you need.

Building and sending requests

Two methods allow sending requests.
Use ...To update ...
DCMProxy::setone Actuator or a list of Actuators (through an Alias) with one unique list of timed commands.
-Make one LED or a group of LEDs blinks twice.
-Set the Stiffness of all joints, or of the head joints.
DCMProxy::setAliasa list of Actuators (through an Alias) with a specific list of timed command for each Actuator.
Make a group of LEDs blink twice while others fade out slowly and the left arm moves as if to say goodbye.
You could obtain the same result by sending several DCMProxy::set, nevertheless DCMProxy::setAlias saves communication time by grouping commands in one request.
Each method requires an ALValue as parameter, each one with a different structure, but both share the same elements.

Timed command

A Timed command contains an order and the time when to apply it:
[‘order’, ‘time’]
  • ‘order’ is one float number, it is the value to be sent to the Actuator.
    The meaning of the value may be, according to the Actuator nature, a joint position to reach in rad, a LED intensity value in 0-1.0 range, etc.
  • ‘time’ is a 4 bytes integer, it is an absolute value based on the system time in milliseconds.
    You can send a request to the DCM to get the current time, or read it directly if you have a module on the robot motherboard.

For further details, see: Learning more about timed commands treatment.

Update type

Update type specifies how new commands will be added when there are already Timed commands in the internal buffer of an Actuator.

There are 4 possible types of update:









NAOqi - Developer guide

Creating an application?

Programming for a living robot?

Other tutorials?

Choregraphe Suite?