Ask Your Question
0

How to use ROS to control mobile Lego Mindstorms robots? (was: ROS on Lego NXT over Wifi)

asked 2012-06-20 04:54:08 -0500

andreasw gravatar image

updated 2014-01-28 17:12:44 -0500

ngrennan gravatar image

Hi,

has anybody successfully connected to a NXT using ROS (e.g. nxt_lejos or nxt_ros) over remotely?

Which hardware did you use? How much effort did you put into making it work?

Best regards,

Andreas

edit retag flag offensive close merge delete

5 Answers

Sort by ยป oldest newest most voted
0

answered 2012-06-28 23:26:42 -0500

ipso gravatar image

While I have no personal experience with those sensors/blocks, I can say that nxt_ros only supports the 'standard' sensors/motors that come with the NXT set. Anything else will require you to add support. In theory however, using wifi would allow for (much) higher data rates and ranges. Of course you are still limited to what the brick can do, CPU wise.

The example shown here on the Dexter Industries blog looks promising: the 'only' thing for you to do would be to write a kind of 'proxy', akin to rosserial and nxt_ros itself actually (which is also a proxy). Perhaps nxt_ros could be extended to include support for such a setup.


what I've done in the past is to create a movable 'base' out of Legos, with a laptop / netbook on top. This allows the laptop to function as a wifi-bridge, alleviating the range problem. Bandwidth is still limited, as USB is still used.

edit flag offensive delete link more
0

answered 2012-07-04 21:49:24 -0500

andreasw gravatar image

Thank you for your replies. I supposed we'll develop a nxt_lejos or nxt_ros WiFi proxy for each of the mentioned WiFi Blocks, as I am sick and tired of messing with bluetooth issues ;)

Although I'm still curious whether there are other apporaches to Lego NXT over WiFi besides

  1. Building a model that is big enough to feature a netbook
  2. Writing a proxy for some WiFi block

Somebody could've tried - for example - to connect the NXT Brick to an android phone using bluetooth and either run android_core on this or use the phone as proxy (gaining access to GPS, a camera etc. alongside).

Best regards, Andreas

edit flag offensive delete link more

Comments

"connect the NXT Brick to an android phone using bluetooth": that still wouldn't solve the bandwidth limitations, just make the bluetooth link less of a limiting factor for robot mobility.

ipso gravatar imageipso ( 2012-07-04 22:31:18 -0500 )edit

Also, AFAIK it is better to edit / append your original question than to (ab)use an answer for that. Just add some 'EDIT: ..' lines there.

ipso gravatar imageipso ( 2012-07-04 22:34:04 -0500 )edit

@ipso: You're right. I meant to connect the phone via USB, sorry :)

andreasw gravatar imageandreasw ( 2012-07-04 23:18:48 -0500 )edit

@ipso: I just wanted to point out, that there could be other approaches to remote ROS-controlled NXTs. This is not supposed to be a new question. Sorry about the confusion.

andreasw gravatar imageandreasw ( 2012-07-04 23:19:53 -0500 )edit
0

answered 2012-07-03 11:15:05 -0500

rlinsalata gravatar image

The Dexter NXT Wifi Sensor is just that - a sensor. So essentially, you will need to write your own proxy as ipso said, along with a corresponding program on the NXT that will read the "sensor" messages (i.e. whatever custom messages you send over Wifi), and react to control the motors/send back sensors. There is currently no way to connect directly to the NXT's immediate command API connection, as the USB and Bluetooth do.

However, if you're in java already ... there is the Android NXT-Bluetooth SDK.

edit flag offensive delete link more
0

answered 2012-06-28 22:58:28 -0500

andreasw gravatar image

updated 2012-06-28 23:02:08 -0500

Thank you for your reply, ipso. I suppose I didn't make my concern clear enough ;)

The more precise question would've been:

    How to use ROS to control mobile Lego Mindstorms robots?

For our next term robotics lab, we're going to teach model based software development using java and mindstorms. As nxt_ros doesn't work properly with bluetooth (due to bandwith limitations), this either implies to build stationary robots only - which is a bit dull - or to find another way to connect nxt_ros or nxt_lejos to the brick remotely.

One options might be one of the available wifi blocks for mindstorms

I'm curious if anybody had similiar issues and how they've solved it and if somebody maybe had experience with external wifi adapters or other hardware solutions.

edit flag offensive delete link more

Comments

@andreasw "nxt_ros doesn't work properly with bluetooth (due to bandwith limitations)" Is that the case?

ChickenSoup gravatar imageChickenSoup ( 2012-06-28 23:04:14 -0500 )edit

@Peshala: well it depends on what you define as 'properly': yes there are bandwidth limitations, so you're limited to 6/7Hz instead of the 20 that is possible over USB (see this question for instance).

ipso gravatar imageipso ( 2012-06-28 23:13:42 -0500 )edit

@Peshala: Using a Brick with a contact sensor and a motor, I'm unable to detect any contact as the frequency breaks down to ~0.3Hz. Pressing the touch sensor even for minutes doesn't trigger a single Contact message with contact = true. This may be due to my desired frequency setting though.

andreasw gravatar imageandreasw ( 2012-07-04 21:55:26 -0500 )edit

@ipso: Thanks for the pointer. This may solve my concerns on using ROS with NXT for next semesters model based robotics lab :)

andreasw gravatar imageandreasw ( 2012-07-04 21:57:36 -0500 )edit

@andreasw: 0.3Hz? I'm inclined to say that something, somewhere is wrong in that case. I've had some pretty responsive behaviour from my brick over bluetooth. Certainly more than 5Hz.

ipso gravatar imageipso ( 2012-07-04 22:35:27 -0500 )edit

@ipso: Do you have an example robot setup/configuration I could test my environment/hardware with?

andreasw gravatar imageandreasw ( 2012-07-04 23:21:27 -0500 )edit

@andreasw: just use the nxt_ros tutorials, but over bluetooth. Be sure to adjust the appropriate parameters in the launch files as in the ROS answer mentioned earlier.

ipso gravatar imageipso ( 2012-07-04 23:23:54 -0500 )edit
0

answered 2012-06-28 01:52:21 -0500

ipso gravatar image

What do you mean exactly with 'over wifi'? The brick supports only usb and bluetooth, so I assume you are talking about anything after that? This would then also involve a multi machine ROS setup, with one machine running nxt_ros and some other(s) running a master and other nodes?

If so, this would not be any different from any other multi machine ROS setups. See ROS/Tutorials/MultipleMachines for general setup and here for some Windows details (in case you need it).

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2012-06-20 04:54:08 -0500

Seen: 2,036 times

Last updated: Jul 04 '12