I'm trying to use the nmea_serial_driver node (from the nmea_navsat_driver package) to read NMEA strings that are coming from a GPS unit I have plugged into a DB-9 serial port on my computer. The GPS is outputting standard GGA sentences at 4=38400 baud. The DB-9 port is COM1 which I'm pretty sure translates to /dev/ttyS0. I'm running this command:
$ rosrun nmea_navsat_driver nmea_serial_driver _port:=/dev/ttyUSB0 _baud:=38400
and I get this error message:
Traceback (most recent call last):
File "/opt/ros/indigo/lib/nmea_navsat_driver/nmea_serial_driver", line 49, in <module>
GPS = serial.Serial(port=serial_port, baudrate=serial_baud, timeout=2)
File "/usr/lib/python2.7/dist-packages/serial/serialutil.py", line 261, in __init__
self.open()
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 278, in open
raise SerialException("could not open port %s: %s:" % (self._port, msg))
serial.serialutil.SerialException: could not open port /dev/ttyS0: [Errno 13] permission denied: '/dev/ttyS0'
I don't know if I'm getting this message because the port hasn't been configured properly, because i don't have permission to touch the port (as the error suggests) or because I've got the wrong port/baudrate altogether. I have run the same command on ttyS1 and I got an identical error message. For reference, I ran the dmesg command:
$ dmesg | grep tty
and the output was the same regardless of whether or not the GPS was plugged in:
[ 0.000000] console [tty0] enabled
[ 0.471014] 00.08: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[ 0.492790] 00.09: ttyS1 at I/O 0x2f8 (irq = 4, base_baud = 115200) is a 16550A
[ 2.216655] cdc_acm 3-11:1.0: ttyACM0: USB ACM device
I suspect that this output can tell me something about the problem, but I don't understand much of it. Any help or advice on how to get the driver working will be greatly appreciated.
Originally posted by M@t on ROS Answers with karma: 2327 on 2016-04-14
Post score: 0