Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

error: libavr/flash.h: No such file or directory?

Bioloid robot kit from Korean company Robotis; CM5 controller block, AX12 servos..
21 postsPage 1 of 21, 2
21 postsPage 1 of 21, 2

error: libavr/flash.h: No such file or directory?

Post by buhochileno » Sat Jun 13, 2009 2:41 am

Post by buhochileno
Sat Jun 13, 2009 2:41 am

Hi guys,

First post, so Hi to all!!, my name is Mauricio and I write you from Chile and I'm a new happy owner of a bioloid expert kit and a linux fan and programmer, so this is a great find to me!!, thank you very much for the lib but I'm having newbee compilation problems, running make inside the libbioloid example dir I get:
error: libavr/flash.h: No such file or directory

I install all avr related rpms for my fedora 10 system but nothing...what I'm missing?, of course those file are not where the program seems to try to locate them, so what else do I need to install?, or I need to put in /usr/inclide the libavr-xxx.tgz .h files?

Thanks!!

Mauricio
Hi guys,

First post, so Hi to all!!, my name is Mauricio and I write you from Chile and I'm a new happy owner of a bioloid expert kit and a linux fan and programmer, so this is a great find to me!!, thank you very much for the lib but I'm having newbee compilation problems, running make inside the libbioloid example dir I get:
error: libavr/flash.h: No such file or directory

I install all avr related rpms for my fedora 10 system but nothing...what I'm missing?, of course those file are not where the program seems to try to locate them, so what else do I need to install?, or I need to put in /usr/inclide the libavr-xxx.tgz .h files?

Thanks!!

Mauricio
buhochileno
Savvy Roboteer
Savvy Roboteer
Posts: 37
Joined: Sat Jun 13, 2009 2:05 am

Post by StuartL » Sat Jun 13, 2009 10:12 pm

Post by StuartL
Sat Jun 13, 2009 10:12 pm

This may seem like a daft question, but is libavr/flash.h actually present anywhere in the source tree? If so:

- What is your directory tree?
- Which directory are you running the compile from?
- What are you using in the way of compiler options/command line?

Stuart
This may seem like a daft question, but is libavr/flash.h actually present anywhere in the source tree? If so:

- What is your directory tree?
- Which directory are you running the compile from?
- What are you using in the way of compiler options/command line?

Stuart
StuartL
Savvy Roboteer
Savvy Roboteer
Posts: 350
Joined: Mon Jun 04, 2007 3:46 pm
Location: Thatcham, Berkshire, UK

Post by buhochileno » Sun Jun 14, 2009 12:26 am

Post by buhochileno
Sun Jun 14, 2009 12:26 am

StuartL wrote:This may seem like a daft question, but is libavr/flash.h actually present anywhere in the source tree? If so:

- What is your directory tree?
O here I'm, I download both .tgz to my fedora10 machine that it have all avr-gcc related packages,I umpaque libavr and libbioloid on my desktop and I run "make" at de example folder of the libbioloid tree,,

here my tree.:

|-- Desktop.
|-- libavr-2009-06-09-r1217
| |-- doc
| | |-- css
| | `-- libavr.html
| `-- libavr
| |-- LICENCE
| |-- libavr
| | |-- baud.h
...............
|-- libbioloid-2009-06-11-r1225
| |-- doc
| | |-- css
| | `-- libbioloid.html
| |-- example
| | |-- Makefile
| | |-- README
| | |-- common.mk
| | `-- example.c

...
- Which directory are you running the compile from?
from example inside libbioloid folder as its says in the readme file..
- What are you using in the way of compiler options/command line?
just make, need to do a -I/path/to/libavr..? I was thinking that those libs have to be previously installed on linux, need to install libavr first?, how?

Thanks


Stuart
StuartL wrote:This may seem like a daft question, but is libavr/flash.h actually present anywhere in the source tree? If so:

- What is your directory tree?
O here I'm, I download both .tgz to my fedora10 machine that it have all avr-gcc related packages,I umpaque libavr and libbioloid on my desktop and I run "make" at de example folder of the libbioloid tree,,

here my tree.:

|-- Desktop.
|-- libavr-2009-06-09-r1217
| |-- doc
| | |-- css
| | `-- libavr.html
| `-- libavr
| |-- LICENCE
| |-- libavr
| | |-- baud.h
...............
|-- libbioloid-2009-06-11-r1225
| |-- doc
| | |-- css
| | `-- libbioloid.html
| |-- example
| | |-- Makefile
| | |-- README
| | |-- common.mk
| | `-- example.c

