libavr/libbioloid C library for CM5 released!

Bioloid robot kit from Korean company Robotis; CM5 controller block, AX12 servos..
289 postsPage 18 of 201 ... 15, 16, 17, 18, 19, 20
289 postsPage 18 of 201 ... 15, 16, 17, 18, 19, 20

Post by lrice648 » Mon Nov 15, 2010 10:23 pm

Post by lrice648
Mon Nov 15, 2010 10:23 pm

I wouldn't want to change horses mid stream but I'd be interested. I've been picking through the library a lot trying to figure out zigbee communication, but I'd be interested to see another implementation.
I wouldn't want to change horses mid stream but I'd be interested. I've been picking through the library a lot trying to figure out zigbee communication, but I'd be interested to see another implementation.
lrice648 offline
Robot Builder
Robot Builder
Posts: 7
Joined: Thu Apr 15, 2010 11:25 pm

Post by lrice648 » Thu Jan 20, 2011 4:01 am

Post by lrice648
Thu Jan 20, 2011 4:01 am

Is anyone still working with this? I would be interested in sharing some code and seeing what others have done if anyone else is.
Is anyone still working with this? I would be interested in sharing some code and seeing what others have done if anyone else is.
lrice648 offline
Robot Builder
Robot Builder
Posts: 7
Joined: Thu Apr 15, 2010 11:25 pm

Post by pieddemamouth » Thu Jan 20, 2011 9:04 am

Post by pieddemamouth
Thu Jan 20, 2011 9:04 am

It's still in my current projects but I won't have time work on it before the beginning of February.
It's still in my current projects but I won't have time work on it before the beginning of February.
pieddemamouth offline
Robot Builder
Robot Builder
Posts: 12
Joined: Sun Feb 10, 2008 6:17 pm

Post by lrice648 » Thu Jan 20, 2011 5:05 pm

Post by lrice648
Thu Jan 20, 2011 5:05 pm

My school group is just getting started back now. We wont probably get into our stride until around that time too.
My school group is just getting started back now. We wont probably get into our stride until around that time too.
lrice648 offline
Robot Builder
Robot Builder
Posts: 7
Joined: Thu Apr 15, 2010 11:25 pm

Post by freyr » Wed Feb 02, 2011 3:09 am

Post by freyr
Wed Feb 02, 2011 3:09 am

Im having problems with getting functional avr compiler running. I was experiencing the motor not reacting issue (unless called twice) and have been building a gcc-4.1.2/binutils-2.20/avr-libc-1.7.0 tool set from source following the examples provided earlier in this thread.

When I try to build the examples I get assember errors

Code: Select all
freyr@stikklar:~/Development/libbioloid/example$ make
gcc -Wall -g -std=gnu99 -I../libbioloid -I../libcompat -DHOST -DMV_STOP=6400 -DMV_FLASH=8000 -lm -lrt -o ../libbioloid/bioloid/trig_tables._ ../libbioloid/bioloid/make_trig_tables.c
/home/freyr/Development/libbioloid/example/../libbioloid/bioloid/trig_tables._ > ../libbioloid/bioloid/trig_tables.c
/usr/local/AVR/bin/avr-gcc -Wall -g -std=gnu99 -I../libbioloid -I../libavr -Os -ffreestanding -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -ffunction-sections -finline-limit=5 --combine -fwhole-program ../libavr/crt/crt-hack.c -mmcu=atmega128 -DCM5 -mcall-prologues -DFLASH_NEAR -S -o example_cm5.elf.S example.c ../libbioloid/bioloid/dynamixel.c ../libbioloid/bioloid/dynamixel_packet.c ../libbioloid/bioloid/filter.c ../libbioloid/bioloid/make_trig_tables.c ../libbioloid/bioloid/sio_input.c ../libbioloid/bioloid/sio_output.c ../libbioloid/bioloid/supervisor.c ../libbioloid/bioloid/timer.c ../libbioloid/bioloid/trig.c ../libbioloid/bioloid/trig_tables.c ../libbioloid/bioloid/hw/cm5/battery.c ../libbioloid/bioloid/hw/cm5/bridge.c ../libbioloid/bioloid/hw/cm5/hw.c ../libbioloid/bioloid/hw/cm5/timer.c ../libbioloid/bioloid/hw/cm5/uart.c
/usr/local/AVR/bin/avr-gcc -I../libavr -Wl,--gc-sections,--relax -nostartfiles ../libavr/crt/crt-weak.S -mmcu=atmega128 -o example_cm5.elf example_cm5.elf.S
crt-hack.c: Assembler messages:
crt-hack.c:764: Error: garbage at end of line
crt-hack.c:770: Error: garbage at end of line
... lots more ...
crt-hack.c:898: Error: garbage at end of line
crt-hack.c:902: Error: garbage at end of line
make: *** [example_cm5.elf] Error 1


