Problem using GPS (UART, NMEA) in DriveWorks 1.2

Hi,

We are using PX2 with latest Drive PDK and DeiveWorks 1.2.
GPS is connected through USB-to-serial converter that is present in the system as /dev/ttyUSB0.
I can open it in a serial terminal and see the NMEA messages coming from GPS.

When I run sample_gps_logger, I get a “GPS[0] - 6694488 ERROR DW_NOT_AVAILABLE” error.
The error happens at initialization time. It does not even matter if GPS is connected or not.

Detailed output:

./sample_gps_logger --driver=gps.uart --params=device=/dev/ttyUSB0

[23-10-2018 19:41:35] Initialize DriveWorks SDK v1.2.400
[23-10-2018 19:41:35] Release build with GNU 4.9.4 from v1.2.0-rc11-0-ga7f5475 against Vibrante PDK v5.0.10.3
[23-10-2018 19:41:35] Platform: Detected Drive PX2 - Tegra A
[23-10-2018 19:41:35] TimeSource: monotonic epoch time offset is 1540343990994929
[23-10-2018 19:41:35] Platform: number of GPU devices detected 2
[23-10-2018 19:41:35] Platform: currently selected GPU device discrete ID 0
[23-10-2018 19:41:35] SDK: Resources mounted from /usr/local/driveworks-1.2/data/resources
[23-10-2018 19:41:35] SDK: Create NvMediaDevice
[23-10-2018 19:41:35] SDK: Create NvMediaIPPManager
[23-10-2018 19:41:35] egl::Display: found 2 EGL devices
[23-10-2018 19:41:35] egl::Display: use drm device: drm-nvdc
[23-10-2018 19:41:35] SensorFactory::createSensor() → gps.uart, device=/dev/ttyUSB0
[23-10-2018 19:41:35] SensorFactory::createSensor() → gps.uart, device=/dev/ttyUSB0
GPS[0] - 6694488 ERROR DW_NOT_AVAILABLE
[23-10-2018 19:41:35] EndpointTTY: started on /dev/ttyUSB0

Do you know what causes this error and how to fix it?

Thanks,
Mikhail

Dear mikhailqydth,

Can I know which sensor you’re using?

The following is DriveWorks supported sensors for GPU.

GPS
 Xsens MTi-G-710 (serial based NMEA protocol + USB proprietary)
 Xsens MTI_G-710 (native)
 NovAtel SPAN-IGM (native)

Hi Steve,

We have Novatel SPAN, but I do not think we can connect it natively (USB). I think there is no Linux Novatel USB driver for ARM64 architecture (Drive PX2). I connect it over serial (RS232 UART) instead.

NVidia documentation suggests that DriveWorks can also work with generic NMEA over serial connection.
Command line option --driver=gps.uart for the GPS sample app should enable generic NMEA over serial connection (UART). Are you saying it is not implemented?

During testing I connect Novatel over RS232/UART and it sends NMEA messages, but the error I reported happens even if no GPS is connected.
I run this with ttyUSB0 being usb-to-serial adapter.
./sample_gps_logger --driver=gps.uart --params=device=/dev/ttyUSB0
Sometimes I do not even connect GPS to it, but I still get the error immediately after launch:
“GPS[0] - 6694488 ERROR DW_NOT_AVAILABLE”

Maybe --driver=gps.uart is not really supported? It is described in DriveWorks documentation as valid.

Thanks,

Mikhail

Dear mikhailqydth,

If the device is connected to the UART part of the DPX2, I would suggest that you run it with the following options.
Please try the following command and let me know if an error occurred? Thanks.
./sample_gps_logger --driver=gps.uart --params=device=/dev/ttyACM0

Hi Steve,

I am not using a built-in UART for DPX2. I am not even sure if built-in UART exists. There is only Aurix UART in DPX2.

I am using an external USB to UART converter. It works fine with DPX2. I can see the GPS NMEA messages coming through that converter/port if I open it in Serial Terminal software on DPX2 Linux.

However, that UART port shows up in Linux as /dev/ttyUSB0, not as /dev/ttyACM0.

If I run the command exactly as you proposed, I get an exception “DW_HAL_CANNOT_OPEN_CHANNEL: EndpointTTY: cannot open device”. And this is expected since there is no /dev/ttyACM0 device in my DPX2.

Therefore I run the command using my serial port device name (ttyUSB0):
./sample_gps_logger --driver=gps.uart --params=device=/dev/ttyUSB0

It is the same command that I was running originally (mentioned in my first post). And I get the same error as before:
“GPS[0] - 6694488 ERROR DW_NOT_AVAILABLE”
Please see my first post for detailed outupt.

“sample_gps_logger” application does not exit after error. It continues to run, but it does not do anything. It looks like it cannot read GPS messages.

Mikhail

We are encountering the same problem. We have NMEA UART device connected through USB to /dev/ttyACM0

Data we got looks reasonable:

$GNRMC,092254.00,A,4913.45748,N,01635.87315,E,0.086,,291018,,,D*62
$GNVTG,,T,,M,0.086,N,0.159,K,D*3B
$GNGGA,092254.00,4913.45748,N,01635.87315,E,2,11,1.41,226.8,M,42.4,M,,0000*4D
$GNGSA,A,3,18,08,11,32,01,27,03,22,,,,,2.52,1.41,2.08*10
$GNGSA,A,3,86,71,85,,,,,,,,,,2.52,1.41,2.08*12
$GPGSV,4,1,15,01,54,297,47,03,24,241,22,08,46,189,35,10,21,061,*7C
$GPGSV,4,2,15,11,69,281,48,14,49,114,,17,04,324,,18,85,323,41*7B
$GPGSV,4,3,15,22,47,244,41,24,01,015,,27,19,167,36,28,20,297,*71
$GPGSV,4,4,15,32,47,079,32,36,32,161,33,49,32,195,36*46
$GLGSV,2,1,08,70,49,042,,71,74,202,43,72,22,214,,78,09,343,*60
$GLGSV,2,2,08,79,08,021,,85,36,139,27,86,83,329,43,87,22,320,22*6A
$GNGLL,4913.45748,N,01635.87315,E,092254.00,A,D*76
$GNRMC,092255.00,A,4913.45750,N,01635.87318,E,0.054,,291018,,,D*68
$GNVTG,,T,,M,0.054,N,0.100,K,D*38
$GNGGA,092255.00,4913.45750,N,01635.87318,E,2,11,1.41,226.8,M,42.4,M,,0000*48
$GNGSA,A,3,18,08,11,32,01,27,03,22,,,,,2.52,1.41,2.08*10
$GNGSA,A,3,86,71,85,,,,,,,,,,2.52,1.41,2.08*12
$GPGSV,4,1,15,01,54,297,47,03,24,241,23,08,46,189,35,10,21,061,*7D
$GPGSV,4,2,15,11,69,281,48,14,49,114,,17,04,324,,18,85,323,41*7B
$GPGSV,4,3,15,22,47,244,41,24,01,015,,27,19,167,36,28,20,297,*71
$GPGSV,4,4,15,32,47,079,32,36,32,161,33,49,32,195,36*46
$GLGSV,2,1,08,70,49,042,,71,74,202,43,72,22,214,,78,09,343,*60
$GLGSV,2,2,08,79,08,021,,85,36,139,28,86,83,329,43,87,22,320,22*65
$GNGLL,4913.45750,N,01635.87318,E,092255.00,A,D*73

Even recorder can record it, but we can not replay it:

./sample_gps_logger --driver=gps.uart --params=device=/dev/ttyACM0,baud=9600
[29-10-2018 2:23:51] Initialize DriveWorks SDK v1.2.400
[29-10-2018 2:23:51] Release build with GNU 4.9.4 from v1.2.0-rc11-0-ga7f5475 against Vibrante PDK v5.0.10.3
[29-10-2018 2:23:51] Platform: Detected Drive PX2 - Tegra A
[29-10-2018 2:23:51] TimeSource: monotonic epoch time offset is 1540802649055916
[29-10-2018 2:23:51] TimeSource: PTP ioctl returned error. Synchronized time will not be available.
[29-10-2018 2:23:51] TimeSource: Could not detect valid PTP time source at 'eth0'. Fallback to CLOCK_MONOTONIC.
[29-10-2018 2:23:51] Platform: number of GPU devices detected 2
[29-10-2018 2:23:51] Platform: currently selected GPU device discrete ID 0
[29-10-2018 2:23:51] SDK: Resources mounted from /usr/local/driveworks-1.2/data/resources
[29-10-2018 2:23:51] SDK: Create NvMediaDevice
[29-10-2018 2:23:51] SDK: Create NvMediaIPPManager
[29-10-2018 2:23:51] egl::Display: found 2 EGL devices
[29-10-2018 2:23:51] egl::Display: use drm device: drm-nvdc
[29-10-2018 2:23:51] SensorFactory::createSensor() -> gps.uart, device=/dev/ttyACM0,baud=9600
[29-10-2018 2:23:51] SensorFactory::createSensor() -> gps.uart, device=/dev/ttyACM0,baud=9600
GPS[0] - 6694488 ERROR DW_NOT_AVAILABLE
[29-10-2018 2:23:51] EndpointTTY: started on /dev/ttyACM0

Thanks for help!

Dear tomas.cernik,

DriveWorks GPS NMEA decoder expects the NMEA sentence prefix for RMC and GGA to be “GP”. The logs you attached show “GN” instead (GNRMC, GNGGA, …). As per GPSD redirection page this prefix is the “Talker ID” and refers to the type of unit. Our gps.uart driver currently only supports “GP”.

Please let me know if you need GN. Thanks.

Edit:
I was going to complain about GPS not working in driveworks, but I was using unsupported baudrate for serial port. As I learned, the max supported baudrate in driveworks is 115200 bps. It works with 115200.

I have a new question.
DriveWorks “gps.uart” driver parses NMEA messages coming from GPS and extracts the data that can be read by the user app.
I can configure my GPS to enable/disable specific NMEA messages and the result is reflected in “sample_gps_logger” output. For example, I need to enable GPGSA message to get “hdop” and “vdop” values in the sample output.

However, I never see “climb” value in “sample_gps_logger” output. I can see from the source code that this value is potentially available for user. Do you know what NMEA message I need to enable to get “climb” value from driveworks?
Maybe “climb” is only available with something like Novatel GPS (gps.novatel driver), not with generic NMEA GPS (“gps.uart” driver)?

Dear mikhailqydth,

The standard NMEA messages do not provide vertical speed / climb data, therefore we do not populate the corresponding field in dwGPSFrame (and the corresponding bit in the flags bit-field should be reset). Looking at the code, we currently only support climb data for XSens GPS. Thanks.