PDA

View Full Version : Sphero ROS driver



DaveC
10-26-2012, 01:33 PM
Sparkfun just started carrying the Sphero, which is the first I've heard of the little beastie. Anyway, the Bluetooth protocol is published. I was wondering if anyone has started on a ROS driver for it? I think it would be interesting to have a ceiling-mounted camera watching a Sphero and driving it around. Anybody on this already?

Gertlex
10-26-2012, 03:47 PM
To save others the effort in wondering and then deciding to go find more info:
http://www.youtube.com/user/gosphero?feature=results_main
That be nifty as heck!

jwatte
10-26-2012, 05:09 PM
I'd want to stuff that in all possible stockings :-) But, yikes, it's $130! Amazon Link (http://www.amazon.com/gp/product/B0081J2LRC/ref=as_li_ss_tl?ie=UTF8&linkCode=as2&tag=enchage-20).

DaveC
10-26-2012, 09:16 PM
I'd want to stuff that in all possible stockings :-) But, yikes, it's $130! Amazon Link (http://www.amazon.com/gp/product/B0081J2LRC/ref=as_li_ss_tl?ie=UTF8&linkCode=as2&tag=enchage-20).

Yeah. It's a little pricey. I can think of a couple of cool things I want to do with it though. Both involve using an overhead camera and OpenCV to find the ball, and then send Bluetooth commands to drive it around.

I guess the ROSsy way to do things would be to come up with a Sphero driver that spoke the Bluetooth protocol and exposed an API that was convenient to code a ROS node against. Actually, I guess the node should just subscribe to the cmdvel topic. At least the URDF for the Sphero should be easy....

MikeyLikeyRobots
10-29-2012, 03:13 PM
That would be pretty amazing. I don't think it would be that difficult, since you are tracking a perfectly circular shape and it would be contrasted with a floor of one color. The API and SDK make it really easy to send a Roll Command to the ball. You just tell it to roll with a direction (0-359 degrees) and at a speed (0-100%).

I write a lot of the SDK for Orbotix, so if you have any questions, feel free to ask. This would also fit well on our forum (http://forum.gosphero.com/).

DaveC
10-30-2012, 10:58 AM
That would be pretty amazing. I don't think it would be that difficult, since you are tracking a perfectly circular shape and it would be contrasted with a floor of one color. The API and SDK make it really easy to send a Roll Command to the ball. You just tell it to roll with a direction (0-359 degrees) and at a speed (0-100%).

I write a lot of the SDK for Orbotix, so if you have any questions, feel free to ask. This would also fit well on our forum (http://forum.gosphero.com/).

A quick google turned up this Sphero Python module: https://github.com/faulkner/sphero which looks like it was very recently started. So, happily, it looks like someone is already headed down the path I was thinking about.

Turning a cmdvel message into a roll command should be easy. It looks like roll direction is in terms of vehicle coordinates, so that matches cmdvel.

MikeyLikeyRobots
10-30-2012, 12:16 PM
I'd want to stuff that in all possible stockings :-) But, yikes, it's $130! Amazon Link (http://www.amazon.com/gp/product/B0081J2LRC/ref=as_li_ss_tl?ie=UTF8&linkCode=as2&tag=enchage-20).

That's always the first thing said, but there's so much you can do with Sphero. It's like buying a hackable Xbox where all the games are free. http://www.youtube.com/watch?v=qeU2pQtCsW8

MikeyLikeyRobots
10-30-2012, 12:19 PM
A quick google turned up this Sphero Python module: https://github.com/faulkner/sphero which looks like it was very recently started. So, happily, it looks like someone is already headed down the path I was thinking about.

Turning a cmdvel message into a roll command should be easy. It looks like roll direction is in terms of vehicle coordinates, so that matches cmdvel.

Good find. You should continue development on it, and make it awesome. Here is the low-level bluetooth API - https://s3.amazonaws.com/docs.gosphero.com/api/Sphero_API_1.20.pdf

parcon
04-03-2013, 08:23 PM
I've built some early ROS C++ drivers based on bluez. They are available here (http://ros.org/wiki/ARL_sphero_command) (http://ros.org/wiki/ARL_sphero_command).