I'm new to avr and libbioloids so I'm a bit baffled.

Any clever thoughts?
Im having problems with getting functional avr compiler running. I was experiencing the motor not reacting issue (unless called twice) and have been building a gcc-4.1.2/binutils-2.20/avr-libc-1.7.0 tool set from source following the examples provided earlier in this thread.

When I try to build the examples I get assember errors

Code: Select all
freyr@stikklar:~/Development/libbioloid/example$ make
gcc -Wall -g -std=gnu99 -I../libbioloid -I../libcompat -DHOST -DMV_STOP=6400 -DMV_FLASH=8000 -lm -lrt -o ../libbioloid/bioloid/trig_tables._ ../libbioloid/bioloid/make_trig_tables.c
/home/freyr/Development/libbioloid/example/../libbioloid/bioloid/trig_tables._ > ../libbioloid/bioloid/trig_tables.c
/usr/local/AVR/bin/avr-gcc -Wall -g -std=gnu99 -I../libbioloid -I../libavr -Os -ffreestanding -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -ffunction-sections -finline-limit=5 --combine -fwhole-program ../libavr/crt/crt-hack.c -mmcu=atmega128 -DCM5 -mcall-prologues -DFLASH_NEAR -S -o example_cm5.elf.S example.c ../libbioloid/bioloid/dynamixel.c ../libbioloid/bioloid/dynamixel_packet.c ../libbioloid/bioloid/filter.c ../libbioloid/bioloid/make_trig_tables.c ../libbioloid/bioloid/sio_input.c ../libbioloid/bioloid/sio_output.c ../libbioloid/bioloid/supervisor.c ../libbioloid/bioloid/timer.c ../libbioloid/bioloid/trig.c ../libbioloid/bioloid/trig_tables.c ../libbioloid/bioloid/hw/cm5/battery.c ../libbioloid/bioloid/hw/cm5/bridge.c ../libbioloid/bioloid/hw/cm5/hw.c ../libbioloid/bioloid/hw/cm5/timer.c ../libbioloid/bioloid/hw/cm5/uart.c
/usr/local/AVR/bin/avr-gcc -I../libavr -Wl,--gc-sections,--relax -nostartfiles ../libavr/crt/crt-weak.S -mmcu=atmega128 -o example_cm5.elf example_cm5.elf.S
crt-hack.c: Assembler messages:
crt-hack.c:764: Error: garbage at end of line
crt-hack.c:770: Error: garbage at end of line
... lots more ...
crt-hack.c:898: Error: garbage at end of line
crt-hack.c:902: Error: garbage at end of line
make: *** [example_cm5.elf] Error 1


I'm new to avr and libbioloids so I'm a bit baffled.

Any clever thoughts?
freyr offline
Newbie
Newbie
Posts: 3
Joined: Wed Feb 02, 2011 3:02 am

Post by haratron » Mon Feb 07, 2011 1:31 am

Post by haratron
Mon Feb 07, 2011 1:31 am

