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

read data with C

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

read data with C

Post by freeforall » Mon May 21, 2007 11:43 am

Post by freeforall
Mon May 21, 2007 11:43 am

hello

Is there any function or command (in C or with the terminal) that permits to read data from the flash memory? I'd like to fetch the data corresponding to the walking sequence.

thank you
hello

Is there any function or command (in C or with the terminal) that permits to read data from the flash memory? I'd like to fetch the data corresponding to the walking sequence.

thank you
freeforall
Robot Builder
Robot Builder
User avatar
Posts: 19
Joined: Sat Nov 11, 2006 1:00 am

Post by Bullit » Mon May 21, 2007 5:18 pm

Post by Bullit
Mon May 21, 2007 5:18 pm

With the robot terminal you can type
up e000 10000
select a file to read into, then press mode. When the transfer is complete press end.
The 64k file collected is all 128 motion 512 pages.
You can also use the Behavior Editor to do the same thing.

For content or programming you can reference my post at Tribotix
With the robot terminal you can type
up e000 10000
select a file to read into, then press mode. When the transfer is complete press end.
The 64k file collected is all 128 motion 512 pages.
You can also use the Behavior Editor to do the same thing.

For content or programming you can reference my post at Tribotix
Image
Bullit
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 291
Joined: Wed May 31, 2006 1:00 am
Location: Near robot

Post by freeforall » Mon May 21, 2007 7:16 pm

Post by freeforall
Mon May 21, 2007 7:16 pm

I've tried the "up e000 10000" and it's not recognized by the terminal. (it displays "Bad command"). Is "up" the good command?
thx.
I've tried the "up e000 10000" and it's not recognized by the terminal. (it displays "Bad command"). Is "up" the good command?
thx.
freeforall
Robot Builder
Robot Builder
User avatar
Posts: 19
Joined: Sat Nov 11, 2006 1:00 am

Post by hivemind » Mon May 21, 2007 7:23 pm

Post by hivemind
Mon May 21, 2007 7:23 pm

