Configure sensors and cameras on the reference image

The reference image is configured to boot the ADAS example application, which runs using a file camera and file data (virtual cameras and sensors). If you want to a live camera or live sensors that you connect to the ASRock Beebox, you must change the configuration.

When you change your hardware configuration, you often must change the order that you start different services and the sensor configuration file. To simplify the changes, the reference image provides multiple SLM configuration files that specify the correct order of services to boot based on the hardware you boot and use predefined sensor configuration files, which is used when the Sensor service starts.

In some cases, you may need to modify the sensor and ADAS library configuration files based on what you want to use with your image. These files are located at (/etc/system/config/) on the reference image.

For information about the Sensor service and the sensor configuration file, see the “Sensor” chapter in the System Services guide for the QNX Platform for ADAS.

For information about the ADAS library configuration file, see the “Configuring ADAS Library” chapter in the ADAS Library Developer's Guide.

Here are the SLM configuration files provided with the reference image, which are located in the /etc directory:

Changing the configuration

To change the configuration, you can copy predefined changes from the SLM configuration files or modify both the SLM or sensor configuration files. You can do one of the following series of steps:
  • Determine the SLM configuration from the previous list that matches your configuration and copy the SLM configuration over the slm-config-platform.xml file. For example, if you have a USB camera connected to your board copy slm-config-platform-single-cam.xml over slm-config-platform.xml, and then restart the Beebox.
    # mount -uw /base
    # cd /etc
    # cp slm-config-platform-single-cam.xml slm-config-platform.xml
    # shutdown
                                
                            
  • If you configuration requires you to change an existing SLM configuration file, we recommend that you:
    1. Run the mount -uw /base if you haven't already to allow you to write to the filesystem.
    2. Create a copy of the SLM configuration that points to a sensor configuration file and that's close to what you want.
    3. Create a custom sensor configuration file under /etc/system/config, and then configure your version of the SLM configuration file to point to your custom sensor configuration file.
    For example, if you wanted a two USB camera configuration, create a new configuration file called /etc/system/config/two_usb_cameras.conf based on the /etc/system/config/usb_camera.conf, then create a copy of the slm-config-platform-single-cam.xml file and then call it slm-config-platform-two-cam.xml, and the modify the following block to point to your sensor configuration file as follows:
    <SLM:component name="sensor">
            <SLM:command>/base/bin/sensor</SLM:command>
            <SLM:args>-U 521:521,1001 -r /accounts/1000/shared/camera -c
                /base/etc/system/config/two_usb_cameras.conf</SLM:args>
        <SLM:depend>resarb</SLM:depend>
        <SLM:depend>screen-ready</SLM:depend>
            <SLM:waitfor wait="pathname">/dev/sensor/camera1</SLM:waitfor>
        </SLM:component>
  • Then copy your custom SLM configuration to replace the slm-config-platform.xml and type shutdown.
    # cp /etc/slm-config-platform-two-cam.xml /etc/slm-config-platform.xml
    # shutdown