Libraries to program Bioloid in C
C Humanoid Lab libraries for Bioloid Premium
The Humanoid Lab have create some libraries to program the Bioloid Premium in C:
- libcontrollers: generic controller library, it provides easy access to the ADC, buttons and leds of controller. Now there are implemented (cm700 possible on future):
- cm510
- libdevices: generic library that have devices withc are connected to dynamixel bus. Now this library have:
- AX-12+ servo support
- Expansion board support
- libmotion: implementation of an algorithm to move the robot reading the motion robot pages
The above libraries use the manufactured serial and dynamixel bus communications libraries. You can download it form embedded_c(cm510_v1.01). This libraries are distributed by Robotis.
More information at Software Help-> Embedded C
Libraries dependencies
Download Humanoid Lab libraries
The group have an anonymous access to git repository, this have the code in C and the compiled libraries:
# git clone http://apollo.upc.es/git/iri-libbioloid.git
Or download by:
How to compile Humanoid Lab libraries
Compile libraries on a ubuntu 10.04 system
- Install gcc-avr and avr-libc
- # sudo apt-get install gcc-avr avr-libc
- Download the Humanoid Lab library
- Download the Robotis library if Humanoid Lab library have dependences
- Compile the libraries defining ROBOTIS path
- # make ROBOTIS_C_DIR=path-to-bioloid-c
Note
- Be careful when you link the libraries in your project, put attention on the link order because the libraries have dependences. Example:(-lmotion -lcontrollers -ldyn_devices -ldynamixel -lserial)
- Be careful with our motion library because is designed for our modified motion file. Our motion file have the walk move cut at pieces. You can download form Humanoid Lab movements
Compile libraries with AVRStudio
How to program Bioloid premium in C using AVRStudio and Robot terminal
Create a project with AVRStudio
- Run AVRStudio
- Create New Project
- Select C Executable Project
- Select ATmega2561
- Configure projecte properties -> Toolchain
- Add Symbols -> Defined simbols: F_CPU=16000000UL
- Add Includes directories (embedded C ROBOTIS includes and Humanoid Lab includes)
- Add libraries and path libraries (Be careful with the relative paths sometimes doesn't run)
- Now you can use libraries functions in main
Upload the robot with Robot terminal
Now upload the micro with the created example.hex file using the Robot terminal
- Connect the serial cable to pc and robot
- Run Robot terminal
- Connect serial port: Setup-> Connect (Configure correct port and 57600 baudrate)
- Holding AltGr?+3 (sending #) connect the robot. Now you are in the Bootloader
- Write 'l'
- Send hex file Files-> Transmit file
- Write 'go' to run the program or restart the robot
More information about Robot terminal at Software Help-> RoboPlus-> RoboPlus Terminal
More information about Bootloader at Software Help-> Embedded C-> CM510/CM700-> Programming-> Boot Loader
Mini survey at Oct 2010
Attachments
-
libdep.PNG
(27.2 KB) - added by arull
7 months ago.
Libraries devices diagram
