Can rosserial be used to communicate over xbee between a robot and a laptop
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).
Asked by Troy on 2014-01-15 17:07:59 UTC
Answers
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
Asked by davinci on 2014-01-15 22:13:40 UTC
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.
Asked by Troy on 2014-01-16 10:15:47 UTC
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.
Asked by tonybaltovski on 2014-01-20 03:49:17 UTC
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.
Asked by Troy on 2014-02-16 17:25:34 UTC
Is wifi not an option?
Asked by tonybaltovski on 2014-02-25 07:09:35 UTC
wifi range, especially over water is very limited
Asked by Troy on 2018-04-03 21:54:37 UTC
Troy, Can you share the code you wrote ?
Asked by tilak on 2019-01-13 00:52:37 UTC
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/abs/10.1002/rob.21718).
Asked by Troy on 2019-03-29 18:23:44 UTC
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.
Asked by BonOliver on 2018-04-03 19:47:50 UTC
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-Autonomous-Bathymetry
Asked by Troy on 2018-04-03 22:02:15 UTC