What about the 510?
Is it supported?
What about the 510?
Is it supported?
haratron offline
Savvy Roboteer
Savvy Roboteer
Posts: 37
Joined: Thu Feb 03, 2011 10:16 pm

Usb2Dynamixel

Post by MOHIT JINDAL » Sat Feb 12, 2011 6:14 pm

Post by MOHIT JINDAL
Sat Feb 12, 2011 6:14 pm

Can anyone share your PC code (Visual C++ with me ?

I don't want to use CM 510 or Cm5.

Only USB2Dynamixel and 18 AX12+.

Please help.

Thanks. :roll:
Can anyone share your PC code (Visual C++ with me ?

I don't want to use CM 510 or Cm5.

Only USB2Dynamixel and 18 AX12+.

Please help.

Thanks. :roll:
MOHIT JINDAL offline
Savvy Roboteer
Savvy Roboteer
Posts: 178
Joined: Wed Nov 10, 2010 7:43 am

Re: Usb2Dynamixel

Post by freyr » Sun Feb 13, 2011 1:43 am

Post by freyr
Sun Feb 13, 2011 1:43 am

MOHIT JINDAL wrote:I don't want to use CM 510 or Cm5.


I'm afraid you are asking in the wrong thread. This one is specifically covering a C library replacing standard CM5 firmware.
MOHIT JINDAL wrote:I don't want to use CM 510 or Cm5.


I'm afraid you are asking in the wrong thread. This one is specifically covering a C library replacing standard CM5 firmware.
freyr offline
Newbie
Newbie
Posts: 3
Joined: Wed Feb 02, 2011 3:02 am

Post by freyr » Tue Mar 01, 2011 9:56 pm

Post by freyr
Tue Mar 01, 2011 9:56 pm

After compiling, recompiling trying different combinations of gcc, binutils and avr-libc along with platforms and what still failing to compile a (correctly) working program. I though of a different approach. I tried older versions of libbioloid.

I had just blindly taken the latest and used that :P So I backed up to r1591 (the oldest I found) and vola everything works as expected.

I haven't bothered yet tried to figure out exactly when it brakes since I'm just happy to have it working atm.

BTW, thanks for this nice lib. Has made the transition to atmega a rather plesant one :)
After compiling, recompiling trying different combinations of gcc, binutils and avr-libc along with platforms and what still failing to compile a (correctly) working program. I though of a different approach. I tried older versions of libbioloid.

I had just blindly taken the latest and used that :P So I backed up to r1591 (the oldest I found) and vola everything works as expected.

I haven't bothered yet tried to figure out exactly when it brakes since I'm just happy to have it working atm.

BTW, thanks for this nice lib. Has made the transition to atmega a rather plesant one :)
freyr offline
Newbie
Newbie
Posts: 3
Joined: Wed Feb 02, 2011 3:02 am

Post by jalane » Tue Mar 15, 2011 8:01 am

Post by jalane
Tue Mar 15, 2011 8:01 am

I've just purchased and assembled the Bioloid Premium Kit and have been perusing the forum for information on programming it. The libbioloid library seems to be just the thing I'm looking for, but I've only seen requests for CM-510 support or statements that it should be trivial.

Has anyone tackled this issue yet? I'd hate to get cracking on it only to find someone else did it first (and potentially better).

If I remember correctly, it was mentioned earlier in this thread that a similar file to cm5.h would have to be created. Would there have to be some additions to libavr as well? I've been taking a cursory glance at the datasheets for the Atmega128 and Atmega2561 and it looks like there are some significant differences in the register addresses according to the register summaries. I'm comparing documents 2549M and 2467V (hopefully these are the ones I need to look at).

Any help of suggestions on where to start would be greatly appreciated.
I've just purchased and assembled the Bioloid Premium Kit and have been perusing the forum for information on programming it. The libbioloid library seems to be just the thing I'm looking for, but I've only seen requests for CM-510 support or statements that it should be trivial.

Has anyone tackled this issue yet? I'd hate to get cracking on it only to find someone else did it first (and potentially better).