freeforall, make sure you are in the bootloader when you use this (hold # and press reset on your robot to get there) - from there 'up e000 10000' should work fine.
freeforall, make sure you are in the bootloader when you use this (hold # and press reset on your robot to get there) - from there 'up e000 10000' should work fine.
hivemind
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 211
Joined: Sat Jul 01, 2006 1:00 am
Location: between my computer and robot.

Post by Bullit » Mon May 21, 2007 8:34 pm

Post by Bullit
Mon May 21, 2007 8:34 pm

Sorry about that I should have mentioned to make sure your in the bootloader program.
Sorry about that I should have mentioned to make sure your in the bootloader program.
Bullit
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 291
Joined: Wed May 31, 2006 1:00 am
Location: Near robot

Post by freeforall » Mon May 21, 2007 8:45 pm

Post by freeforall
Mon May 21, 2007 8:45 pm

Thank you. It works!

But actually that's not exactly what I want. in fact, I need the packets sent to the robot when a motion is executed. I performed a walking with the motion editor and I would like to fetch the instructions sent to the robot in order to launch them with the C function TxD80(). and thus I will be able to use the walking I performed with the motion editor in a program I wrote in C language.

Any ideas? Thank you.
Thank you. It works!

But actually that's not exactly what I want. in fact, I need the packets sent to the robot when a motion is executed. I performed a walking with the motion editor and I would like to fetch the instructions sent to the robot in order to launch them with the C function TxD80(). and thus I will be able to use the walking I performed with the motion editor in a program I wrote in C language.

Any ideas? Thank you.
freeforall
Robot Builder
Robot Builder
User avatar
Posts: 19
Joined: Sat Nov 11, 2006 1:00 am

Post by Bullit » Mon May 21, 2007 9:01 pm

Post by Bullit
Mon May 21, 2007 9:01 pm

Ok. With the bioloid firmware running you can actually control the cm-5 with hyper terminal. Once communication is established, I think two 0x13's must be sent from the PC, type in hyper terminal or robot terminal or send with your PC program:
Play N
where N is the page number you want to play (0-127). Followed with 0x13 (CR)

Most of this is in the bioloid users manual under the robot terminal section.
Ok. With the bioloid firmware running you can actually control the cm-5 with hyper terminal. Once communication is established, I think two 0x13's must be sent from the PC, type in hyper terminal or robot terminal or send with your PC program:
Play N
where N is the page number you want to play (0-127). Followed with 0x13 (CR)

Most of this is in the bioloid users manual under the robot terminal section.
Bullit
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 291
Joined: Wed May 31, 2006 1:00 am
Location: Near robot

Post by freeforall » Mon May 21, 2007 10:39 pm

Post by freeforall
Mon May 21, 2007 10:39 pm

I've already try it. the only thing that changes is using the command "play" in the terminal instead of the button "play" in the motion editor. it's not what I need. Actually what I'm exactly seeking for is to transfer the motion I performed with the Motion Editor, to the C program I created. There is no "play" function defined in C. All what I can do is sending packets of instructions to the robot with some functions already defined.
In my opinion the only way to use a motion that has already been created with the motion editor, is to capture the packets sent to the robot when the motion is played. Once the packets captured in the hexadecimal format, I can write them directly as the argument of a defined C function (which is TxD80() ) in order to play the motion. So any ideas to capture the packets sent to the robot when a motion is played?
I've already try it. the only thing that changes is using the command "play" in the terminal instead of the button "play" in the motion editor. it's not what I need. Actually what I'm exactly seeking for is to transfer the motion I performed with the Motion Editor, to the C program I created. There is no "play" function defined in C. All what I can do is sending packets of instructions to the robot with some functions already defined.
In my opinion the only way to use a motion that has already been created with the motion editor, is to capture the packets sent to the robot when the motion is played. Once the packets captured in the hexadecimal format, I can write them directly as the argument of a defined C function (which is TxD80() ) in order to play the motion. So any ideas to capture the packets sent to the robot when a motion is played?
freeforall
Robot Builder
Robot Builder
User avatar
Posts: 19
Joined: Sat Nov 11, 2006 1:00 am

Post by Bullit » Mon May 21, 2007 10:54 pm

Post by Bullit
Mon May 21, 2007 10:54 pm

All you need to do is record the data going from the CM-5 to the AX-12.
Just use HHD Free serial port monitor to record the packets with a PC. Use a high speed USB FTDI module solution as discussed elsewhere here. I think the USBtoDynamixel adapter also supports 1 Megabaud. This can be connected on the same bus.
Capture what happens when you play your page from the bioloid firmware / motion editor and parse it out.
All you need to do is record the data going from the CM-5 to the AX-12.
Just use HHD Free serial port monitor to record the packets with a PC. Use a high speed USB FTDI module solution as discussed elsewhere here. I think the USBtoDynamixel adapter also supports 1 Megabaud. This can be connected on the same bus.
Capture what happens when you play your page from the bioloid firmware / motion editor and parse it out.
Bullit
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 291
Joined: Wed May 31, 2006 1:00 am
Location: Near robot

Post by freeforall » Tue May 22, 2007 8:25 pm

Post by freeforall
Tue May 22, 2007 8:25 pm

Thank you Bullit for the software. it works very well.

I succeeded to capture the packets but it doesn't permit to launch the motion I created with the motion editor. I think it's normal. I realized that the packets sent from the PC to the robot are not the instructions that the CM-5 sends to the AX-12 but it's a request that the PC sends to the CM-5 in order to launch the motion. So it was a bad idea and there is no way to use the captured packets in a C program.

However, Bullit, I have question: is there any way to play a motion page with a C program?

thank you.
Thank you Bullit for the software. it works very well.

I succeeded to capture the packets but it doesn't permit to launch the motion I created with the motion editor. I think it's normal. I realized that the packets sent from the PC to the robot are not the instructions that the CM-5 sends to the AX-12 but it's a request that the PC sends to the CM-5 in order to launch the motion. So it was a bad idea and there is no way to use the captured packets in a C program.

However, Bullit, I have question: is there any way to play a motion page with a C program?

thank you.
freeforall
Robot Builder
Robot Builder
User avatar
Posts: 19
Joined: Sat Nov 11, 2006 1:00 am

Post by hivemind » Tue May 22, 2007 9:46 pm

Post by hivemind
Tue May 22, 2007 9:46 pm

freeforall,

It sounds as if you are using the serial port moniter to capture data sent from the PC to the CM-5. The data you would recieve from this would not be what you actually want. The S-curve is generated by the CM-5, not on the PC and therefore all you would recieve is a "play" command on the serial port moniter.

Instead I think you want to use the serial port monitor in conjunction with the USBtoDynamixel adapter - which must be connected on the CM-5 bus along with all of your servos. You would instead be monitoring the data sent from the CM-5 to the AX-12's, therefore getting the exact motion data. By playing the motion file, your robot will proceed to move, and all the while you will be gathering data.

I think this is what you are looking for?
freeforall,

It sounds as if you are using the serial port moniter to capture data sent from the PC to the CM-5. The data you would recieve from this would not be what you actually want. The S-curve is generated by the CM-5, not on the PC and therefore all you would recieve is a "play" command on the serial port moniter.

Instead I think you want to use the serial port monitor in conjunction with the USBtoDynamixel adapter - which must be connected on the CM-5 bus along with all of your servos. You would instead be monitoring the data sent from the CM-5 to the AX-12's, therefore getting the exact motion data. By playing the motion file, your robot will proceed to move, and all the while you will be gathering data.

I think this is what you are looking for?
Last edited by hivemind on Wed May 23, 2007 12:32 am, edited 1 time in total.
hivemind
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 211
Joined: Sat Jul 01, 2006 1:00 am
Location: between my computer and robot.

Post by freeforall » Tue May 22, 2007 10:07 pm

Post by freeforall
Tue May 22, 2007 10:07 pm

Yes, it's this what I'm looking for but I haven't an USBtoDynamixel adapter so I let down this solution. Otherwise, have you any idea how to play a motion page with a C program? If it's not possible please let me know to stop considering this solution and start looking for another thing.

Thank you.
Yes, it's this what I'm looking for but I haven't an USBtoDynamixel adapter so I let down this solution. Otherwise, have you any idea how to play a motion page with a C program? If it's not possible please let me know to stop considering this solution and start looking for another thing.

Thank you.
freeforall
Robot Builder
Robot Builder
User avatar
Posts: 19
Joined: Sat Nov 11, 2006 1:00 am

Post by billyzelsnack » Tue May 22, 2007 11:51 pm

Post by billyzelsnack
Tue May 22, 2007 11:51 pm

You could write a C proxy that just passes on anything sent to the CM5 directly onto the servos.
You could write a C proxy that just passes on anything sent to the CM5 directly onto the servos.
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am


13 postsPage 1 of 1
13 postsPage 1 of 1