robotis-pandora/ROBOTIS_CM9_Series — pull request #10 by tician (2013-10-28 18:32:27+00:00)
Title: More additions and fixes for BioloidController motion engine

Added several new features and performed lots of cleanup to BioloidController library. The cm9_bc_soccer example includes usage of all of the essential functions of CM9_BC and several of the optional functions (like offsets to adjust the poses to a specific robot's servos). The program is known to work with both the CM-900 (v1.01) and the CM-904, although the motion poses and sequences are currently designed for an armless Bioloid Premium Type-A Humanoid. It should be possible to use the same files on a full Type-A humanoid, but the arms will be uncontrolled. The command to convert the full Type-A motion file with MotionPage numbers the same as used in a Task program is: "python mtn2cm9rpm.py -i bio_prm_soccertypea_en.mtn --task". The three header files produced from this should be directly interchangeable with the three header files currently in the cm9_bc_soccer folder.

The conversion script has been rewritten to make files far easier to understand and using the "-T" or "--task" option during conversion permits usage of the exact same MotionPage numbers in the sketch as those used in any Task file using the same RoboPlus Motion file. Not using the "-T" or "--task" options will cause all unused motion pages from the RoboPlus Motion file to be deleted and the RPM_Array to have only the minimum number of entries to accommodate the valid sequences (the MotionPage numbers and pose/sequence names should be modified to match the new indices in the array). Any custom prefix can be attached to the pose, sequence, and RPM_Array names constructed from the RoboPlus Motion file. The default prefix is 'HelloRobo".