If I remember correctly, it was mentioned earlier in this thread that a similar file to cm5.h would have to be created. Would there have to be some additions to libavr as well? I've been taking a cursory glance at the datasheets for the Atmega128 and Atmega2561 and it looks like there are some significant differences in the register addresses according to the register summaries. I'm comparing documents 2549M and 2467V (hopefully these are the ones I need to look at).

Any help of suggestions on where to start would be greatly appreciated.
jalane offline
Newbie
Newbie
Posts: 3
Joined: Mon Mar 14, 2011 6:27 pm

Gyro Sensor ?

Post by Julienne » Mon Apr 11, 2011 4:57 pm

Post by Julienne
Mon Apr 11, 2011 4:57 pm

Hi everyone,

I'm working for school on a project based on CM-5 and AX 12 servos.

The libbioloid library seems very usefull for what we intend to do - we tried the examples, started programming and everything is working fine.

I just had a question : we will need to use a gyroscope to complete our project and the teacher only allows us to use the Gyro Sensor GS-12 : http://www.trossenrobotics.com/store/p/ ... ensor.aspx

This sensor seems to be only compatible with the CM-510 or CM-700 but I was thinking that if we work with C it is possible to manage something.

Problem... I am not able to find any datasheet except this : http://support.robotis.com/en/techsuppo ... l_gyro.htm

So, few questions :
- Will we be able to connect the sensors in chain with the AX-12 (implicate to set it an ID, no ? Any idea of how it is possible ?)
- Do we need to create a new library or just use dx_write and read in the C code ?

If doesn't seem to be possible to use Libbioloid and CM-5 with the sensor we won't have any choice and use a CM-510 with the regular embedded C code...
Hi everyone,

I'm working for school on a project based on CM-5 and AX 12 servos.

The libbioloid library seems very usefull for what we intend to do - we tried the examples, started programming and everything is working fine.

I just had a question : we will need to use a gyroscope to complete our project and the teacher only allows us to use the Gyro Sensor GS-12 : http://www.trossenrobotics.com/store/p/ ... ensor.aspx

This sensor seems to be only compatible with the CM-510 or CM-700 but I was thinking that if we work with C it is possible to manage something.

Problem... I am not able to find any datasheet except this : http://support.robotis.com/en/techsuppo ... l_gyro.htm

So, few questions :
- Will we be able to connect the sensors in chain with the AX-12 (implicate to set it an ID, no ? Any idea of how it is possible ?)
- Do we need to create a new library or just use dx_write and read in the C code ?

If doesn't seem to be possible to use Libbioloid and CM-5 with the sensor we won't have any choice and use a CM-510 with the regular embedded C code...
Julienne offline
Newbie
Newbie
Posts: 4
Joined: Mon Apr 11, 2011 4:27 pm

Re: Gyro Sensor ?

Post by garycmartin » Mon Apr 11, 2011 6:09 pm

Post by garycmartin
Mon Apr 11, 2011 6:09 pm

Hi Julienne,

Julienne wrote:Hi everyone,

I'm working for school on a project based on CM-5 and AX 12 servos.

The libbioloid library seems very usefull for what we intend to do - we tried the examples, started programming and everything is working fine.

I just had a question : we will need to use a gyroscope to complete our project and the teacher only allows us to use the Gyro Sensor GS-12 : http://www.trossenrobotics.com/store/p/ ... ensor.aspx

This sensor seems to be only compatible with the CM-510 or CM-700 but I was thinking that if we work with C it is possible to manage something.

Problem... I am not able to find any datasheet except this : http://support.robotis.com/en/techsuppo ... l_gyro.htm

So, few questions :
- Will we be able to connect the sensors in chain with the AX-12 (implicate to set it an ID, no ? Any idea of how it is possible ?)
- Do we need to create a new library or just use dx_write and read in the C code ?

If doesn't seem to be possible to use Libbioloid and CM-5 with the sensor we won't have any choice and use a CM-510 with the regular embedded C code...


