Ask Your Question

how to make ros node to communicate through serial port?

asked 2013-07-23 18:51:36 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hi, i have bag file containing /GPSFix. i want to feed this information to gps receiver in my gis application. gis application needs port address to connect. but how can i connect bagfile node to serial port or usb? can anyone help?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-07-23 19:18:10 -0500

lindzey gravatar image

If your GIS application is asking for a serial port, I'm assuming that it expects live GPS data in whatever raw format coming from the antenna. However, your bagfile contains data in the format that ROS uses to pass messages around, and those aren't going to be trivially compatible.

Does your GIS application have an option to load in pre-recorded data? If so, you might be able to write a simple node that subscribes to the /GPSFix messages and outputs a properly formatted file.

Alternatively, you're probably going to be stuck writing a node that pretends to be a GPS receiver, listening to the /GPSFix messages and emitting that data as properly-formatted serial packets. I haven't done it, but SO suggests that you can fake a serial connection.

edit flag offensive delete link more


thank u so much lindzey for your valuable response. your answer is enough for me. My GIS application having an option to load in pre-recorded data. so i will subscribe to the /GPSFix messages . thanks.

Bindu gravatar image Bindu  ( 2013-07-23 22:24:09 -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

1 follower


Asked: 2013-07-23 18:51:36 -0500

Seen: 360 times

Last updated: Jul 23 '13