ALRobotPose

Overview | API

See also

What it does

The ALRobotPose module watches several sensors and tries to recognize the current posture of the robot. The following postures are recognized:

  • Unknown
  • Stand
  • Sit
  • Crouch
  • Knee
  • Frog
  • Back
  • Belly
  • Left
  • Right
  • HeadBack (read “upside down”)

Some of them can match several variants, see some illustrations:

Illustration of the recognized postures

How it works

A MicroEvent is raised when the posture changes and the new posture has been constant for 500 ms. The corresponding ALMemory Key is robotPoseChanged, which is a string whose value is the current posture name.

The module is also in charge of updating the “Standing” and “Sitting” resources states.

Finally, the two following fast access Memory Keys are available:

  • robotPose. An integer coding the current posture (use ALRobotPoseProxy::getPoseNames to match to the posture name)
  • robotPoseSince. A float corresponding to the time in seconds elapsed since the current posture was detected.

Posture recognition method

  • If the center of mass is in the support polygon, the posture is either “Crouch” or “Stand” according to the joint values of the legs.
  • Otherwise,
    • if the torso is vertical
      • if there is no foot contact, the posture is “Sit”, “Knee” or “Unknown” according to the joint values of the legs and the orientation of the torso.
      • otherwise, the posture is “Sit”, “Knee”, “Frog” or “Unknown” according to the joint values of the legs and the orientation of the torso.
    • otherwise, the posture is “HeadBack”, “Right”, “Left”, “Belly” or “Back” according to the orientation of the torso.