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

real-time RN control

Hitec robotics including ROBONOVA humanoid, HSR-8498HB servos, MR C-3024 Controllers and RoboBasic
11 postsPage 1 of 1
11 postsPage 1 of 1

real-time RN control

Post by Albert » Wed Aug 23, 2006 7:21 am

Post by Albert
Wed Aug 23, 2006 7:21 am

Hi,

I want to control RN real-time using a PDA. That is, I want to create a control loop, such that I can send 10 to 20 times per second all servo positions from the PDA to the RN and read back sensor values. This way I can program some algorithms for robocup on the PDA.

Does somebody has an idea how to do this with RN?

The current board has a serial interface, but is this one fast enough to set all servo positions 10 to 20 times per second, while sending back sensor values?

Can the firmware of the current board be replaced with my own firmware? Or is there some Linux alternative?

thankx 4 the help!
Hi,

I want to control RN real-time using a PDA. That is, I want to create a control loop, such that I can send 10 to 20 times per second all servo positions from the PDA to the RN and read back sensor values. This way I can program some algorithms for robocup on the PDA.

Does somebody has an idea how to do this with RN?

The current board has a serial interface, but is this one fast enough to set all servo positions 10 to 20 times per second, while sending back sensor values?

Can the firmware of the current board be replaced with my own firmware? Or is there some Linux alternative?

thankx 4 the help!
Albert
Newbie
Newbie
User avatar
Posts: 5
Joined: Tue Aug 22, 2006 1:00 am
Location: Netherlands

Post by hivemind » Wed Aug 23, 2006 1:05 pm

Post by hivemind
Wed Aug 23, 2006 1:05 pm

I know that both Bullit and I are using bluetooth & java on our phones (and so are others) to send back a lot of feedback (gyros, accelerometer, a variable speed setting, etc.). But i believe it is rather slow (compared to what you are asking for).

Perhaps you could load your own bootloader onto the board and write everything in C. That would certainly allow you to run the feedback as much as needed. Although if you are going that route you may just want to replace the ATMega128 and go for something a bit stronger. Albiet the only limitation really seems to be RoboBasic, which unfortunetly seems to be REALLY basic in what you can do.

Another option is to wait for a new board to be developed and go with that. I know that a thread was started here about that by fleek.

But thats just my $.02, I'm sure someone else will have something more useful for you. :) Goodluck
I know that both Bullit and I are using bluetooth & java on our phones (and so are others) to send back a lot of feedback (gyros, accelerometer, a variable speed setting, etc.). But i believe it is rather slow (compared to what you are asking for).

Perhaps you could load your own bootloader onto the board and write everything in C. That would certainly allow you to run the feedback as much as needed. Although if you are going that route you may just want to replace the ATMega128 and go for something a bit stronger. Albiet the only limitation really seems to be RoboBasic, which unfortunetly seems to be REALLY basic in what you can do.

Another option is to wait for a new board to be developed and go with that. I know that a thread was started here about that by fleek.

But thats just my $.02, I'm sure someone else will have something more useful for you. :) Goodluck
Image
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 Albert » Wed Aug 23, 2006 1:25 pm

Post by Albert
Wed Aug 23, 2006 1:25 pm

Hi Hivemind,

Thankx for the info! Do you know any examples/projects that created a new boot loader for RS? The only software I need to write is something like:

Code: Select all
loop
   X = get_new_servo_positions_from_PDA( )
   Y = read_all_sensors( )   
   set_all_servo_positions( X ) // controls also velocity so that all servo's
                            // reach their target positions at the end of the sample period
   send_sensor_readings_to_PDA( Y )
   wait_for_next_sample_period( ) // 10 - 20 Hz
end


if I could put this into the RN I can create my humanoid PDA controlled soccer player! :)

The other option you mentioned (new board) is also an option, but I first want to know what I can do just with software.

Greetinzz,

Albert
Hi Hivemind,

Thankx for the info! Do you know any examples/projects that created a new boot loader for RS? The only software I need to write is something like:

Code: Select all
loop
   X = get_new_servo_positions_from_PDA( )
   Y = read_all_sensors( )   
   set_all_servo_positions( X ) // controls also velocity so that all servo's
                            // reach their target positions at the end of the sample period
   send_sensor_readings_to_PDA( Y )
   wait_for_next_sample_period( ) // 10 - 20 Hz
