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

Control you Bioloid using a robostix

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

Control you Bioloid using a robostix

Post by JonHylands » Wed Dec 06, 2006 1:20 pm

Post by JonHylands
Wed Dec 06, 2006 1:20 pm

Last night I was successfully able to use my gumstix to talk to a servo using a robostix connected to the Bioloid bus.

The robostix is a general purpose standalone ATMega128 controller board, and you can use it connected to a PC or connected to a gumstix (or anything else with a serial port, for that matter).

I've posted an explanation to my blog:

http://www.huv.com/blog

I also posted a link to the source code that runs on the robostix.

- Jon
Last night I was successfully able to use my gumstix to talk to a servo using a robostix connected to the Bioloid bus.

The robostix is a general purpose standalone ATMega128 controller board, and you can use it connected to a PC or connected to a gumstix (or anything else with a serial port, for that matter).

I've posted an explanation to my blog:

http://www.huv.com/blog

I also posted a link to the source code that runs on the robostix.

- Jon
JonHylands
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 512
Joined: Thu Nov 09, 2006 1:00 am
Location: Ontario, Canada

Post by AndrewF » Wed Dec 06, 2006 7:01 pm

Post by AndrewF
Wed Dec 06, 2006 7:01 pm

This is sweet! I see that you connect to the robostix at 128kbps, twice as fast as the Management mode allows. I was wondering if it is possible to get the full 1Mbps throughput into a wireless channel (bluetooth or Wifi) at full 1Mbps speed?

Nice!
Andrew
This is sweet! I see that you connect to the robostix at 128kbps, twice as fast as the Management mode allows. I was wondering if it is possible to get the full 1Mbps throughput into a wireless channel (bluetooth or Wifi) at full 1Mbps speed?

Nice!
Andrew
AndrewF
Robot Builder
Robot Builder
User avatar
Posts: 7
Joined: Sat Nov 04, 2006 1:00 am

Post by JonHylands » Wed Dec 06, 2006 7:50 pm

Post by JonHylands
Wed Dec 06, 2006 7:50 pm

Since the robostix can communicate at 1 Mbps on its hardware UARTs, I suspect if you had another serial device which could comminicate fast enough with it, it wouldn't be a problem.

For what I'm doing, 115K should be fast enough. If you're sending and receiving on average 25 bytes per servo, with 20 servos, you're looking at roughly 500 bytes per cycle. If you're running 10 cycles per second, that's 5000 bytes per second, which is 50,000 bits per second, which is half speed. So, with those averages, you could run 20-25 cycles per second at 115K.

I'm planning on running about 10 cycles per second, but since I'm going to be implementing "force-based" rather than "position-based" motion, I hope that I will be okay. If not, well, I'll have to figure something else out. One option is to use the HWUART on the gumstix to talk to the robostix. It maxes out at 921 Kbps.

- Jon
Since the robostix can communicate at 1 Mbps on its hardware UARTs, I suspect if you had another serial device which could comminicate fast enough with it, it wouldn't be a problem.

For what I'm doing, 115K should be fast enough. If you're sending and receiving on average 25 bytes per servo, with 20 servos, you're looking at roughly 500 bytes per cycle. If you're running 10 cycles per second, that's 5000 bytes per second, which is 50,000 bits per second, which is half speed. So, with those averages, you could run 20-25 cycles per second at 115K.

I'm planning on running about 10 cycles per second, but since I'm going to be implementing "force-based" rather than "position-based" motion, I hope that I will be okay. If not, well, I'll have to figure something else out. One option is to use the HWUART on the gumstix to talk to the robostix. It maxes out at 921 Kbps.

- Jon
JonHylands
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 512
Joined: Thu Nov 09, 2006 1:00 am
Location: Ontario, Canada

Post by AndrewF » Wed Dec 06, 2006 8:07 pm

Post by AndrewF
Wed Dec 06, 2006 8:07 pm

Ahh, I see.

I am also interested in force control, and I suspect we will need ~30 cycles/sec or greater for reactive biped walking. The HWUART bus you mention looks promising, potentially capable of getting almost the full 1Mbps to the gumstix, which could then go Wifi via 802.11b CF card or bluetooth (though pulling 1Mbps out of bluetooth seems wishful).