...
- Which directory are you running the compile from?
from example inside libbioloid folder as its says in the readme file..
- What are you using in the way of compiler options/command line?
just make, need to do a -I/path/to/libavr..? I was thinking that those libs have to be previously installed on linux, need to install libavr first?, how?

Thanks


Stuart
buhochileno
Savvy Roboteer
Savvy Roboteer
Posts: 37
Joined: Sat Jun 13, 2009 2:05 am

Post by RandomMatt » Sun Jun 14, 2009 12:04 pm

Post by RandomMatt
Sun Jun 14, 2009 12:04 pm

You either need to:

* extract all the tgzs in the same directory, so you'd have one doc/ directory with libavr.html and libbioloid.html in it.

* or, edit the Makefile to fix the directories in the CFLAGS_AVR (the -I option)
You either need to:

* extract all the tgzs in the same directory, so you'd have one doc/ directory with libavr.html and libbioloid.html in it.

* or, edit the Makefile to fix the directories in the CFLAGS_AVR (the -I option)
RandomMatt
Savvy Roboteer
Savvy Roboteer
Posts: 117
Joined: Sat Dec 20, 2008 11:16 pm

Post by buhochileno » Sun Jun 14, 2009 11:28 pm

Post by buhochileno
Sun Jun 14, 2009 11:28 pm

RandomMatt wrote:You either need to:

* extract all the tgzs in the same directory, so you'd have one doc/ directory with libavr.html and libbioloid.html in it.

* or, edit the Makefile to fix the directories in the CFLAGS_AVR (the -I option)


