DriveWorks SDK Reference
4.0.0 Release
For Test and Development only

samples/sensors/record/README.md
Go to the documentation of this file.
1 # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
2 
3 @page dwx_record_sample Simple Sensor Recording Sample
4 @tableofcontents
5 
6 @section dwx_record_sample_description Description
7 
8 The Simple Sensor Recording Sample allows you to record data from CAN, GPS, RADAR or LIDAR sensors.
9 
10 @section dwx_record_sample_running Running the Sample
11 
12 The syntax for calling the simple sensor recording sample is:
13 
14  ./sample_record --can-driver=[can.socket|can.aurix]
15  --can-params=[comma/separated/key/value/pairs]
16  --gps-driver=[gps.uart|gps.xsens|gps.novatel|gps.dataspeed]
17  --gps-params=[comma/separated/key/value/pairs]
18  --lidar-driver=[lidar.socket]
19  --lidar-params=[comma/separated/key/value/pairs]
20  --radar-driver=[radar.socket]
21  --radar-params=[comma/separated/key/value/pairs]
22  --write-file-gps=[path/to/gps/file]
23  --write-file-can=[path/to/canbus/file]
24  --write-file-lidar=[path/to/lidar/file]
25  --write-file-radar=[path/to/radar/file]
26 
27 where:
28 
29  --can-driver=[can.socket|can.aurix]
30  Specifies which CAN interface to use.
31  Default value: can.socket
32 
33  --can-params=[comma/separated/key/value/pairs]
34  Different parameters are available for each CAN driver.
35  Default value: none
36 
37  --gps-driver=[gps.uart|gps.xsens|gps.novatel|gps.dataspeed]
38  Specifies which GPS driver to use.
39  Default value: gps.uart
40 
41  --gps-params=[comma/separated/key/value/pairs]
42  Different parameters are available for each GPS driver.
43  Default value: none
44 
45  --lidar-driver=[lidar.socket]
46  Specifies which Lidar driver to use.
47  Default value: lidar.socket
48 
49  --lidar-params=[comma/separated/key/value/pairs]
50  Different parameters are available for each Lidar driver.
51  Default value: none
52 
53  --radar-driver=[radar.socket]
54  Specifies which Radar driver to use.
55  Default value: radar.socket
56 
57  --radar-params=[comma/separated/key/value/pairs]
58  Different parameters are available for each Radar driver.
59  Default value: none
60 
61  --write-file-gps=[path/to/gps/file]
62  Path where the recorded GPS data is going to be stored.
63  Default value: none
64 
65  --write-file-can=[path/to/canbus/file]
66  Path where the recorded CANBUS data is going to be stored.
67  Default value: none
68 
69  --write-file-lidar=[path/to/lidar/file]
70  Path where the recorded Lidar data is going to be stored.
71  Default value: none
72 
73  --write-file-radar=[path/to/radar/file]
74  Path where the recorded Radar data is going to be stored.
75  Default value: none
76 
77 @note For a full list of key/value pairs that can be passed to --[sensor]-params see @ref dwx_sensor_enum_sample.
78 
79 @subsection dwx_record_sample_examples Examples
80 
81 ## Recording CAN ##
82 
83 - Set `--can-driver` to `can.socket`.
84 - Set `--can-params` to `device=can0` where `can0` is the can device to live record.
85 - Set `--write-file-can=filename.bin` to the recorded output file,
86  where filename.bin is the output file for CAN data.
87 
88 Thus, to record data from a can sensor, the following command would be used:
89 
90  ./sample_record --can-driver=can.socket --can-params=device=can0 --write-file-can=/path/to/outputfile.bin
91 
92 ## Recording GPS ##
93 
94 GPS takes command-line options that are similar to the CAN options.
95 
96 For example, the command line for recording GPS data from a UART GPS sensor is:
97 
98  ./sample_record --gps-driver=gps.uart --gps-params=device=/dev/ttyACM0 --write-file-gps=/path/to/outputfile.bin
99 
100 ## Recording LIDAR ##
101 
102 - Set `--lidar-protocol` to `lidar.socket`
103 - Set `--lidar-params` to appropriate values depending on your device. Supported devices are listed in @ref dwx_lidar_replay_sample
104 
105 For example, the command line for recording lidar data:
106 
107  ./sample_record --lidar-protocol=lidar.socket --lidar-params=device=[device],ip=[lidar IP address],dip=[IP address of UDP packet receiver],port=[lidar port],hres=[valid horizontal resolution],scan-frequency=[valid frequency] --write-file-lidar=/path/to/lidaroutput.bin
108 
109 - dip (Destination IP Address) is applicable only for device OUSTER_OS1
110 - hres (Horizontal Resolution) is applicable only for device OUSTER_OS1
111 
112 ## Recording RADAR ##
113 
114 - Set `--radar-protocol` to `radar.socket`
115 - Set `--radar-params` to appropriate values depending on your device. Supported devices are listed in @ref dwx_radar_replay_sample
116 
117 For example, the command line for recording GPS data from a UART GPS sensor is:
118 
119  ./sample_record --radar-protocol=radar.socket --radar-params=device=[device],ip=[radar IP address],port=[radar port],scan-frequency=[valid frequency] --write-file-radar=/path/to/radaroutput.bin
120 
121 @note If the radar being used is the Continental ARS430 ethernet radar, see to the prerequisite section in @ref dwx_radar_replay_sample .
122 
123 ## Recording Mixed Sensor Types
124 
125 Different types of sensors can be combined. For example, the command for recording live GPS and LIDAR data is:
126 
127  ./sample_record --gps-driver=gps.uart --gps-params=device=/dev/ttyACM0 --write-file-gps=/path/to/gpsoutput.bin --lidar-protocol=lidar.socket \
128  --lidar-params=device=[device],ip=[lidar IP address],port=[lidar port],scan-frequency=[valid frequency] --write-file-lidar=/path/to/lidaroutput.bin
129 
130 @note - This sample creates output files that, per default, are put into the
131 current working directory. Hence, write permissions to the current working
132 directory are necessary if the output file arguments are not changed.
133 
134 @note - Recording virtual sensors is not supported.
135 
136 @section dwx_record_sample_more Additional Information
137 
138 For more details see @ref sensors_mainsection.