I am very interested in your project, please update us if you manage to implement wireless into the strategy (running behavioral code on the robot is over-emphasized today, and should be seen as the endpoint, rather than the starting point, of robot behavior prototyping).

Again, nice job. Successful robotics ideas will only spread if their implementation is reproducible, which requires the robot and its parts (gumstix) be affordable. That is why I believe this work is on the bleeding edge of robot technology.

-Andrew
Ahh, I see.

I am also interested in force control, and I suspect we will need ~30 cycles/sec or greater for reactive biped walking. The HWUART bus you mention looks promising, potentially capable of getting almost the full 1Mbps to the gumstix, which could then go Wifi via 802.11b CF card or bluetooth (though pulling 1Mbps out of bluetooth seems wishful).

I am very interested in your project, please update us if you manage to implement wireless into the strategy (running behavioral code on the robot is over-emphasized today, and should be seen as the endpoint, rather than the starting point, of robot behavior prototyping).

Again, nice job. Successful robotics ideas will only spread if their implementation is reproducible, which requires the robot and its parts (gumstix) be affordable. That is why I believe this work is on the bleeding edge of robot technology.

-Andrew
AndrewF
Robot Builder
Robot Builder
User avatar
Posts: 7
Joined: Sat Nov 04, 2006 1:00 am

Post by AndrewF » Wed Dec 06, 2006 8:19 pm

Post by AndrewF
Wed Dec 06, 2006 8:19 pm

On second look, it seems that the new gumstix to be released this month will have Bluetooth 2.0, capable of 2.1 Mbps, which may be totally sufficient to bring the full 1Mbps Bioloid wireless...
On second look, it seems that the new gumstix to be released this month will have Bluetooth 2.0, capable of 2.1 Mbps, which may be totally sufficient to bring the full 1Mbps Bioloid wireless...
AndrewF
Robot Builder
Robot Builder
User avatar
Posts: 7
Joined: Sat Nov 04, 2006 1:00 am

Post by JonHylands » Wed Dec 06, 2006 9:05 pm

Post by JonHylands
Wed Dec 06, 2006 9:05 pm

Andrew,

Actually, running behavioral code on the robot is what I am planning, mainly because I can. I suppose the simplest thing to do if you wanted that would be to get one of these:

http://www.sparkfun.com/commerce/produc ... cts_id=665

You could interface that to the SPI on the robostix, and get your full 1 Mbps from a wireless link into the robostix and then into the Bioloid bus.

With respect to force control - you may be right. Of course, if its done right, with full use of the SYNC_WRITE command, it shouldn't be a problem to get that down to 10-12 bytes per servo per cycle, which would easily allow 30-40 cycles per second.

The nice thing about the development environment I am using (Squeak Smalltalk) is that it runs identically on a Windows PC and a gumstix. So switching to wireless over 802.11 is basically a quick hardware swap, and changing to use a socket interface instead of a serial port (and Squeak has support for both of those options).

- Jon
Andrew,

Actually, running behavioral code on the robot is what I am planning, mainly because I can. I suppose the simplest thing to do if you wanted that would be to get one of these:

http://www.sparkfun.com/commerce/produc ... cts_id=665

You could interface that to the SPI on the robostix, and get your full 1 Mbps from a wireless link into the robostix and then into the Bioloid bus.

With respect to force control - you may be right. Of course, if its done right, with full use of the SYNC_WRITE command, it shouldn't be a problem to get that down to 10-12 bytes per servo per cycle, which would easily allow 30-40 cycles per second.

The nice thing about the development environment I am using (Squeak Smalltalk) is that it runs identically on a Windows PC and a gumstix. So switching to wireless over 802.11 is basically a quick hardware swap, and changing to use a socket interface instead of a serial port (and Squeak has support for both of those options).

- Jon
JonHylands
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 512
Joined: Thu Nov 09, 2006 1:00 am
Location: Ontario, Canada

Post by AndrewF » Wed Dec 06, 2006 10:16 pm