Thanks !! yeap, both tgz extracted in the same place do the trick and the example.c was compiled, now I need to upload the example.hex to the bioloid, how? or do I need to go to windows to do that? (hopefully no.. :-S ..

Also the readme file says that with the example I can move some servos with q,a,w,s keys from my Pc keyboard? or with the biloid CM-5 buttons?...don't see any "connection" config/setting on the source code...

Sorry for the all this newbee questions, but I really want to learn about it... :-S

Mauricio

P.S: by the way, it seems that I subscrbe to the mailing list, but what is the mail to make a post?, suing the same as the one that I subscribe only retirn me a "not valid command.." mail..

Thanks again..
RandomMatt wrote:You either need to:

* extract all the tgzs in the same directory, so you'd have one doc/ directory with libavr.html and libbioloid.html in it.

* or, edit the Makefile to fix the directories in the CFLAGS_AVR (the -I option)


Thanks !! yeap, both tgz extracted in the same place do the trick and the example.c was compiled, now I need to upload the example.hex to the bioloid, how? or do I need to go to windows to do that? (hopefully no.. :-S ..

Also the readme file says that with the example I can move some servos with q,a,w,s keys from my Pc keyboard? or with the biloid CM-5 buttons?...don't see any "connection" config/setting on the source code...

Sorry for the all this newbee questions, but I really want to learn about it... :-S

Mauricio

P.S: by the way, it seems that I subscrbe to the mailing list, but what is the mail to make a post?, suing the same as the one that I subscribe only retirn me a "not valid command.." mail..

Thanks again..
buhochileno
Savvy Roboteer
Savvy Roboteer
Posts: 37
Joined: Sat Jun 13, 2009 2:05 am

Post by RandomMatt » Mon Jun 15, 2009 1:25 pm

Post by RandomMatt
Mon Jun 15, 2009 1:25 pm

programming the CM5

download libcompat as well, and make tools/programmer

it is quite simple to use:

Code: Select all
$ ../tools/programmer /dev/ttyUSB0 example.bin


programs the CM5.

Code: Select all
$ ../tools/programmer -t /dev/ttyUSB0


allows you to talk to CM5 - press # to reboot it, ~ to enter the supervisor, etc...

Code: Select all
 ../tools/programmer -t /dev/ttyUSB0 example.bin

programs it, and then stays running.

example
to move the servos press q, a, w or s.
use , and . to switch servos on and off.
use g to get the servo positions.

the buttons on the CM5 don't do anything useful... but if you press them you'll be able to see on the PC which ones you've pressed.

---

To be honest, you just need to read example.c - but i understand that you need it to pass the "don't waste my time" test first!

Mailing list
I cannot help you - StuartL is your man.
programming the CM5

download libcompat as well, and make tools/programmer

it is quite simple to use:

Code: Select all
$ ../tools/programmer /dev/ttyUSB0 example.bin


programs the CM5.

Code: Select all
$ ../tools/programmer -t /dev/ttyUSB0


allows you to talk to CM5 - press # to reboot it, ~ to enter the supervisor, etc...

Code: Select all
 ../tools/programmer -t /dev/ttyUSB0 example.bin

programs it, and then stays running.

example
to move the servos press q, a, w or s.
use , and . to switch servos on and off.
use g to get the servo positions.

the buttons on the CM5 don't do anything useful... but if you press them you'll be able to see on the PC which ones you've pressed.

---

To be honest, you just need to read example.c - but i understand that you need it to pass the "don't waste my time" test first!

Mailing list
I cannot help you - StuartL is your man.
RandomMatt
Savvy Roboteer
Savvy Roboteer
Posts: 117
Joined: Sat Dec 20, 2008 11:16 pm

Post by buhochileno » Wed Jun 17, 2009 9:37 pm

Post by buhochileno
Wed Jun 17, 2009 9:37 pm

RandomMatt wrote:programming the CM5

download libcompat as well, and make tools/programmer

it is quite simple to use:

Code: Select all
$ ../tools/programmer /dev/ttyUSB0 example.bin


programs the CM5.

Code: Select all
$ ../tools/programmer -t /dev/ttyUSB0


allows you to talk to CM5 - press # to reboot it, ~ to enter the supervisor, etc...

Code: Select all
 ../tools/programmer -t /dev/ttyUSB0 example.bin

programs it, and then stays running.
ok is working, but I'm kind of lost again, with that last command the example.bin is transfered to the cm-5 right? and then I get console like the "robot terminal"?, if that is the case the cm-5 have to be in "managed mode" right?...anyway testing I press "start" when the managed mode was blinking and I get the booting message as the "robot terminal" app, after that I can't write anithing on my keyboard..also none of the "a,s,w,q.." keys seems to work even if the console says to me that the CID of the selected servo is correct...
what is the correct procedure to work with this lib/program?, where can I find more info about it?, I read and read the example.c programm but it miss this procedures...

Other thing that I don't understend is the way in witch this libs/progs work, specially the libbioloid, the program writed and compiled with avr-gcc then is transfered and it run in the cm-5 right? I ask this becouse after I run the above commads I still able to run the previously loaded program like the humanoid behaviour one...may be that mean that the example.bin was not properly transfer?

example
to move the servos press q, a, w or s.
use , and . to switch servos on and off.
use g to get the servo positions.

the buttons on the CM5 don't do anything useful... but if you press them you'll be able to see on the PC which ones you've pressed.

ok
---

To be honest, you just need to read example.c - but i understand that you need it to pass the "don't waste my time" test first!

trust me, I read that code over and over but still don't find all the "setting up" needed steps..

Thanks and sorry for all the newbe questions,..

Mauricio

Mailing list
I cannot help you - StuartL is your man.
RandomMatt wrote:programming the CM5

download libcompat as well, and make tools/programmer

it is quite simple to use:

Code: Select all
$ ../tools/programmer /dev/ttyUSB0 example.bin


programs the CM5.

Code: Select all
$ ../tools/programmer -t /dev/ttyUSB0


allows you to talk to CM5 - press # to reboot it, ~ to enter the supervisor, etc...

Code: Select all
 ../tools/programmer -t /dev/ttyUSB0 example.bin

programs it, and then stays running.
ok is working, but I'm kind of lost again, with that last command the example.bin is transfered to the cm-5 right? and then I get console like the "robot terminal"?, if that is the case the cm-5 have to be in "managed mode" right?...anyway testing I press "start" when the managed mode was blinking and I get the booting message as the "robot terminal" app, after that I can't write anithing on my keyboard..also none of the "a,s,w,q.." keys seems to work even if the console says to me that the CID of the selected servo is correct...
what is the correct procedure to work with this lib/program?, where can I find more info about it?, I read and read the example.c programm but it miss this procedures...

Other thing that I don't understend is the way in witch this libs/progs work, specially the libbioloid, the program writed and compiled with avr-gcc then is transfered and it run in the cm-5 right? I ask this becouse after I run the above commads I still able to run the previously loaded program like the humanoid behaviour one...may be that mean that the example.bin was not properly transfer?

example
to move the servos press q, a, w or s.
use , and . to switch servos on and off.
use g to get the servo positions.

the buttons on the CM5 don't do anything useful... but if you press them you'll be able to see on the PC which ones you've pressed.

ok
---

To be honest, you just need to read example.c - but i understand that you need it to pass the "don't waste my time" test first!

trust me, I read that code over and over but still don't find all the "setting up" needed steps..

Thanks and sorry for all the newbe questions,..

Mauricio

Mailing list
I cannot help you - StuartL is your man.
buhochileno
Savvy Roboteer
Savvy Roboteer
Posts: 37
Joined: Sat Jun 13, 2009 2:05 am

Post by StuartL » Thu Jun 18, 2009 8:51 pm

Post by StuartL
Thu Jun 18, 2009 8:51 pm

buhochileno wrote:P.S: by the way, it seems that I subscrbe to the mailing list, but what is the mail to make a post?, suing the same as the one that I subscribe only retirn me a "not valid command.." mail..


It's maillist list name at braincell dot cx. In this case the mailing list name is 'robots'.

Enjoy!
buhochileno wrote:P.S: by the way, it seems that I subscrbe to the mailing list, but what is the mail to make a post?, suing the same as the one that I subscribe only retirn me a "not valid command.." mail..


It's maillist list name at braincell dot cx. In this case the mailing list name is 'robots'.

Enjoy!
StuartL
Savvy Roboteer
Savvy Roboteer
Posts: 350
Joined: Mon Jun 04, 2007 3:46 pm
Location: Thatcham, Berkshire, UK

Post by StuartL » Thu Jun 18, 2009 8:56 pm

Post by StuartL
Thu Jun 18, 2009 8:56 pm

Can you work on the quoting? Use the preview if you have to but it's really hard to spot which parts are questions and which parts are quotes...

buhochileno wrote:ok is working, but I'm kind of lost again, with that last command the example.bin is transfered to the cm-5 right? and then I get console like the "robot terminal"?, if that is the case the cm-5 have to be in "managed mode" right?...anyway testing I press "start" when the managed mode was blinking and I get the booting message as the "robot terminal" app, after that I can't write anithing on my keyboard..also none of the "a,s,w,q.." keys seems to work even if the console says to me that the CID of the selected servo is correct...
what is the correct procedure to work with this lib/program?, where can I find more info about it?, I read and read the example.c programm but it miss this procedures...


It sounds like the file transfer isn't working properly. Try using the '-t' without the filename first and prove that you get a robot console up.

If you now press and hold '#' and press reset/mode on the CM-5 you should get to the bootloader. Try typing 'help' for example.

If this works then all you need to do is restart the programmer with '-t' and a .bin filename. It'll sit there waiting for the CM-5 to respond, if it doesn't seem to then press 'reset' on the CM-5 and the programmer should detect that you're now in the bootloader.

RandomMatt: Have I missed anything?
Can you work on the quoting? Use the preview if you have to but it's really hard to spot which parts are questions and which parts are quotes...

buhochileno wrote:ok is working, but I'm kind of lost again, with that last command the example.bin is transfered to the cm-5 right? and then I get console like the "robot terminal"?, if that is the case the cm-5 have to be in "managed mode" right?...anyway testing I press "start" when the managed mode was blinking and I get the booting message as the "robot terminal" app, after that I can't write anithing on my keyboard..also none of the "a,s,w,q.." keys seems to work even if the console says to me that the CID of the selected servo is correct...
what is the correct procedure to work with this lib/program?, where can I find more info about it?, I read and read the example.c programm but it miss this procedures...


It sounds like the file transfer isn't working properly. Try using the '-t' without the filename first and prove that you get a robot console up.

If you now press and hold '#' and press reset/mode on the CM-5 you should get to the bootloader. Try typing 'help' for example.

If this works then all you need to do is restart the programmer with '-t' and a .bin filename. It'll sit there waiting for the CM-5 to respond, if it doesn't seem to then press 'reset' on the CM-5 and the programmer should detect that you're now in the bootloader.

RandomMatt: Have I missed anything?
StuartL
Savvy Roboteer
Savvy Roboteer
Posts: 350
Joined: Mon Jun 04, 2007 3:46 pm
Location: Thatcham, Berkshire, UK

Post by buhochileno » Thu Jun 18, 2009 9:47 pm

Post by buhochileno
Thu Jun 18, 2009 9:47 pm

StuartL wrote:Can you work on the quoting? Use the preview if you have to but it's really hard to spot which parts are questions and which parts are quotes...

ok sure, sorry it was my mistake I press "submit" until a preview...

StuartL wrote:It sounds like the file transfer isn't working properly. Try using the '-t' without the filename first and prove that you get a robot console up.

If you now press and hold '#' and press reset/mode on the CM-5 you should get to the bootloader. Try typing 'help' for example.


Yeap, I was doing all wrong, now I get the CM-5 console, to start with I was trying to use my second CM-5 with a servo with a bad ID..fix that I thing start to get better..the example.bit also begin to work on my primary CM-5 witch it have the 1 and 2 servos...

StuartL wrote:If this works then all you need to do is restart the programmer with '-t' and a .bin filename. It'll sit there waiting for the CM-5 to respond, if it doesn't seem to then press 'reset' on the CM-5 and the programmer should detect that you're now in the bootloader.

RandomMatt: Have I missed anything?


Now I have more specific questions:

when I run something like this:
./programm -t /dev/ttyUSB0 example.bin

As you say the program is transfered to the CM-5 and then keep interactive, when I end the console the "exmple.bin" it seems to not let me do nothing more in the CM-5 like change to manage or program modes and manage and play led's stay still as when the example.bin was runnit..How to reset thing?

My second one is about the "lastchar();" instruction in example.c, that instruction running on the CM-5 reads from the UART1 right?, without making any UART1 connection command at the CM-5?, if that is the case, is much more easy to programm than windows...

My last question is more like a sugestion from you:
I want to make some basic programms to be at the CM-5 like: move forward, left, right, etc..(like a cerebellum) and put more advanced analisys programs in a more powerfull brain (like my laptop). 1 option is to set the CM-5 in toss mode, in witch I can control the dynamixel bus directly from my C# program in mono/linux...but that option force me to put all the control logic in the laptop right?, I mean I can't mix toss mode instructions and a running program at the CM-5?
Second option is to put the basic movements program at the CM-5 and make a simple serial connection from C or C# to send the control data, to do that I can use something like the programmer.c?

Any other sugestions?

Thanks and I apreciate your patience..

Mauricio
StuartL wrote:Can you work on the quoting? Use the preview if you have to but it's really hard to spot which parts are questions and which parts are quotes...

ok sure, sorry it was my mistake I press "submit" until a preview...

StuartL wrote:It sounds like the file transfer isn't working properly. Try using the '-t' without the filename first and prove that you get a robot console up.

If you now press and hold '#' and press reset/mode on the CM-5 you should get to the bootloader. Try typing 'help' for example.


Yeap, I was doing all wrong, now I get the CM-5 console, to start with I was trying to use my second CM-5 with a servo with a bad ID..fix that I thing start to get better..the example.bit also begin to work on my primary CM-5 witch it have the 1 and 2 servos...

StuartL wrote:If this works then all you need to do is restart the programmer with '-t' and a .bin filename. It'll sit there waiting for the CM-5 to respond, if it doesn't seem to then press 'reset' on the CM-5 and the programmer should detect that you're now in the bootloader.

RandomMatt: Have I missed anything?


Now I have more specific questions:

when I run something like this:
./programm -t /dev/ttyUSB0 example.bin

As you say the program is transfered to the CM-5 and then keep interactive, when I end the console the "exmple.bin" it seems to not let me do nothing more in the CM-5 like change to manage or program modes and manage and play led's stay still as when the example.bin was runnit..How to reset thing?

My second one is about the "lastchar();" instruction in example.c, that instruction running on the CM-5 reads from the UART1 right?, without making any UART1 connection command at the CM-5?, if that is the case, is much more easy to programm than windows...

My last question is more like a sugestion from you:
I want to make some basic programms to be at the CM-5 like: move forward, left, right, etc..(like a cerebellum) and put more advanced analisys programs in a more powerfull brain (like my laptop). 1 option is to set the CM-5 in toss mode, in witch I can control the dynamixel bus directly from my C# program in mono/linux...but that option force me to put all the control logic in the laptop right?, I mean I can't mix toss mode instructions and a running program at the CM-5?
Second option is to put the basic movements program at the CM-5 and make a simple serial connection from C or C# to send the control data, to do that I can use something like the programmer.c?

Any other sugestions?

Thanks and I apreciate your patience..

Mauricio
buhochileno
Savvy Roboteer
Savvy Roboteer
Posts: 37
Joined: Sat Jun 13, 2009 2:05 am

Post by StuartL » Fri Jun 19, 2009 6:49 am

Post by StuartL
Fri Jun 19, 2009 6:49 am

buhochileno wrote:Now I have more specific questions:

when I run something like this:
./programm -t /dev/ttyUSB0 example.bin

As you say the program is transfered to the CM-5 and then keep interactive, when I end the console the "exmple.bin" it seems to not let me do nothing more in the CM-5 like change to manage or program modes and manage and play led's stay still as when the example.bin was runnit..How to reset thing?


From the console you can use '#' to put yourself back in the bootloader. This is part of libbioloid and effectively hooks every byte coming in the console port. If one of those bytes is '#' it reboots the software (through the bootloader) and if one of those bytes is '~' it reboots the software (through the bootloader) into the supervisor.

My second one is about the "lastchar();" instruction in example.c, that instruction running on the CM-5 reads from the UART1 right?, without making any UART1 connection command at the CM-5?, if that is the case, is much more easy to programm than windows...


Yes, that checks to see if a character has been received over the console UART. There are a few similar functions too if you browse the libbioloid source.

My last question is more like a sugestion from you:
I want to make some basic programms to be at the CM-5 like: move forward, left, right, etc..(like a cerebellum) and put more advanced analisys programs in a more powerfull brain (like my laptop). 1 option is to set the CM-5 in toss mode, in witch I can control the dynamixel bus directly from my C# program in mono/linux...but that option force me to put all the control logic in the laptop right?, I mean I can't mix toss mode instructions and a running program at the CM-5?
Second option is to put the basic movements program at the CM-5 and make a simple serial connection from C or C# to send the control data, to do that I can use something like the programmer.c?


The CM-5 is just about powerful enough for full inverse kinematics (google it :D) but not a lot more. If all you want to do is predefine motions and get the CM-5 to execute them on instruction from the laptop that's also fine.

RandomMatt and I are trying to put all of the intelligence in the CM-5 with the only inputs being a Playstation wireless controller. This is VERY slowly coming together, with all of the progress being made by RandomMatt :)
buhochileno wrote:Now I have more specific questions:

when I run something like this:
./programm -t /dev/ttyUSB0 example.bin

As you say the program is transfered to the CM-5 and then keep interactive, when I end the console the "exmple.bin" it seems to not let me do nothing more in the CM-5 like change to manage or program modes and manage and play led's stay still as when the example.bin was runnit..How to reset thing?


From the console you can use '#' to put yourself back in the bootloader. This is part of libbioloid and effectively hooks every byte coming in the console port. If one of those bytes is '#' it reboots the software (through the bootloader) and if one of those bytes is '~' it reboots the software (through the bootloader) into the supervisor.

My second one is about the "lastchar();" instruction in example.c, that instruction running on the CM-5 reads from the UART1 right?, without making any UART1 connection command at the CM-5?, if that is the case, is much more easy to programm than windows...


Yes, that checks to see if a character has been received over the console UART. There are a few similar functions too if you browse the libbioloid source.

My last question is more like a sugestion from you:
I want to make some basic programms to be at the CM-5 like: move forward, left, right, etc..(like a cerebellum) and put more advanced analisys programs in a more powerfull brain (like my laptop). 1 option is to set the CM-5 in toss mode, in witch I can control the dynamixel bus directly from my C# program in mono/linux...but that option force me to put all the control logic in the laptop right?, I mean I can't mix toss mode instructions and a running program at the CM-5?
Second option is to put the basic movements program at the CM-5 and make a simple serial connection from C or C# to send the control data, to do that I can use something like the programmer.c?


The CM-5 is just about powerful enough for full inverse kinematics (google it :D) but not a lot more. If all you want to do is predefine motions and get the CM-5 to execute them on instruction from the laptop that's also fine.

RandomMatt and I are trying to put all of the intelligence in the CM-5 with the only inputs being a Playstation wireless controller. This is VERY slowly coming together, with all of the progress being made by RandomMatt :)
StuartL
Savvy Roboteer
Savvy Roboteer
Posts: 350
Joined: Mon Jun 04, 2007 3:46 pm
Location: Thatcham, Berkshire, UK

