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

nmea_gps_driver in launch file

asked 2013-07-09 03:05:34 -0600

clungzta gravatar image

Hi, I am creating a launch file for my robot, I am trying to run the nmea_gps_driver in my launchfile this is what I have so far:

<node pkg="nmea_gps_driver" name="nmea_gps_launch" type="" args="_port:=/dev/ttyUSB0 _baud:=9600"/>

But when I launch it I get the following message and then error:

 File "/opt/ros/groovy/stacks/nmea_gps_driver/src/", line 112, in <module>
    data = GPS.readline()
  File "/usr/lib/python2.7/dist-packages/serial/", line 449, in read
    buf =, size-len(read))
OSError: [Errno 11] Resource temporarily unavailable

[nmea_gps_launch-27] process has died [pid 17480, exit code 1, cmd /opt/ros/groovy/stacks/nmea_gps_driver/src/ _port:=/dev/ttyUSB0 _baud:=9600 __name:=nmea_gps_launch __log:=/home/alex/.ros/log/60c20282-e895-11e2-8751-6036dd23d944/nmea_gps_launch-27.log].
log file: /home/alex/.ros/log/60c20282-e895-11e2-8751-6036dd23d944/nmea_gps_launch-27*.log

It is definatly a 9600 Baud Reciever and is showing up as /dev/ttyUSB0.

The following command works perfectly in the terminal and the GPS publishes data.

$ rosrun nmea_gps_driver _port:=/dev/ttyUSB0 _baud:=9600

Any Ideas?

edit retag flag offensive close merge delete


try other GPS pkg, may be gps_common, utm_odometry_node

sai gravatar image sai  ( 2013-07-09 04:24:34 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-12-12 06:01:50 -0600

joanpau gravatar image

If running the command with rosrun as in your command line example works fine, I do not see why your roslaunch fails (provided both are executed by the same user in the same environment, otherwise there might be some problem with the device file permissions, or even the gps might associated to a different /dev/ttyXXX).

However, you may try setting the parameters using <param> tags inside the <node> tags (which IMHO is a better style anyway):

  <node pkg="nmea_gps_driver" type="" name="nmea_gps_launch">
    <param name="port" type="str" value="/dev/ttyUSB0" />
    <param name="baud" type="int" value="9600" />

Maybe that makes a difference.

edit flag offensive delete link more

Question Tools


Asked: 2013-07-09 03:05:34 -0600

Seen: 263 times

Last updated: Dec 12 '13