Arms' movement is controlled by UDynamixel module. This module must be enabled in the robot configuration file. 

Robot arms structure

ATTENTION!!! When planning arm movements or gesture positions, please pay attention not to hit the robot torso or both hands together. You can make sure that the gesture will not cause a collision by programming only a fraction of the gesture at a time and using slow movements. You should ALWAYS use MovePosition(...) function, which is using trajectory generators. Using direct joint value slot (val) without trajectory generator, motor will achieve the position as fast as it can. You should avoid such situations it may damaged arms or their drive mechanism.

   // R - roll, P - pitch
   //   R   P R     P R 
   // =()==(O()====(O()===
   //  q1, q2,q3,  q4,q5
 
   // absolute arm angle value [deg.]
robot.body.arm[left|right][1|2|3|4|5].val;
robot.body.arm[left|right][1|2|3|4|5].val->rangemin;
robot.body.arm[left|right][1|2|3|4|5].val->rangemax;
   //
   // this function use smooth trajectory generator
   // all zeros means reset position (both arms spread open)
robot.body.arm[left|right].MovePosition(time, q1, q2, q3, q4, q5);
Simple movments (basic examples, can be extended...)

This is a basic set of movement functions, that can be use instead of every single joints. 

   // Use time which defines the duration of action [s].
   //
robot.body.arm[left|right]|(nothing).MoveCenterDown(time);
robot.body.arm[left|right]|(nothing).MoveCenterDown2(time);
robot.body.arm[left|right]|(nothing).MoveCenterCenter(time);
robot.body.arm[left|right]|(nothing).MoveCenterUp(time);
robot.body.arm[left|right]|(nothing).MoveCenterUp2(time);
robot.body.arm[left|right]|(nothing).MoveCenterUpper(time);
robot.body.arm[left|right]|(nothing).MoveFrontCenter(time);
robot.body.arm[left|right]|(nothing).MoveFrontUp(time);
robot.body.arm[left|right]|(nothing).MoveFrontDown(time);
robot.body.arm[left|right]|(nothing).MoveSideUp(time);
robot.body.arm[left|right]|(nothing).MoveSideSide(time);
robot.body.arm[left|right]|(nothing).MoveSideDown(time);
Stop all movements or go to the reset position
   // stop all movements
robot.body.arm.Stop();
   // both arms go to the reset position
robot.body.arm.MoveReset(time);

  

 

 

EMYS and FLASH are Open Source and distributed according to the GPL v2.0 © Rev. 0.9.1, 15.05.2017

FLASH Documentation