Post by buhochileno » Fri Jun 19, 2009 6:40 pm

Post by buhochileno
Fri Jun 19, 2009 6:40 pm

From the console you can use '#' to put yourself back in the bootloader. This is part of libbioloid and effectively hooks every byte coming in the console port. If one of those bytes is '#' it reboots the software (through the bootloader) and if one of those bytes is '~' it reboots the software (through the bootloader) into the supervisor.

no luck, Still not clear to me, yes when I press "#" its rebot the software and with "~" get into the supervisor, but then how I return to the typical CM-5 terminal?, (like the one you enter when no example.bin program was transfered, the one that let you do "go 100 1000", "scan" and all that?)...

My second one is about the "lastchar();" instruction in example.c, that instruction running on the CM-5 reads from the UART1 right?, without making any UART1 connection command at the CM-5?, if that is the case, is much more easy to programm than windows...

Yes, that checks to see if a character has been received over the console UART. There are a few similar functions too if you browse the libbioloid source.


So, if a CM-5 running program is executing "lastchar" I can send a char from any programm to the serial port and is goin gto be readed right?, also the lastchar is a syncronous call right?, I mean that it block the executiong until something is readed from the UART1..?

Thanks
From the console you can use '#' to put yourself back in the bootloader. This is part of libbioloid and effectively hooks every byte coming in the console port. If one of those bytes is '#' it reboots the software (through the bootloader) and if one of those bytes is '~' it reboots the software (through the bootloader) into the supervisor.