I have the Gyro Sensor GS-12 here, it does not connect direct to the Dynamixel bus, but uses two of the 6 analogue to digital ports exposed by the CM-510 (one for X one for Y). I vaguely remember reading about efforts to add analogue sensors to the older CM-5 somewhere on this forum, but I think it was basically a custom circuit that pretends to be another ID on the Dynamixel bus that you read values from.

--Gary
Hi Julienne,

Julienne wrote:Hi everyone,

I'm working for school on a project based on CM-5 and AX 12 servos.

The libbioloid library seems very usefull for what we intend to do - we tried the examples, started programming and everything is working fine.

I just had a question : we will need to use a gyroscope to complete our project and the teacher only allows us to use the Gyro Sensor GS-12 : http://www.trossenrobotics.com/store/p/ ... ensor.aspx

This sensor seems to be only compatible with the CM-510 or CM-700 but I was thinking that if we work with C it is possible to manage something.

Problem... I am not able to find any datasheet except this : http://support.robotis.com/en/techsuppo ... l_gyro.htm

So, few questions :
- Will we be able to connect the sensors in chain with the AX-12 (implicate to set it an ID, no ? Any idea of how it is possible ?)
- Do we need to create a new library or just use dx_write and read in the C code ?

If doesn't seem to be possible to use Libbioloid and CM-5 with the sensor we won't have any choice and use a CM-510 with the regular embedded C code...


I have the Gyro Sensor GS-12 here, it does not connect direct to the Dynamixel bus, but uses two of the 6 analogue to digital ports exposed by the CM-510 (one for X one for Y). I vaguely remember reading about efforts to add analogue sensors to the older CM-5 somewhere on this forum, but I think it was basically a custom circuit that pretends to be another ID on the Dynamixel bus that you read values from.

--Gary
garycmartin offline
Savvy Roboteer
Savvy Roboteer
Posts: 42
Joined: Fri Jan 15, 2010 9:27 pm

Post by PedroR » Tue Apr 12, 2011 4:19 pm

Post by PedroR
Tue Apr 12, 2011 4:19 pm

Hi

You can't atach any Analog sensor directly to the CM5 or the Dynamixel bus.

For CM5 there has been a solution (for a long time) called the pepper board. Details here http://robosavvy.com/site/index.php?opt ... nsor_board

It is essentially a small board that pretends to be a device on the Dynamixel bus (with an ID) and you connect the sensors to it.

You could also try and hack the AX-S1 by stripping out some of the sensors and solder on your own. The AX-S1 is a typical example of a board that functions like the the pepper board I mentioned above.

It's just that the AX-S1 comes from Robotis and is a polished and finished product with the distance sensors, sound sensor, etc. I haven't heard of anyone who's hacked an AX-S1 but that's possibly an alternative to the Pepper board.

Regards
Pedro
Hi

You can't atach any Analog sensor directly to the CM5 or the Dynamixel bus.

For CM5 there has been a solution (for a long time) called the pepper board. Details here http://robosavvy.com/site/index.php?opt ... nsor_board

It is essentially a small board that pretends to be a device on the Dynamixel bus (with an ID) and you connect the sensors to it.

You could also try and hack the AX-S1 by stripping out some of the sensors and solder on your own. The AX-S1 is a typical example of a board that functions like the the pepper board I mentioned above.

It's just that the AX-S1 comes from Robotis and is a polished and finished product with the distance sensors, sound sensor, etc. I haven't heard of anyone who's hacked an AX-S1 but that's possibly an alternative to the Pepper board.

Regards
Pedro
PedroR offline
Savvy Roboteer
Savvy Roboteer
Posts: 1199
Joined: Mon Jun 16, 2008 11:07 pm

Post by Julienne » Mon Apr 18, 2011 3:21 pm

Post by Julienne
Mon Apr 18, 2011 3:21 pm

Hi

Thank you for responding.

