ADAS example

The ADAS example demonstrates how to read sensor information from various sensors (lidar, radar, and cameras) to fuse all that information into a single view using the ADAS library.

The reference image should come up running the ADAS example application with the -c /base/etc/system/config/adas_camera_sensors.conf -m script option. You can run this application with camera, lidar, and radar hardware connected to the board or run it with a file camera and file data.

By default, the reference image uses files (prerecorded) that contain lidar and radar, data, as well as video that simulate sensors. For demonstrative purposes, there are two viewer available to visualize the data. In a production level application, rather than visualize the data, you'll likely provide the raw data (e.g., show the video from the camera directly) or even provide visual cues (e.g., warning light). These are the viewers available with this example:
Camera viewer
The camera viewer shows the perspective of the driver during a drive. When a traffic light is detected, a box is drawn around the traffic light.
Note: The traffic light detection algorithm is a custom algorithm for demonstrative purposes and isn't part of the QNX Platform for ADAS. For information about the algorithm, contact your sales representation at QNX Software Systems.
Pointcloud viewer
The pointcloud viewer demonstrates how to take various forms of data and fuse it together to provide a representation of the objects from the various sensors. Information retrieved from various sensors is shown in a common 3-D coordinate system. On the display, lidar firings show up as points while data from other sensors show up as boxes.

The ADAS example application (adas_example) takes the following parameters:

Run the application

The following steps allow you to run the ADAS example application.
  1. Connect to your board using ssh.
  2. If the another example application is running, type slay example_app in your ssh session to stop it (where example_app is the example application that's running, such as slay adas_example). The application should stop running (you see a blank display).
  3. Type the adas_example with the -c /base/etc/system/config/adas_camera_sensors.conf option to run the ADAS example in manual mode.
    # adas_example -c /base/etc/system/config/adas_camera_sensors.conf

After you run the command, a menu appears. You can type letters from the menu and press the Enter to change the view. The views presented in the menu vary depending on the views that are supported by the active viewer (as specified in your ADAS library configuration file).

# adas_example -c /base/etc/system/config/adas_camera_sensors.conf

# Please select the view type or zoom factor:
        1 to 6) Scale factor from 1x to 32x (Point cloud or Radar only)
        c) Change viewer
        f) Forward
        v) Driver
        d) Radar
        n) Navigation
        r) Start Record
        s) Stop Record
        x) Exit the application
            
Note: You can press the c and Enter to change between the camera and point cloud viewer if you've configured both in your ADAS library configuration file. The numeric values only work for the point cloud views and radar views.
Here's the summary of the commands and views that can toggle through based on the viewer you choose:
Camera viewer
In the camera viewer, pressing the number keys does nothing.
Forward (f)
This is a view from the front connected camera.

Driver (v)
This is the view from the driver's perspective, which in this case is similar to the Forward view.

Radar (d)
This is a frontal view video from the front camera on your system with the radar and objects detected overlaid on the video.

Navigation (n)
This is a view of the video with raw GPS and sensors data overlaid on top of the video:

You can also choose to record data using the Start Record ((f)) command and stop the recording using the Stop Record ((s) command.
Point Cloud view
In the point cloud viewer, pressing a number key changes the zoom level.
Bird's Eye (t)
This is a point cloud of an aerial (above) view of the objects detected by the sensors on your system:

Isometric (i)
This is a point cloud view of the objects detected by the sensors and cameras on the system:

Forward view (f)
This is a point cloud view of what's occurring from the back of the vehicle. For this reason, you see a representation of the back of the vehicle.

Backward (b)
This is a point cloud view of what's occurring from looking backwards from the front of the vehicle. For that reason, you see the front of the car.

Radar (d)
This is a point cloud representation of the vehicle and its surroundings with the radar and objects tracked overlaid on top it.

Navigation (n)
This is a point cloud representation of the vehicle and its surroundings with raw GPS and sensors data overlaid on top it.

You can also choose to record data using the Start Record ((f)) command and stop the recording using the Stop Record ((s) command.

Build the ADAS example application

On your host computer, the source code is provided for ADAS example application. You can build the source and deploy the binary on to your target.

On your host computer, the source code is provided for Sensor example application as part of a ZIP file. You can build the source and deploy the binary on to your target.

  1. A ZIP file installed with the QNX Platform for ADAS - Sensor Source Examples is located at installation directory/source/adas-sensor-examples-version.zip. You must extract it to get the ZIP file for the sensor examples.
  2. In the extraction_directory/ source_package_adas_sensor directory, there's a README.txt with instructions to build the applications in the package.
  3. Navigate to extraction_directory/source_package_adas_sensor/ apps/adas/adas_example/nto/x86_64/o and transfer the adas_example binary to the /usr/bin/ directory on the target. For example, you can use the QNX Momentics IDE to transfer the file to your target.
    Note: Ensure that you can create a backup of the original adas_example binary before you deploy your newly built version of the ADAS example application.
  4. After you transfer the binary to your target, in a terminal connection, run the ADAS example application.