Post by AndrewF
Wed Dec 06, 2006 10:16 pm

Wow, that's cool. My goal is to get a wireless "management mode" (which I think is equivalent to sending bytes over the bioloid bus) with the most bandwidth and lowest latency possible. Looking more at sparkfun, I came across this:
http://www.sparkfun.com/commerce/produc ... ts_id=660#

Would this be able to take the RS-485 of the Bioloid bus and put it directly onto Wifi, without robostix? A follow up question would be what are the solder points?

Apologies for my ignorance, I'm starting a robot lab to run psychological models on. A side effect is that I must make these robots usable by psychology students (with CS backgrounds), myself included.

Thanks for all of your insights and help,
Andrew Felch
Wow, that's cool. My goal is to get a wireless "management mode" (which I think is equivalent to sending bytes over the bioloid bus) with the most bandwidth and lowest latency possible. Looking more at sparkfun, I came across this:
http://www.sparkfun.com/commerce/produc ... ts_id=660#

Would this be able to take the RS-485 of the Bioloid bus and put it directly onto Wifi, without robostix? A follow up question would be what are the solder points?

Apologies for my ignorance, I'm starting a robot lab to run psychological models on. A side effect is that I must make these robots usable by psychology students (with CS backgrounds), myself included.

Thanks for all of your insights and help,
Andrew Felch
AndrewF
Robot Builder
Robot Builder
User avatar
Posts: 7
Joined: Sat Nov 04, 2006 1:00 am

Post by JonHylands » Wed Dec 06, 2006 10:56 pm

Post by JonHylands
Wed Dec 06, 2006 10:56 pm

The Bioloid bus (using the AX-12 servos) is not an RS-485 bus. It is a single wire, half-duplex RS-232 type serial bus, although at TTL voltage levels.

I think you will need to use the robostix or something like it in order to accomplish this.

- Jon
The Bioloid bus (using the AX-12 servos) is not an RS-485 bus. It is a single wire, half-duplex RS-232 type serial bus, although at TTL voltage levels.

I think you will need to use the robostix or something like it in order to accomplish this.

- Jon
JonHylands
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 512
Joined: Thu Nov 09, 2006 1:00 am
Location: Ontario, Canada

Post by AndrewF » Thu Dec 07, 2006 6:21 pm

Post by AndrewF
Thu Dec 07, 2006 6:21 pm

It would be great if there were some kind of tutorial for getting the Bioloid wireless at these new improved high speeds. Currently I plan to use management mode via bluetooth at 57kbps, but higher speeds would decrease cycle time, and the number of parameters that can be passed per servo, and increase the number of servos that can be controlled.
It would be great if there were some kind of tutorial for getting the Bioloid wireless at these new improved high speeds. Currently I plan to use management mode via bluetooth at 57kbps, but higher speeds would decrease cycle time, and the number of parameters that can be passed per servo, and increase the number of servos that can be controlled.
AndrewF
Robot Builder
Robot Builder
User avatar
Posts: 7
Joined: Sat Nov 04, 2006 1:00 am

Post by JonHylands » Thu Dec 07, 2006 7:28 pm

Post by JonHylands
Thu Dec 07, 2006 7:28 pm

Well, in simple terms, this is what you can do:

- get a robostix
- get a wifi/serial module (mentioned above)

You can connect the Wifi module to the robostix using SPI to get 1 Mbps throughput between the Wifi module and the robostix. The robostix, using one of its two hardware UARTs, can talk to the Bioloid bus at 1 Mbps.

That would require changes to the robostix program that my brother wrote (see my blog for details and a link to the source code).

http://www.huv.com/blog

This gives you faster throughput, although there may be a cost in latency. Whether or not it is too much I can't say, but it is certainly an interesting option, one that I may try as well.

- Jon
Well, in simple terms, this is what you can do:

- get a robostix
- get a wifi/serial module (mentioned above)

You can connect the Wifi module to the robostix using SPI to get 1 Mbps throughput between the Wifi module and the robostix. The robostix, using one of its two hardware UARTs, can talk to the Bioloid bus at 1 Mbps.