no luck, Still not clear to me, yes when I press "#" its rebot the software and with "~" get into the supervisor, but then how I return to the typical CM-5 terminal?, (like the one you enter when no example.bin program was transfered, the one that let you do "go 100 1000", "scan" and all that?)...

My second one is about the "lastchar();" instruction in example.c, that instruction running on the CM-5 reads from the UART1 right?, without making any UART1 connection command at the CM-5?, if that is the case, is much more easy to programm than windows...

Yes, that checks to see if a character has been received over the console UART. There are a few similar functions too if you browse the libbioloid source.


So, if a CM-5 running program is executing "lastchar" I can send a char from any programm to the serial port and is goin gto be readed right?, also the lastchar is a syncronous call right?, I mean that it block the executiong until something is readed from the UART1..?

Thanks
buhochileno
Savvy Roboteer
Savvy Roboteer
Posts: 37
Joined: Sat Jun 13, 2009 2:05 am

Post by StuartL » Fri Jun 19, 2009 9:06 pm

Post by StuartL
Fri Jun 19, 2009 9:06 pm

buhochileno wrote: no luck, Still not clear to me, yes when I press "#" its rebot the software and with "~" get into the supervisor, but then how I return to the typical CM-5 terminal?, (like the one you enter when no example.bin program was transfered, the one that let you do "go 100 1000", "scan" and all that?)...


