Default ALMemory keys for all subDevices

(Actuator and sensors have the same)

  • Value (float)

    A subDevice always has a main value.

    Sensors has a value that is the return of the sensor, and actuator has a value that is the last command sent to the actuator (by the DCM).

    For example, a Joint has (at least) 2 subdevices, the actuator (the angle we want to reach) and the sensor (the angle where we are, at the sensor precision).

    The value has a last update time (this is automatically done by ALMemory).

    Usually, this value is an integer (8 bits, 16 bits, or others, and signed or unsigned) sent/received by the electronic boards, and changed to/read as a float by the DCM (using gain and offset). Actuators are first changed to int values, then the timed-command algorithm is applied, and then the last value is set in ALMemory. This is why if you ask 0.4 as a float value to a LED with a timed command, you can have 0.398 as the last sent command in ALMemory.

    To access the value of a subDevice in ALMemory, simply add the baseName to the subDevice name and add "/Value". For example: "Device/SubDeviceList//HeadPitch/Position/Actuator/Value".

    Use "/Value" to access this value.

  • Gain and Offset (float)

    The gain and the offset are applied to the device return/send value.

    When a sensor returns a value (usually an integer), it's automatically multiplied by the gain, and the offset is added.

    When there is a command sent to an actuator, the offset is first removed, then it's divided by the gain. Then, the value is sent to the device (after the timed-command algorithm).

    Use "/Gain" and "/Offset" keys to access these values.

    In a normal use, you do not need to change these keys.

  • Ack and Nack (int)

    Each subDevice has also an "Ack" (device answered) and a "Nack" (device did not answer) value, that are simple counters. This value is an integer increment for all ack/nack received.

    Ack is incremented each time there is a successful message sent/received to the (sub)Device, and Nack is incremented each time there is a communication error (or no return) from the (sub)Device. If there is no communication, there is no increase of ACK and NACK.

    Be careful it could return to negative values or 0. Here, the upper level can also use the last update time.

    Nack means that the device is probably lost or not present, at least for a while (it could be just one communication issue), unless special feature.

    Use "/Ack" and "/Nack" keys to read these values.

    Note:

    Right now, just Devices has Ack/Nack information, and a ack or a nack received for the device is not forwarded to its subDevices. So you have to check the Devices Ack/Nack...

  • Error

    Each device/sub-device also has an error list. Each error has a time, a 0-7 level number, and a string. There is a 30 second time limit for each of these values. So only the 30 seconds old errors are kept (if there are any).

    Levels are:

    7 Fatal error, could not be used (as with an Nack)
    6 Fatal error, but could still be used in a very bad way
    5 Error with bad effect on the main feature
    4 Error
    3 Warning
    2 Light warning
    1 Comment
    0 Everything is ok

    > Use the "/Error" key to read this value.

    Note:

    Right now, this is not used. There are only errors for motor board devices, and the value is a special 8 bits int (see next chapter).

  • Min and Max

    There is also a mandatory Min and Max value.

    Each timed command sent to an actuator is majored/minored by the min and max value.

    For sensors, their meaning depends on the subDevice type. There could have also specific use for some actuators.

    Use "/Min" and "/Max" keys to read these values.

    These values should not be changed.

  • Other configurations values: "Type", "Device", "SubDeviceNumber"

    "Type" is a string that describes the kind of SubDevice.

    "Device" is the string name of the Device that controls this subDevice.

    "SubDeviceNumber" is an int, starting at "1" that is the subdevice number of this subDevice in this Device.

    These values should not be changed.

These are only mandatory keys. Depending on the type, every subDevices could have other "information" (such as changed sensor values) or "configuration" keys.

They are described in next chapters with the precise meaning of all keys.





Copyright © 2010 Aldebaran-Robotics - All rights reserved