That would require changes to the robostix program that my brother wrote (see my blog for details and a link to the source code).

http://www.huv.com/blog

This gives you faster throughput, although there may be a cost in latency. Whether or not it is too much I can't say, but it is certainly an interesting option, one that I may try as well.

- Jon
JonHylands
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 512
Joined: Thu Nov 09, 2006 1:00 am
Location: Ontario, Canada

Post by JonHylands » Thu Dec 07, 2006 7:50 pm

Post by JonHylands
Thu Dec 07, 2006 7:50 pm

Update - I looked at the data sheet again :(

The module they sell from Sparkfun is the 101 model, which does not support SPI.

So, you could do 921 Kbps to the robostix over the RS-232 connection.

Or, you could do 400 Kbps over an I2C connection, and save the second hardware UART on the robostix for a digital camera connection, which can run at 921 Kbps.

- Jon
Update - I looked at the data sheet again :(

The module they sell from Sparkfun is the 101 model, which does not support SPI.

So, you could do 921 Kbps to the robostix over the RS-232 connection.

Or, you could do 400 Kbps over an I2C connection, and save the second hardware UART on the robostix for a digital camera connection, which can run at 921 Kbps.

- Jon
JonHylands
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 512
Joined: Thu Nov 09, 2006 1:00 am
Location: Ontario, Canada

Post by JonHylands » Thu Dec 07, 2006 8:08 pm

Post by JonHylands
Thu Dec 07, 2006 8:08 pm

Update again:

Found another supplier that has the 102 module, for cheaper :D

http://www.quatech.com/catalog/airborne ... es_emb.php

The specific module you would want is this one:

WLNB-AN-DP102

So the SPI option is still available...

- Jon
Update again:

Found another supplier that has the 102 module, for cheaper :D

http://www.quatech.com/catalog/airborne ... es_emb.php

The specific module you would want is this one:

WLNB-AN-DP102

So the SPI option is still available...

- Jon
JonHylands
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 512
Joined: Thu Nov 09, 2006 1:00 am
Location: Ontario, Canada

Post by AndrewF » Thu Dec 07, 2006 8:16 pm

Post by AndrewF
Thu Dec 07, 2006 8:16 pm

Woot!

You caught me mid-reply as I was bummed that the wireless solution was not as simple as we had hoped.

This is great news. Let me kow if you are able to get that working, this seems like it would open up the Bioloid to the level of Aibo research class, and perhaps draw a wide audience

(currently there is no replacement for the Aibo in terms of power, price, and ease-of-use, as indicated by the following excerpt from the Pyro mailing list:

<email excerpts>

Greetings,



Can anyone suggest an alternative hardware platform to AIBO?



I recently (actual, it's been a few month now) received a small internal
grant to purchase 4-5

AIBO for my AI class using the PYRO. Unfortunately, although this seems a
pretty good idea

when I wrote the proposal in January, I can not get any AIBO now that the
money is available.

I'm wondering if any of you could suggest an alternative to AIBO. I'm
looking for something that

is relatively powerful and is supported by PYRO in the window's
environment. As for my AI class,

I just wanted to do a few simple modules such as reactive control and
behavior-based control modules

plus one other advanced module. Since it'll be just be a relatively small
part of the AI class, I'd really

like to work with something that's sufficiently sophisticated yet already
supported by PYRO simulator

so as to minimize the learning curve. That's also pretty much the reason
that I selected AIBO, besides it being so cool.



Any help will be greatly appreciated!



William Yu

Computer Science

Southern Illinois University Edwardsville


<reply>
William,

This is the $64,000 question!

Unfortunately, there is not a $64,000 answer. The answer will really
depend on the details of what you want to explore, what you value, and
how much money you want to spend.

There are pros and cons to all of the following options, and maybe other
will have their own opinions. But, here are some options (all of these
have some type of vision, and either work with Pyro, or soon will):

1. Roomba, from iRobot. This option is quite cost-effective, and with
some clever thinking, you can do a lot. I really think a modern robot
has to have a camera, and you can put a laptop with a webcam on the
roomba. My roomba is in the mail, so I can't personally can't comment
yet on the recent additions to Pyro by James Snow that allow Pyro to
control the roomba. (James's code looks excellent, though!) Also, Pyro's
vision code currently only works under Linux. This isn't a
self-contained robot though, so it will take a little work to get the
laptop, software, webcam, and needed parts.

2. ePuck, from GCtronic. I'm just starting to test this out. It is a
little pricey and small, but looks like a nice challenger to the
Khepera, if you like desktop robotics. Pyro support should be easy (may
use the exact same commands as Khepera, which is already supported).

3. Hemisson, from K-Team, and RoadNarrows. A little pricey (once you add
all of the needed attachments) and is missing odometry (which the Aibo
never had). The vision is done through a separate wireless analog
connection. I have had issues with dropped connections, but I know Kim
and Robin have been working on this for a couple of years.

4. Surveyor SRV-1, from Surveyor.com. I don't know very much about this
one, but it looks like it might be able to quite a bit. I have one of
these in the mail, too, so I'll know more in a week or two.

5. AmigoBot from MobileRobot.com. The smallest and cheapest (but still
pricey) from the company that produces many robots for research. It can
play wav files, has a wireless camera (like the Hemisson), and uses the
standard MobileRobot interface. Pyro should work with it through the
Player interface. I haven't had one for 8 years, so others might have
more to say.

6. Pioneer from MobileRobot.com. The standard in research robotics. Very
pricey, but very flexible. Comes in a variety of options (indoor,
outdoor, PeopleBot, gripper, etc).

There are some other options on the horizon (few months off), and this
will surely be a topic at both AAAI Spring Symposium, and at SIGCSE.

Any other ideas?

-Doug
</email excerpts>

-Andrew
Woot!

You caught me mid-reply as I was bummed that the wireless solution was not as simple as we had hoped.

This is great news. Let me kow if you are able to get that working, this seems like it would open up the Bioloid to the level of Aibo research class, and perhaps draw a wide audience

(currently there is no replacement for the Aibo in terms of power, price, and ease-of-use, as indicated by the following excerpt from the Pyro mailing list:

<email excerpts>

Greetings,



Can anyone suggest an alternative hardware platform to AIBO?



I recently (actual, it's been a few month now) received a small internal
grant to purchase 4-5

AIBO for my AI class using the PYRO. Unfortunately, although this seems a
pretty good idea

when I wrote the proposal in January, I can not get any AIBO now that the
money is available.

I'm wondering if any of you could suggest an alternative to AIBO. I'm
looking for something that

is relatively powerful and is supported by PYRO in the window's
environment. As for my AI class,

I just wanted to do a few simple modules such as reactive control and
behavior-based control modules

plus one other advanced module. Since it'll be just be a relatively small
part of the AI class, I'd really

like to work with something that's sufficiently sophisticated yet already
supported by PYRO simulator

so as to minimize the learning curve. That's also pretty much the reason
that I selected AIBO, besides it being so cool.



Any help will be greatly appreciated!



William Yu

Computer Science

Southern Illinois University Edwardsville


<reply>
William,

This is the $64,000 question!

Unfortunately, there is not a $64,000 answer. The answer will really
depend on the details of what you want to explore, what you value, and
how much money you want to spend.

There are pros and cons to all of the following options, and maybe other
will have their own opinions. But, here are some options (all of these
have some type of vision, and either work with Pyro, or soon will):

1. Roomba, from iRobot. This option is quite cost-effective, and with
some clever thinking, you can do a lot. I really think a modern robot
has to have a camera, and you can put a laptop with a webcam on the
roomba. My roomba is in the mail, so I can't personally can't comment
yet on the recent additions to Pyro by James Snow that allow Pyro to
control the roomba. (James's code looks excellent, though!) Also, Pyro's
vision code currently only works under Linux. This isn't a
self-contained robot though, so it will take a little work to get the
laptop, software, webcam, and needed parts.

2. ePuck, from GCtronic. I'm just starting to test this out. It is a
little pricey and small, but looks like a nice challenger to the
Khepera, if you like desktop robotics. Pyro support should be easy (may
use the exact same commands as Khepera, which is already supported).

3. Hemisson, from K-Team, and RoadNarrows. A little pricey (once you add
all of the needed attachments) and is missing odometry (which the Aibo
never had). The vision is done through a separate wireless analog
connection. I have had issues with dropped connections, but I know Kim
and Robin have been working on this for a couple of years.

4. Surveyor SRV-1, from Surveyor.com. I don't know very much about this
one, but it looks like it might be able to quite a bit. I have one of
these in the mail, too, so I'll know more in a week or two.

5. AmigoBot from MobileRobot.com. The smallest and cheapest (but still
pricey) from the company that produces many robots for research. It can
play wav files, has a wireless camera (like the Hemisson), and uses the
standard MobileRobot interface. Pyro should work with it through the
Player interface. I haven't had one for 8 years, so others might have
more to say.

6. Pioneer from MobileRobot.com. The standard in research robotics. Very
pricey, but very flexible. Comes in a variety of options (indoor,
outdoor, PeopleBot, gripper, etc).

There are some other options on the horizon (few months off), and this
will surely be a topic at both AAAI Spring Symposium, and at SIGCSE.

Any other ideas?

-Doug
</email excerpts>

-Andrew
AndrewF
Robot Builder
Robot Builder
User avatar
Posts: 7
Joined: Sat Nov 04, 2006 1:00 am

Post by Robo1 » Fri Dec 08, 2006 12:13 pm

Post by Robo1
Fri Dec 08, 2006 12:13 pm

Just a quick point you can still buy new Sony dogs of ebay.

bren
Just a quick point you can still buy new Sony dogs of ebay.

bren
Robo1
Savvy Roboteer
Savvy Roboteer
Posts: 501
Joined: Fri Jun 30, 2006 1:00 am
Location: UK - Bristol

Post by limor » Sun Dec 10, 2006 11:16 pm

Post by limor
Sun Dec 10, 2006 11:16 pm

AndrewF wrote:On second look, it seems that the new gumstix to be released this month will have Bluetooth 2.0, capable of 2.1 Mbps, which may be totally sufficient to bring the full 1Mbps Bioloid wireless...


we've been testing throughput and latency with TCP over BT on a Gumstix (BT 1.0) and the results for ping are about 80ms latency and throughput about 11,000 bytes/sec.

This latency is to be expected from Bluetooth (google search). The throughput was surprizingly high because the Bluetooth serial link was very lossy.

The implications are that if you want to implement "closed loop control" over TCP over BT you can only do about 12 control cycles/sec from the remote PC.

This is not too bad overall because if you design a multi-rate closed-loop control then the Gumstix with its 400mhz can do a pretty good job to deal with at least 100 cycles/sec.

ie: remote PC can deal with path planning while Gumstix can deal with balancing fall avoidance.



JonHylands : please post the schematics of his Robostix->AX12 hookup. I've coppied this picture from your blog and marked the mystery connections. (resistor, power etc.)

Image
AndrewF wrote:On second look, it seems that the new gumstix to be released this month will have Bluetooth 2.0, capable of 2.1 Mbps, which may be totally sufficient to bring the full 1Mbps Bioloid wireless...


we've been testing throughput and latency with TCP over BT on a Gumstix (BT 1.0) and the results for ping are about 80ms latency and throughput about 11,000 bytes/sec.

This latency is to be expected from Bluetooth (google search). The throughput was surprizingly high because the Bluetooth serial link was very lossy.

The implications are that if you want to implement "closed loop control" over TCP over BT you can only do about 12 control cycles/sec from the remote PC.

This is not too bad overall because if you design a multi-rate closed-loop control then the Gumstix with its 400mhz can do a pretty good job to deal with at least 100 cycles/sec.

ie: remote PC can deal with path planning while Gumstix can deal with balancing fall avoidance.



JonHylands : please post the schematics of his Robostix->AX12 hookup. I've coppied this picture from your blog and marked the mystery connections. (resistor, power etc.)

Image
limor
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1845
Joined: Mon Oct 11, 2004 1:00 am
Location: London, UK

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