The example.bin completely replaces that software, you have to write what you want it to do :)

So, if a CM-5 running program is executing "lastchar" I can send a char from any programm to the serial port and is goin gto be readed right?, also the lastchar is a syncronous call right?, I mean that it block the executiong until something is readed from the UART1..?


lastchar() itself is asynchronous but I believe Matt implemented a getchar() or getch() for blocking calls.

You probably, though, don't want a blocking call. There are few occasions where you want to pause your software completely. You probably at least want to monitor the servo positions for stalls etc.
buhochileno wrote: no luck, Still not clear to me, yes when I press "#" its rebot the software and with "~" get into the supervisor, but then how I return to the typical CM-5 terminal?, (like the one you enter when no example.bin program was transfered, the one that let you do "go 100 1000", "scan" and all that?)...


The example.bin completely replaces that software, you have to write what you want it to do :)

So, if a CM-5 running program is executing "lastchar" I can send a char from any programm to the serial port and is goin gto be readed right?, also the lastchar is a syncronous call right?, I mean that it block the executiong until something is readed from the UART1..?


lastchar() itself is asynchronous but I believe Matt implemented a getchar() or getch() for blocking calls.

You probably, though, don't want a blocking call. There are few occasions where you want to pause your software completely. You probably at least want to monitor the servo positions for stalls etc.
StuartL
Savvy Roboteer
Savvy Roboteer
Posts: 350
Joined: Mon Jun 04, 2007 3:46 pm
Location: Thatcham, Berkshire, UK

