ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

¿There is an example of a working example of serial port on ROS Indigo and C++?

asked 2014-10-20 13:24:13 -0500

apojomovsky gravatar image

I'm working with ROS Indigo and Ubuntu 14.05, and I've found a serial library from William Woodall and John Harrison ( ) that seem to be exactly what I want. They say that is compatible with ROS, but I'm not finding the way to make it work. A working example with a "hello world" on serial port will be enough for me, because I think my problem is with the dependencies on the CMakeLists.txt.

PD: By now I'm able to compile and run the "serial_example.cpp" included on the package, but that doesn't use ROS, I've tried to make it work but i don't know where's my error.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2014-10-20 17:11:12 -0500

updated 2014-10-20 21:30:42 -0500

You can take a look at the code of some of the packages that use the serial package. For example:

should give you an idea on how to integrate it in a ROS package.

Hope it helps!


Here you have a very simplistic and crude example of a node using the serial package.

edit flag offensive delete link more


thank you very much for taking time to write this example, is exactly what I was looking for! worked like a charm!

apojomovsky gravatar image apojomovsky  ( 2014-10-21 07:14:58 -0500 )edit

@Gary Servin Thanks for putting the example together, you beat me to it :)

William gravatar image William  ( 2014-10-21 13:39:39 -0500 )edit

Question Tools


Asked: 2014-10-20 13:24:13 -0500

Seen: 3,780 times

Last updated: Oct 20 '14