Link Search Menu Expand Document

VOXL Vision PX4 Collision Prevention

Table of contents

  1. Version voxl-suite 0.3.5 and later
  2. Version voxl-suite 0.2.0 and earlier
    1. voxl-vision-px4 Configuration
    2. PX4 Configuration
    3. Debug Tools
    4. Frames of Reference Used
    5. Next

Version voxl-suite 0.3.5 and later

Collision prevention is still being developed for voxl-suite 0.3.5 and later, it should be available soon

Version voxl-suite 0.2.0 and earlier

voxl-vision-px4 Configuration

VOXL needs to be equipped with callibrated stereo cameras to use this feature. If you purchased a Flight Deck or M500 Developer Drone then the cameras should have been calibrated from the factory.

To calibrate yourself, follow the calibration tutorial.

There are three parameters in /etc/modalai/voxl-vision-px4.conf to configure the stereo collision prevention. en_voa is simply the enable flag. T_stereo_wrt_body refers to the position of the left camera relative to the center of mass of the drone. Note the -0.04m offset is Y is the distance the left camera is to the left of the center of mass. The current depth from stereo algorithm outputs a point cloud relative to the left camera and we use 8cm camera separation on the Flight Deck. 0.10m is the distance the camera is forward of the center of mass.

"en_voa":    true,
"en_send_voa_to_qgc":   false,
"T_stereo_wrt_body":    [0.10, -0.04, 0.0],

PX4 Configuration

The above only enables voxl-vision-px4 to send obstacle data to PX4. PX4 must then be configured to use this data. For full information see the PX4 docs here:

We suggest the following parameters for testing this indoors:

CP_DIST: 1.5

The delay can safely be set to 0 since we do accurate timestamping and delay compensation inside voxl-vision-px4. Increasing the delay over 0 will only cause twitchiness and unpredictable performance.

Debug Tools

voxl-vision-px4 can be started with the following argument to print obstacle data to the screen before it is sent to PX4.

-s, --debug_stereo          print detected stereo obstacles as linescan points

The parameter en_send_voa_to_qgc can be set to true in /etc/modalai/voxl-vision-px4.conf to send the same mavlink OBSTACLE_DISTANCE messages to qgroundControl that are are sent to PX4. They can then be plotted with qGroundControl’s mavlink_inspector tool.

Frames of Reference Used

The geometry module inside voxl-vision-px4 keeps track of the following frames of reference.


voxl-vision-px4 maintains a short history of visual odometry data to compensate for the time delay when computing the depth-from-stereo data as well as the motion and tilt of the drone body.



Next page: Nuttx Shell