Post by buhochileno » Fri Jun 19, 2009 10:02 pm

Post by buhochileno
Fri Jun 19, 2009 10:02 pm

The example.bin completely replaces that software, you have to write what you want it to do :)

ohhh ok, at least I was not doing something wrong again :-) , so what is the "correct" way to restore a software like that one?, restore the CM-5 firmware with the included behaviour program? (no problems in doing that to many times?), or any chance to transfer a .bgp or .hex file like the included one in the bioloid CD's?.
By the way, I kind of confuse about the .bin and .hex files used by bioloid, any good reading about that? (also confuse about the .bgp ones, but I supose that the behaviour program compile that ones before be transfered...right?)

Other question: the libbioloid is able to use the zegbee modules in any way?

Thanks for your kind help...
The example.bin completely replaces that software, you have to write what you want it to do :)

ohhh ok, at least I was not doing something wrong again :-) , so what is the "correct" way to restore a software like that one?, restore the CM-5 firmware with the included behaviour program? (no problems in doing that to many times?), or any chance to transfer a .bgp or .hex file like the included one in the bioloid CD's?.
By the way, I kind of confuse about the .bin and .hex files used by bioloid, any good reading about that? (also confuse about the .bgp ones, but I supose that the behaviour program compile that ones before be transfered...right?)