I really like the idea of hacking the AX S1 but I doubt that my teacher will allow me to destroy one...and if he does, we will need the gyro to regulate a inverted penduluum and maybe the whole component is to heavy for that.
Again maybe it is possible to remove the plastic "body"...but it makes a lot of maybe's !

I'll look further about the pepper board. My speciality is electronic so i shoulndt be that complicated.

I feel less comfortable with coding so...
Just one question : the pepper board was designed to use with embedded C code and not libbioloid. What about the compatibility ?

I know I just have to take a look to the code to have my answer but I'm very busy right now and if someone could help me it would be nice

Does someone know where i can find more informations about the gyro sensor GS 12 or do I have everything needed on the support of robotis ?

I'll let u know what when we have the time to work a little bit more :)
Hi

Thank you for responding.

I really like the idea of hacking the AX S1 but I doubt that my teacher will allow me to destroy one...and if he does, we will need the gyro to regulate a inverted penduluum and maybe the whole component is to heavy for that.
Again maybe it is possible to remove the plastic "body"...but it makes a lot of maybe's !

I'll look further about the pepper board. My speciality is electronic so i shoulndt be that complicated.

I feel less comfortable with coding so...
Just one question : the pepper board was designed to use with embedded C code and not libbioloid. What about the compatibility ?

I know I just have to take a look to the code to have my answer but I'm very busy right now and if someone could help me it would be nice

Does someone know where i can find more informations about the gyro sensor GS 12 or do I have everything needed on the support of robotis ?

I'll let u know what when we have the time to work a little bit more :)
Julienne offline
Newbie
Newbie
Posts: 4
Joined: Mon Apr 11, 2011 4:27 pm

Post by PedroR » Mon Apr 18, 2011 5:09 pm

Post by PedroR
Mon Apr 18, 2011 5:09 pm

The use of a Pepper board is completelly un related to libbioloid.

libbioloid is a library to control the robot and interface with the Dynamixel bus.

A Pepper board is something design to "pretend" to be a Dynamixel device on the Dynamixel bus and can work with libbioloid, Roboplus or USB2Dynamixel, etc.

As for the Robotis Gyro, the specs should be avilable on the Robotis website.
However bear in mind that using the Pepper Board you can use a Gyro from any manufacturer or model; it doesn't have to be a gyro from Robotis.

In particular, for inverse pendulum applications (that you mentioned) it is imortant to choose a gyro that has an appropriate deg/sec rating. There are gyros that go from 75deg/sec to 300 deg/sec.
I am not a specialist in inverse pendulum (I know little about it) but I think you'll need a gyro with a low deg/sec rating. I'd recommend you google about it to find out more. Any Analog gyro (or sensor) should work with the Pepper board.

Regards
Pedro.
The use of a Pepper board is completelly un related to libbioloid.

libbioloid is a library to control the robot and interface with the Dynamixel bus.

A Pepper board is something design to "pretend" to be a Dynamixel device on the Dynamixel bus and can work with libbioloid, Roboplus or USB2Dynamixel, etc.

As for the Robotis Gyro, the specs should be avilable on the Robotis website.
However bear in mind that using the Pepper Board you can use a Gyro from any manufacturer or model; it doesn't have to be a gyro from Robotis.

In particular, for inverse pendulum applications (that you mentioned) it is imortant to choose a gyro that has an appropriate deg/sec rating. There are gyros that go from 75deg/sec to 300 deg/sec.
I am not a specialist in inverse pendulum (I know little about it) but I think you'll need a gyro with a low deg/sec rating. I'd recommend you google about it to find out more. Any Analog gyro (or sensor) should work with the Pepper board.

Regards
Pedro.
PedroR offline
Savvy Roboteer
Savvy Roboteer
Posts: 1199
Joined: Mon Jun 16, 2008 11:07 pm

PreviousNext
PreviousNext
289 postsPage 18 of 201 ... 15, 16, 17, 18, 19, 20
289 postsPage 18 of 201 ... 15, 16, 17, 18, 19, 20