Device and subDevice definitions

Devices and subdevices are abstract definitions of objects used by the DCM.

  • Devices are subdevice controllers. The DCM communicates with them. They are mainly electronic boards in the robot, with their microcontroller.

    Each device is defined by a bus type and an address on this bus. It also has an unique name and a type.

  • A subDevice is mainly an actuator or a sensor controlled by a device.

    A subdevice is defined by its device, a subdevice type, and a subdevice number. This number is used because there is often more than one subdevice of the same type controlled by the one same device (for example a board with 3 LEDs). It starts at 1 (not 0) and increments.

    Each subdevice has a unique name (different from the Device one). This name is used for the communication with the upper level.

Both devices and subDevices have a series of keys with a unique value (usually a float, but it could be int, boolean or string) for each of the keys. Keys are for example "Value" (the main value), "Min", "Max", "Gain", "Offset", "Error"... There are some mandatory keys for devices and subdevices, but there could be many others, depending on the subDevice or the Device type.

If you add a prefix with the subDevice or Device name and the specific key name, you'll have the string name of the subDevice key directly stored in ALMemory or the string name that you can send to the DCM for actuator change.

LED example:

"Face/Led/Red/Right/0Deg/Actuator": This is the name of one of the LED actuator, the red LED near the right eyes at 0 angle.

This LED has a main value key named "Value", this is a float from 0.0 (no light) to 1.0 (full light).

If you add the prefix, that is for subDevice :"Device/SubDeviceList/", you have the complete key name: "Device/SubDeviceList/Face/Led/Red/Right/0Deg/Actuator/Value"

In ALMemory this is the key name that you can use to get the current LED value.

You can also use this name to send a timed-command value to the DCM for this actuator (for this precise use, the prefix is not mandatory).

Joint sensor example:

"LShoulderPitch/Position/Sensor": This is the name of one of the joint angle sensor (Left shoulder pitch).

This joint has a main value key named "Value", this is a float that is the angle in radian.

If you add the prefix, that is for subDevice :"Device/SubDeviceList/", you have the complete key name: "Device/SubDeviceList/LShoulderPitch/Position/Sensor/Value"

In ALMemory this is the key name that you can use to get the current joint position value.

The joint sensor has also other key like "SensorType" ( "Device/SubDeviceList/LShoulderPitch/Position/Sensor/SensorType"). This is a configuration key that describes the kind of sensor for this joint, used then by motorboard. It's not a good idea to change it!

You'll see in next chapters the Device and subDevices names and all their possible keys.

The upper level usually communicates through the DCM with subdevices names (sensors / actuators) and seldom with devices names. But you can get useful information from devices (specific errors, ACK / NACK...).

Note:

This scheme is a virtual point of view. Hardware buses are not shown.





Copyright © 2010 Aldebaran-Robotics - All rights reserved