.. _naoqi-motion: .. _almotion: NAOqi Motion ============ .. toctree:: :hidden: almotion-api advanced control-stiffness control-joint control-walk control-cartesian control-wholebody reflexes-collision-avoidance reflexes-fall-manager reflexes-smart-stiffness tools-general tools-motion-task almotionrecorder Overview | :ref:`API ` | :ref:`advanced` .. seealso:: - Control: :ref:`Stiffness `, :ref:`Joint `, :ref:`Walk `, :ref:`Cartesian `, :ref:`Whole body ` - Reflexes: :ref:`reflexes-collision-avoidance`, :ref:`reflexes-fall-manager`, :ref:`reflexes-smart-stiffness` - Tools: :ref:`General tools `, :ref:`Motion task ` ------------ What it does ------------ | The **ALMotion** module provides methods which facilitate making NAO move. | It contains four major groups of methods for controlling the: - joint stiffness (basically motor On-Off): see :ref:`control-stiffness`, - joint position (interpolation, reactive control): see :ref:`control-joint`, - walk (distance and velocity control, world position and so on): see :ref:`control-walk`, - robot effector in the cartesian space (inverse kinematics, whole body constraints): see :ref:`control-cartesian`. The **ALMotion** module implements also some "reflexes" such as :ref:`reflexes-collision-avoidance`, :ref:`reflexes-fall-manager` and :ref:`reflexes-smart-stiffness`. This module gives also access to useful information about the robot hardware, such as the number of joints, their name, limits, the available sensors and so on. See :ref:`tools-general` section. How it works ------------ **ALMotion** runs at 50Hz (cycle of 20ms). In **ALMotion**, every time you call an API to request a motion, a "motion task" is created to handle the job. See :ref:`tools-motion-task` to learn how to manage these tasks. The reflexes are activated by default and could modify your robot's behavior. More specifically, they will alter the motion to avoid self collision (see :ref:`reflexes-collision-avoidance`), or adjust the stiffness to spare power when the robot is not moving (see :ref:`reflexes-smart-stiffness`) or trigger a specific task when a fall is detected (see :ref:`reflexes-fall-manager`). Performance and Limitations --------------------------- **Performance** **ALMotion** is a core module. As it manages some reflexes and updates the model every cycle, the module consumes a constant CPU. This consumption could increase during special tasks like walk. The table below gives you some hints of **ALMotion** CPU consumption. ================= ======= ============= Task \\ Processor Geode Atom (NAO V4) ================= ======= ============= update Model 8\% 3\% walking 25\% 10.8\% ================= ======= ============= Getting Started --------------- Essential information to deal with ALMotion: Axis definition +++++++++++++++ The **X** axis is positive toward NAO's front, the **Y** from right to left and the **Z** is vertical. .. image:: /medias/dev/modules/motion/hardware_inertialunit.png :height: 471 px :width: 322 px SI - International System of Unit ++++++++++++++++++++++++++++++++++ The **ALMotion** module use the SI - International System of Units (meters, second, radian...). Advanced User ------------- If you are familiar with the **ALMotion** definition and you want to go futher creating advanced behavior in C++ like a new reflex, a better object tracker or use at the same time DCM module and ALMotion see :ref:`advanced` section.