Other question: the libbioloid is able to use the zegbee modules in any way?

Thanks for your kind help...
buhochileno
Savvy Roboteer
Savvy Roboteer
Posts: 37
Joined: Sat Jun 13, 2009 2:05 am

Post by StuartL » Sat Jun 20, 2009 9:04 am

Post by StuartL
Sat Jun 20, 2009 9:04 am

buhochileno wrote:ohhh ok, at least I was not doing something wrong again :-) , so what is the "correct" way to restore a software like that one?, restore the CM-5 firmware with the included behaviour program? (no problems in doing that to many times?), or any chance to transfer a .bgp or .hex file like the included one in the bioloid CD's?.


The libbioloid standard make file should give you a .bin and a .hex for your example.c. The .hex and .bin contain the same data, just in different formats. BGP files are tokenised instructions to the Robotis ROM file (their equivalent of .hex or .bin).

By the way, I kind of confuse about the .bin and .hex files used by bioloid, any good reading about that? (also confuse about the .bgp ones, but I supose that the behaviour program compile that ones before be transfered...right?)


The .hex file is just an Intel format .bin file. There are many utilities to convert between the two. BCP provided with the Robotis kit converts the .rom file (which is very crudely encrypted) into the binary as it sends it to the robot through the bootloader. Robot Terminal converts the .hex file into binary as it sends it to the robot through the bootloader. We didn't bother with the conversion and instead just use the binary format directly.

This means that if you download a converter from .hex (or ihex) to binary you can convert the .hex files into binary and vice versa. You may even notice one in the makefile which we use to do exactly that :D

Other question: the libbioloid is able to use the zegbee modules in any way?


Yes, I currently use the zigbee module as a direct replacement for the serial port. You get packet loss on the zigbee which you don't get on the serial port and you need to be aware of that. libbioloid will automatically transmit the console output on both the zigbee and serial port and will switch to receive from the zigbee instead of the serial port if there's no serial cable plugged in.

We're using the PS2 controller for remote control and the zigbee for console output. In hindsight the reliable data transfer of bluetooth would be preferred but I bought the zigbee modules so that's what we use :)
buhochileno wrote:ohhh ok, at least I was not doing something wrong again :-) , so what is the "correct" way to restore a software like that one?, restore the CM-5 firmware with the included behaviour program? (no problems in doing that to many times?), or any chance to transfer a .bgp or .hex file like the included one in the bioloid CD's?.


The libbioloid standard make file should give you a .bin and a .hex for your example.c. The .hex and .bin contain the same data, just in different formats. BGP files are tokenised instructions to the Robotis ROM file (their equivalent of .hex or .bin).

By the way, I kind of confuse about the .bin and .hex files used by bioloid, any good reading about that? (also confuse about the .bgp ones, but I supose that the behaviour program compile that ones before be transfered...right?)


The .hex file is just an Intel format .bin file. There are many utilities to convert between the two. BCP provided with the Robotis kit converts the .rom file (which is very crudely encrypted) into the binary as it sends it to the robot through the bootloader. Robot Terminal converts the .hex file into binary as it sends it to the robot through the bootloader. We didn't bother with the conversion and instead just use the binary format directly.

This means that if you download a converter from .hex (or ihex) to binary you can convert the .hex files into binary and vice versa. You may even notice one in the makefile which we use to do exactly that :D

Other question: the libbioloid is able to use the zegbee modules in any way?


Yes, I currently use the zigbee module as a direct replacement for the serial port. You get packet loss on the zigbee which you don't get on the serial port and you need to be aware of that. libbioloid will automatically transmit the console output on both the zigbee and serial port and will switch to receive from the zigbee instead of the serial port if there's no serial cable plugged in.

We're using the PS2 controller for remote control and the zigbee for console output. In hindsight the reliable data transfer of bluetooth would be preferred but I bought the zigbee modules so that's what we use :)
StuartL
Savvy Roboteer
Savvy Roboteer
Posts: 350
Joined: Mon Jun 04, 2007 3:46 pm
Location: Thatcham, Berkshire, UK

Next
21 postsPage 1 of 21, 2
21 postsPage 1 of 21, 2