- Version voxl-suite 0.3.5 and later
- Version voxl-suite 0.2.0 and earlier
Collision prevention is still being developed for voxl-suite 0.3.5 and later, it should be available soon
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],
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: https://docs.px4.io/v1.10/en/computer_vision/collision_prevention.html
We suggest the following parameters for testing this indoors:
CP_DIST: 1.5 CP_DELAY: 0.0 CP_GUIDE_ANG: 0.0 CP_GO_NO_DATA: 1
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.
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
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.
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