end


if I could put this into the RN I can create my humanoid PDA controlled soccer player! :)

The other option you mentioned (new board) is also an option, but I first want to know what I can do just with software.

Greetinzz,

Albert
Albert
Newbie
Newbie
User avatar
Posts: 5
Joined: Tue Aug 22, 2006 1:00 am
Location: Netherlands

Post by hivemind » Wed Aug 23, 2006 1:51 pm

Post by hivemind
Wed Aug 23, 2006 1:51 pm

Sorry, i will have to say that i do not know any examples for the bootloader. Although it is not something I have looked for much, so it could easily be out there.

I am however curious as to why you need real-time communication to your robot. If it is because you have some math going on the PDA side I still dont see why you actually need real-time. Because you really want the robot to talk to you once he has done the move, when he can accept a new move, or just before.

As for a servo readback, the servos are usually (as long as they have enough torque to get there) in exactly the spot you programmed them to go. What you can do is have another variable on both PDA and RN side where the RN changes this variable depending on which position he is in. For example:

if P(arbitrary #) = 0 then RN is standing, if P = 1 RN is crouching...

And so forth to all of your important positions. This takes time away from reading all the servos (which is slow anyway) and just sends a byte and the PDA can essentially know what that byte means and fill in the blanks. Furthermore, if your accelerometer readings are saying that you are not standing, you can have the PDA give you a red light and say the position is incorrect, re-read, and while doing so, the RN can get up independently (like a good robot should).

The only time i can see a real-time feedback loop is neccesary (other than a camera which could act independently) would be for a robot positioning system. Say you want your robot to survey a room, walk around, and then come back where he started. You would constantly be reading the accelerometer much the way a GPS works when it cant find a satelite. You could call your code the RPS.

But as for a soccer player, you can just set the basic commands and little feedback to the PDA. Have the robot as independent as you can (ie: get up on its own when it falls over regardless of what the PDA tells it to do first-or this can be a different 'mode'). I find the real challange is to make the robot do as much as it can on its own with no outside help (a controller). The robot becomes more autonomous and thus much more interesting.

The real advantage provided by a phone or PDA is the a screen. This allows you to have menu upon menu without the RoboBasic being bogged down. The PDA/phone side can have descriptions of all the modes and has a much faster processor than the RN.

So thats probably about $.05 for me now, heh. I agree that it would be nice to have interupts and real-time loops. But that isnt RoboBasic. The only thing you are getting real-time in is DELAYs and the Gyros. Other than that, youll need to find another way.

Goodluck, and btw, welcome to the forums.
Sorry, i will have to say that i do not know any examples for the bootloader. Although it is not something I have looked for much, so it could easily be out there.

I am however curious as to why you need real-time communication to your robot. If it is because you have some math going on the PDA side I still dont see why you actually need real-time. Because you really want the robot to talk to you once he has done the move, when he can accept a new move, or just before.

As for a servo readback, the servos are usually (as long as they have enough torque to get there) in exactly the spot you programmed them to go. What you can do is have another variable on both PDA and RN side where the RN changes this variable depending on which position he is in. For example:

if P(arbitrary #) = 0 then RN is standing, if P = 1 RN is crouching...

And so forth to all of your important positions. This takes time away from reading all the servos (which is slow anyway) and just sends a byte and the PDA can essentially know what that byte means and fill in the blanks. Furthermore, if your accelerometer readings are saying that you are not standing, you can have the PDA give you a red light and say the position is incorrect, re-read, and while doing so, the RN can get up independently (like a good robot should).

The only time i can see a real-time feedback loop is neccesary (other than a camera which could act independently) would be for a robot positioning system. Say you want your robot to survey a room, walk around, and then come back where he started. You would constantly be reading the accelerometer much the way a GPS works when it cant find a satelite. You could call your code the RPS.

But as for a soccer player, you can just set the basic commands and little feedback to the PDA. Have the robot as independent as you can (ie: get up on its own when it falls over regardless of what the PDA tells it to do first-or this can be a different 'mode'). I find the real challange is to make the robot do as much as it can on its own with no outside help (a controller). The robot becomes more autonomous and thus much more interesting.

The real advantage provided by a phone or PDA is the a screen. This allows you to have menu upon menu without the RoboBasic being bogged down. The PDA/phone side can have descriptions of all the modes and has a much faster processor than the RN.

So thats probably about $.05 for me now, heh. I agree that it would be nice to have interupts and real-time loops. But that isnt RoboBasic. The only thing you are getting real-time in is DELAYs and the Gyros. Other than that, youll need to find another way.

Goodluck, and btw, welcome to the forums.
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 Albert » Wed Aug 23, 2006 2:31 pm

Post by Albert
Wed Aug 23, 2006 2:31 pm

Hi,

The reason for realtime servo control using a PDA is the following:

Me and my team have developed a graphical programming environment for entertainment robots. With this program you can both edit motion graphs, as well as edit real-time algorithms. With our runtime motion engine (which needs a PDA) you can blend animated motions and behavioural algorithms at runtime.

Here is a screenshot of our editor:

Image


More information can be found at http://www.hitech-projects.com/icat .

We started with a user-interface robot called "iCat" (see my avatar), and now we want to apply it to a servo-based humanoid.

Greetinzz

albert
Hi,

The reason for realtime servo control using a PDA is the following:

Me and my team have developed a graphical programming environment for entertainment robots. With this program you can both edit motion graphs, as well as edit real-time algorithms. With our runtime motion engine (which needs a PDA) you can blend animated motions and behavioural algorithms at runtime.

Here is a screenshot of our editor:

Image


More information can be found at http://www.hitech-projects.com/icat .

We started with a user-interface robot called "iCat" (see my avatar), and now we want to apply it to a servo-based humanoid.

Greetinzz

albert
Albert
Newbie
Newbie
User avatar
Posts: 5
Joined: Tue Aug 22, 2006 1:00 am
Location: Netherlands

Post by i-Bot » Wed Aug 23, 2006 3:50 pm

Post by i-Bot
Wed Aug 23, 2006 3:50 pm

The command protocol I describe here is able to do what you want.
http://web.ukonline.co.uk/r.ibbotson/fi ... Serial.pdf. I actually have more detail if any command is especially interesting to you.

heinrichr has developed a class library around this, and also a PC based Robobasic compiler which executes using the motion commands. He is on vacation, but I think he intends to share in this forum when he returns.

I have hacked my C3024 to load a patched code which works at 115K all the time. but still have performance problems over bluetooth. Part is due the byte by byte protocol in each direction, but I think it ia also due to my bluesmirf config. I hope to resolve this weekend.
The command protocol I describe here is able to do what you want.
http://web.ukonline.co.uk/r.ibbotson/fi ... Serial.pdf. I actually have more detail if any command is especially interesting to you.

heinrichr has developed a class library around this, and also a PC based Robobasic compiler which executes using the motion commands. He is on vacation, but I think he intends to share in this forum when he returns.

I have hacked my C3024 to load a patched code which works at 115K all the time. but still have performance problems over bluetooth. Part is due the byte by byte protocol in each direction, but I think it ia also due to my bluesmirf config. I hope to resolve this weekend.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by Bullit » Wed Aug 23, 2006 5:06 pm

Post by Bullit
Wed Aug 23, 2006 5:06 pm

i-Bot, please fill us in on the details of your hacked code.
What tools were required? How did you go about disassembling the flash contents? What about fuse settings? Did you have to erase and reload the boot loader and main program?
Thanks any details would be very helpfull.
i-Bot, please fill us in on the details of your hacked code.
What tools were required? How did you go about disassembling the flash contents? What about fuse settings? Did you have to erase and reload the boot loader and main program?
Thanks any details would be very helpfull.
Image
Bullit
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 291
Joined: Wed May 31, 2006 1:00 am
Location: Near robot

Post by i-Bot » Wed Aug 23, 2006 8:30 pm

Post by i-Bot
Wed Aug 23, 2006 8:30 pm

sorry to be short, but I have a day job where I have overcommited myself

The C3024 code is in the robobasic executable. I will post the detail location this weekend.

I had to swap the processor for a virgin, since unable to crack the bootloader. Yes, lost the orignal bootloader. What the hell, Hitec/minrobots never used it this year !
sorry to be short, but I have a day job where I have overcommited myself

The C3024 code is in the robobasic executable. I will post the detail location this weekend.

I had to swap the processor for a virgin, since unable to crack the bootloader. Yes, lost the orignal bootloader. What the hell, Hitec/minrobots never used it this year !
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by limor » Sat Aug 26, 2006 12:29 pm

Post by limor
Sat Aug 26, 2006 12:29 pm

Hi Albert,

I completely agree with you regarding the necessity of real-time control loop. It will allow these servo driven humanoids to perform well on uneven terrain and unknown environments. Hopefully more teams in the humanoid robocup league will go this way next year. Two of the German teams have previously hacked the KHR-1 to get the positions in real-time one team tapped into the POT, the other designed a new controler board. KHR-1 and RN1 have similar feature of position feedback that was invented just to allow position capture for creating open-loop gaits.

Reading the RN1/KHR-1 servo positions has been discussed before on the forum. One possible limitation is that when you read the position, the servo is momentarily turned off. The effect of doing it at 50hz is that you loose some torque. The servos have undocumented serial control interface that may work better than the PWM feedback trick but not much information about that.

If you don't have the time to hack the board and protocols you may want to consider using the Bioloid as these servos were specifically designed for such applications of control research.
Hi Albert,

I completely agree with you regarding the necessity of real-time control loop. It will allow these servo driven humanoids to perform well on uneven terrain and unknown environments. Hopefully more teams in the humanoid robocup league will go this way next year. Two of the German teams have previously hacked the KHR-1 to get the positions in real-time one team tapped into the POT, the other designed a new controler board. KHR-1 and RN1 have similar feature of position feedback that was invented just to allow position capture for creating open-loop gaits.

Reading the RN1/KHR-1 servo positions has been discussed before on the forum. One possible limitation is that when you read the position, the servo is momentarily turned off. The effect of doing it at 50hz is that you loose some torque. The servos have undocumented serial control interface that may work better than the PWM feedback trick but not much information about that.

If you don't have the time to hack the board and protocols you may want to consider using the Bioloid as these servos were specifically designed for such applications of control research.
limor
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1845
Joined: Mon Oct 11, 2004 1:00 am
Location: London, UK

Post by Albert » Sat Aug 26, 2006 1:46 pm

Post by Albert
Sat Aug 26, 2006 1:46 pm

Hi Limor,

I just tried to find some movies of a walking Bioloid robot (see Bioloid site), but I only found some that show hand movements. How does a Bioloid compare mechanically with a RN? Can it move as fast as a RN?

At this site (http://www.botmag.com/articles/robotis_bioloid_edutainment_robot_kit.shtml) some more movies are found ... the dog moves fast enough for me, but still no demo of a humanoid walking. :(

It seems the users guide (http://www.tribotix.info/Downloads/Robotis/Bioloid/Bioloid%20User%27s%20Guide.pdf) nicely describes how to write your own program in C! :)

Still I'm unsure about :

[1] Can I attach my own sensors to the CM5
[2] Can I use the PC Link port for sending and receiving all positions/sensors data 10 to 20 times/sec.

Does somebody has some experience with this?

Greetinzz

albert
Hi Limor,

I just tried to find some movies of a walking Bioloid robot (see Bioloid site), but I only found some that show hand movements. How does a Bioloid compare mechanically with a RN? Can it move as fast as a RN?

At this site (http://www.botmag.com/articles/robotis_bioloid_edutainment_robot_kit.shtml) some more movies are found ... the dog moves fast enough for me, but still no demo of a humanoid walking. :(

It seems the users guide (http://www.tribotix.info/Downloads/Robotis/Bioloid/Bioloid%20User%27s%20Guide.pdf) nicely describes how to write your own program in C! :)

Still I'm unsure about :

[1] Can I attach my own sensors to the CM5
[2] Can I use the PC Link port for sending and receiving all positions/sensors data 10 to 20 times/sec.

Does somebody has some experience with this?

Greetinzz

albert
Albert
Newbie
Newbie
User avatar
Posts: 5
Joined: Tue Aug 22, 2006 1:00 am
Location: Netherlands

Post by hivemind » Sat Aug 26, 2006 1:59 pm

Post by hivemind
Sat Aug 26, 2006 1:59 pm

well here is the bioloid 18 dof walking. It is Pevs and he says it seems faster than the RN-1: 18 DOF bioloid
well here is the bioloid 18 dof walking. It is Pevs and he says it seems faster than the RN-1: 18 DOF bioloid
hivemind
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 211
Joined: Sat Jul 01, 2006 1:00 am
Location: between my computer and robot.


11 postsPage 1 of 1
11 postsPage 1 of 1