Data Sheet

44
_tempMotionTimer.Start();
gvdGoalCalculationAngleRad = gpMotionPlayer->NextStep(&ErrorStatus);
gvdGoalDynamixelAngleRad = gvdGoalCalculationAngleRad +
gvdAngleGapCalcandDynamixelRad;
gviGoalDynamixelAngleUnit = gpRobotisArm
->Rad2Value(gvdGoalDynamixelAngleRad);
CommResult = gpArmComm
->Arm_Set_JointPosition(gviGoalDynamixelAngleUnit);
gvdGoalCalculationAngleRad = gpMotionPlayer->NextStep(&ErrorStatus)
gvdGoalDynamixelAngleRad = gvdGoalCalculationAngleRad +
gvdAngleGapCalcandDynamixelRad
_tempMotionTimer.Stop();
_tempMotionTimer.Wait(Period - _tempMotionTimer.GetElapsedTime());
The functions above have set motion time periods where functions are
performed via while loop during their duration.
First, the set Control Time Period gets matched.
_tempMotionTimer.Start();
...
...
_tempMotionTimer.Stop();
_tempMotionTimer.Wait(Period - _tempMotionTimer.GetElapsedTime());
Measure elapsed start and stop time then subtract its difference with elapsed
calculated time in set Control Time Period(5msec in this case).
The target pose from the current step obtained from the algorithm below.
gvdGoalCalculationAngleRad = gpMotionPlayer->NextStep(&ErrorStatus);
gvdGoalDynamixelAngleRad = gvdGoalCalculationAngleRad +
gvdAngleGapCalcandDynamixelRad;
gviGoalDynamixelAngleUnit = gpRobotisArm
->Rad2Value(gvdGoalDynamixelAngleRad);
CommResult = gpArmComm
->Arm_Set_JointPosition(gviGoalDynamixelAngleUnit);
gvdGoalCalculationAngleRad = gpMotionPlayer->NextStep(&ErrorStatus)
gvdGoalDynamixelAngleRad = gvdGoalCalculationAngleRad +
gvdAngleGapCalcandDynamixelRad
First, NextStep gets the current step’s target angles, which are from the D-H
Configuration. However, the actual Dynamixel PRO start point and the D-H
Configurations differ. This difference is taken into account and each joint Goal