1 # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
3 @page dwx_record_sample Simple Sensor Recording Sample
6 @note SW Release Applicability: This sample is available in both **NVIDIA DriveWorks** and **NVIDIA DRIVE Software** releases.
8 @section dwx_record_sample_description Description
10 The Simple Sensor Recording Sample allows you to record data from CAN, GPS, RADAR or LIDAR sensors.
12 @section dwx_record_sample_running Running the Sample
14 The syntax for calling the simple sensor recording sample is:
16 ./sample_record --can-driver=[can.socket|can.aurix]
17 --can-params=[comma/separated/key/value/pairs]
18 --gps-driver=[gps.uart|gps.xsens|gps.novatel|gps.dataspeed]
19 --gps-params=[comma/separated/key/value/pairs]
20 --lidar-driver=[lidar.socket]
21 --lidar-params=[comma/separated/key/value/pairs]
22 --radar-driver=[radar.socket]
23 --radar-params=[comma/separated/key/value/pairs]
24 --write-file-gps=[path/to/gps/file]
25 --write-file-can=[path/to/canbus/file]
26 --write-file-lidar=[path/to/lidar/file]
27 --write-file-radar=[path/to/radar/file]
31 --can-driver=[can.socket|can.aurix]
32 Specifies which CAN interface to use.
33 Default value: can.socket
35 --can-params=[comma/separated/key/value/pairs]
36 Different parameters are available for each CAN driver.
39 --gps-driver=[gps.uart|gps.xsens|gps.novatel|gps.dataspeed]
40 Specifies which GPS driver to use.
41 Default value: gps.uart
43 --gps-params=[comma/separated/key/value/pairs]
44 Different parameters are available for each GPS driver.
47 --lidar-driver=[lidar.socket]
48 Specifies which Lidar driver to use.
49 Default value: lidar.socket
51 --lidar-params=[comma/separated/key/value/pairs]
52 Different parameters are available for each Lidar driver.
55 --radar-driver=[radar.socket]
56 Specifies which Radar driver to use.
57 Default value: radar.socket
59 --radar-params=[comma/separated/key/value/pairs]
60 Different parameters are available for each Radar driver.
63 --write-file-gps=[path/to/gps/file]
64 Path where the recorded GPS data is going to be stored.
67 --write-file-can=[path/to/canbus/file]
68 Path where the recorded CANBUS data is going to be stored.
71 --write-file-lidar=[path/to/lidar/file]
72 Path where the recorded Lidar data is going to be stored.
75 --write-file-radar=[path/to/radar/file]
76 Path where the recorded Radar data is going to be stored.
79 @note For a full list of key/value pairs that can be passed to --[sensor]-params see @ref dwx_sensor_enum_sample.
81 @subsection dwx_record_sample_examples Examples
85 - Set `--can-driver` to `can.socket`.
86 - Set `--can-params` to `device=can0` where `can0` is the can device to live record.
87 - Set `--write-file-can=filename.bin` to the recorded output file,
88 where filename.bin is the output file for CAN data.
90 Thus, to record data from a can sensor, the following command would be used:
92 ./sample_record --can-driver=can.socket --can-params=device=can0 --write-file-can=/path/to/outputfile.bin
96 GPS takes command-line options that are similar to the CAN options.
98 For example, the command line for recording GPS data from a UART GPS sensor is:
100 ./sample_record --gps-driver=gps.uart --gps-params=device=/dev/ttyACM0 --write-file-gps=/path/to/outputfile.bin
102 ## Recording LIDAR ##
104 - Set `--lidar-protocol` to `lidar.socket`
105 - Set `--lidar-params` to appropriate values depending on your device. Supported devices are listed in @ref dwx_lidar_replay_sample
107 For example, the command line for recording lidar data:
109 ./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
111 - dip (Destination IP Address) is applicable only for device OUSTER_OS1
112 - hres (Horizontal Resolution) is applicable only for device OUSTER_OS1
114 ## Recording RADAR ##
116 - Set `--radar-protocol` to `radar.socket`
117 - Set `--radar-params` to appropriate values depending on your device. Supported devices are listed in @ref dwx_radar_replay_sample
119 For example, the command line for recording GPS data from a UART GPS sensor is:
121 ./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
123 @note If the radar being used is the Continental ARS430 ethernet radar, see to the prerequisite section in @ref dwx_radar_replay_sample .
125 ## Recording Mixed Sensor Types
127 Different types of sensors can be combined. For example, the command for recording live GPS and LIDAR data is:
129 ./sample_record --gps-driver=gps.uart --gps-params=device=/dev/ttyACM0 --write-file-gps=/path/to/gpsoutput.bin --lidar-protocol=lidar.socket \
130 --lidar-params=device=[device],ip=[lidar IP address],port=[lidar port],scan-frequency=[valid frequency] --write-file-lidar=/path/to/lidaroutput.bin
132 @note - This sample creates output files that, per default, are put into the
133 current working directory. Hence, write permissions to the current working
134 directory are necessary if the output file arguments are not changed.
136 @note - Recording virtual sensors is not supported.
138 @section dwx_record_sample_more Additional Information
140 For more details see @ref sensors_mainsection.