Ask Your Question
2

Can rosserial be used to communicate over xbee between a robot and a laptop

asked 2014-01-15 16:07:59 -0600

Troy gravatar image

updated 2014-01-28 17:19:03 -0600

ngrennan gravatar image

It seems that the rosserial package has been designed to allow remote sensors attached to smalled embedded/arduino devices to communicate with a pc running ros and act as ros nodes.

What I am putting together is a robot(an autonomous surface vessel) with ros hydro running on unbuntu installed on a pc104. I want to use an xbee to communicate from the robot to a laptop also running ros hydro to both send me some information on what is going on and also allow me to send messages (ie cmd_vel, so I can have manual control when needed).

Am I able to use this package to communicate over serial (through xbees) between 2 PC's both running full ROS installations? And if so, are there any examples out there?

I guess what I am after is are there any examples of a normal ros node(not running on arduino) sending/receiving data over an xbee using rosserial(preferably in python).

edit retag flag offensive close merge delete

Comments

I am having the same issue. There is no way to use rosserial with an Xbee attached directly to a computer if the Xbee is configured as an end node. It seems silly but appears to be a persistent issue, haven't been able to find a workaround.

BonOliver gravatar imageBonOliver ( 2018-04-03 19:47:50 -0600 )edit

I ended up writing some python modules to listen to published messages, package them up and broadcast them over the xbee. On my laptop I then had scripts to decode what the xbee heard and display it in a GUI. All code is here https://github.com/Troy-Wilson/ASV-Au...

Troy gravatar imageTroy ( 2018-04-03 22:02:15 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-01-15 21:13:40 -0600

davinci gravatar image

You can use two computers both with an arduino and a xbee to communicate with each other. You can look at http://wiki.ros.org/rosserial/Tutorials It is probably also possible to use a serial link from the computer directly to the Xbee. Look at http://wiki.ros.org/cereal_port or https://github.com/wjwwood/serial

edit flag offensive delete link more

Comments

I don't have an arduino attached to the computers so I guess you answer is that rossserial cannot be used in that case. I have got communication directly over the xbees working using pyserial (so similar to what you suggested through your last link), so I will continue on that vein and write a node on the robot that subscribes to the messages I want to send over the xbee and converts and send them, and listens to the xbee and publishes relevant info back into the robot. Thaks.

Troy gravatar imageTroy ( 2014-01-16 09:15:47 -0600 )edit

This can be done using rosserial_xbee (http://wiki.ros.org/rosserial_xbee?distro=fuerte). I've tested this using two series 1 pro xbees with an Arduino Mega on Hydro.

tonybaltovski gravatar imagetonybaltovski ( 2014-01-20 02:49:17 -0600 )edit

I was trying to do it without an arduino. Why should I need to put 2 arduino boards between my PC's. It would be nice if there was a package that allowed 2 PC's running ROS to directly communicate topics over xbee. In the end I just set up a node on the robot to communicate with the xbee over the serial port the topics that I was interested in, and then on the PC side wrote some python code and a QT interface to display it. That works, but it means I need to write new code for every extra topic I want to send between the robot and my laptop.

Troy gravatar imageTroy ( 2014-02-16 16:25:34 -0600 )edit

Is wifi not an option?

tonybaltovski gravatar imagetonybaltovski ( 2014-02-25 06:09:35 -0600 )edit

wifi range, especially over water is very limited

Troy gravatar imageTroy ( 2018-04-03 21:54:37 -0600 )edit

Troy, Can you share the code you wrote ?

tilak gravatar imagetilak ( 2019-01-12 23:52:37 -0600 )edit

Tiliak, as I mentioned in my comment, to code is on github(https://github.com/Troy-Wilson/ASV-Autonomous-Bathymetry). If you find it useful and use in in research it would be great if you could cite the paper I used in in ( https://onlinelibrary.wiley.com/doi/a... ).

Troy gravatar imageTroy ( 2019-03-29 18:23:44 -0600 )edit

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: 2014-01-15 16:07:59 -0600

Seen: 1,553 times

Last updated: Jan 15 '14