Data Sheet

55
The code shows that by pressing the q key the program runs. A press of q
moves the end effector pose in the (X) coordinate by delta (5mm).
If there are no errors the end effector will move according to keystroke. All
joints are in radians.
Press the 'q‘ key to to goal pose by X position in delta incrememts.
Despite having errors and not being able to get the IK moving can be allowed.
If 'Do you want make the Robot move? (Y/N)' appears onscreen press the y key
to move the end effector in the X coordinate by +5mm. Then the joints pose(rad)
are displayed.
Product may go to pose fast after pressing the Y key posing a safety risk.
When testing the example keep a safe distance while able to cut power off in case
of undesired operation
When error is too large and IK is unrealizable 'No IK Solution‘ will be
displayed the end effector will remain as is.
The sample code from above is broken down below.
ArmKinematics.ComputeIK(DesiredPose, &angle_rad, angle_rad, &ErrorStatus);
All joints set to a desired pose by taking input from DesiredPose and
angle_rad. Once DesiredPose values go to CurrentPose then the arm moves in X
coordinate and DesirePose gets set again. angle_rad is CurrentPose’s consistent
joints angles. IK’s solution for desired pose joint angles and &angle_rad get set.
&ErrorStatus is the error sent to Dynamixel.
ArmComm.Arm_Set_JointPosition(RobotisArm.Rad2Value(angle_rad +
gvdAngleGapCalcandDynamixelRad));
The ComputeIK function sets an array for joint position in &angle_rad.