robotis-pandora / ROBOTIS_CM9_Series

CM-9 Series
6 stars 13 forks source link

a few more additions #9

Closed tician closed 10 years ago

tician commented 10 years ago

CM9_BC is a CM9 port of the Arbotix's BioloidController. It appears to work correctly and play motion sequences, but have not used any really large pose/sequence header files to ensure it is actually storing the arrays in FLASH and not in RAM. Do not think it is going to RAM until fetched by BioloidController, but not certain. There will usually be a compiler error if there is not an unsigned int* in the first entry in the transition_t array (the arbotix usually used NULL, but the CM-9 IDE complains). It does not really matter whether the pointer is assigned a value as the BioloidController functions do nothing with that entry. It can be useful to have the servo ID array in that first entry to ensure the servos being used in the sequence are correctly numbered. This also allows multiple sequences utilizing different numbers of servos with different ID numbers by having each sequence containing a pointer to a servo ID array and running a simple check/update when wanting to play the sequence.

The pypose sketch does work with PyPose to enable pose and sequence creation, but if not using the live update feature it will usually require the "set" button to be clicked twice before the servos will actually make the position change.

The CarBotCon library is a weak attempt to make control of the 4 servo Bioloid Basic/Comprehensive carbot simple with a CM-9. The 10x8 plate from the STEM kit works very nicely in mounting the CM-900 to the top of the CM-5's box frame with a LiPo battery secured within and a ZIG-110 mounted on the side of the plate. Will probably upload photos to the CM-9 circle. Will be working on another example sketch to control the carbot with a HaViMo2.

Made a small change to the HaViMo2 library folder to ease use with the CarBotCon and BioloidController libraries. It is now possible to include the dxl_devices header file without adding the HaViMo2 functions, but including the HaViMo2 header will automatically include the dxl_devices header (was a recursive inclusion between the two when dxl_devices was pushed into the utility folder).

tician commented 10 years ago

Corrected oversights in CM9_BC and included a simple example using a converted RoboPlus Motion file. It demonstrates how to use both playSeq() and manually interpolating between current pose and a stored pose.

Also added the conversion script modified for creating only CM9_BC compatible header files. It does not check for duplicate sequence names, so be careful if there are multiple RoboPlus Motion pages that share the same name (the script will not exclude or rename them and should cause obvious compilation errors).

robotis-pandora commented 10 years ago

OK. You are the best contributor of OpenCM!! Thank you very much. :-)