Ask Your Question
1

¿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 ( https://github.com/wjwwood/serial/ ) 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
4

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!

EDIT:

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

edit flag offensive delete link more

Comments

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

Your Answer

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

Add Answer

Question Tools

Stats

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

Seen: 3,537 times

Last updated: Oct 20 '14