# What is for "Avoidance / Collision prevention error"

Source: https://forum.modalai.com/topic/176/what-is-for-avoidance-collision-prevention-error
Category: VOXL SDK and Software (https://forum.modalai.com/category/47/voxl-sdk-and-software)
Posted: 2021-04-02 15:04:46 UTC by shlee853
Replies: 7 · Views: 1804

## shlee853 · 2021-04-02 15:04:46 UTC

Hi guys,

I'm on testing Collision prevention as like below link

https://docs.modalai.com/voxl-vision-px4-collision-prevention/

Also, I already verified VIO data and position mode but, as you can see below picture, I got a message Avoidance / collision prevention error.

because of this error, I cannot arm my flight in pre-check.

Could you please let me know why collision prevention error is occured in pre-check and how to revolve it?

Thanks,

![Screenshot from 2021-04-02 23-56-36.png](https://forum.modalai.com/assets/uploads/files/1617376269109-screenshot-from-2021-04-02-23-56-36.png)

## Reply by modaltb (ModalAI staff) · 2021-04-02 17:54:20 UTC

Hi @shlee853 ,

Can you check your settings compared to these?

https://gitlab.com/voxl-public/flight-core-px4/px4-parameters/-/blob/master/helpers/collision_prevention.params

Please advise if they are the same and you're having issues.

Thanks!

## Reply by shlee853 · 2021-04-08 21:04:02 UTC (in reply to modaltb)

@modaltb yes I already set this parameter as you show me.

If stereo vision camera has problem or uncalibrated, is it possible to make this error?

## Reply by modaltb (ModalAI staff) · 2021-04-09 03:12:00 UTC

We calibrate the stereo sensors before shipping on the Flight Decks and m500s.  Not sure if you have that or the VOXL + image sensors.

Without stereo calibration, yes there's likely to be issues.  

How about trying this and seeing how things look?
 https://docs.modalai.com/voxl-vision-px4-collision-prevention/#debug-tools

## Reply by shlee853 · 2021-04-30 16:10:04 UTC (in reply to modaltb)

@modaltb I calibrated stereo camera and tracking camera. and I found calibrated file here

yocto:/# ls /home/root/.ros/camera_info/
left.yaml right.yaml tracking.yaml

I also verified depth information using stereo camera and tracking information using tracking camera.

But, I'm not resolve Avoidance/Collision prevention Error so far.

Also, I cannot perform object avoidance function.

Could you please let me know some advice? why Avoidance/collision prevention error message appeared on QGC?

![4c60ecf8-fe38-42ee-b15a-bc37a32b9649-image.png](https://forum.modalai.com/assets/uploads/files/1619798781575-4c60ecf8-fe38-42ee-b15a-bc37a32b9649-image.png) 

my flight s/w version is like this.

yocto:~# voxl-version 
--------------------------------------------------------------------------------
system-image:    ModalAI 3.2.0 BUILDER: ekatzfey BUILD_TIME: 2021-02-05_19:54
kernel:          #1 SMP PREEMPT Fri Feb 5 20:03:22 UTC 2021 3.18.71-perf
factory-bundle:  1.0.1 (Yocto installation)
--------------------------------------------------------------------------------
architecture:    aarch64
processor:       apq8096
os:              GNU/Linux
--------------------------------------------------------------------------------
voxl-suite:
Package: voxl-suite
Version: 0.2.0
Depends: docker, imu_app (= 0.0.6), libvoxl_io (= 0.5.2), voxl-cam-manager (= 0.2.2), voxl-docker-support (= 1.1.1), voxl-hal3-tof-cam-ros (= 0.0.2), voxl-modem (= 0.10.0), voxl-nodes (= 0.0.8), voxl-rtsp (= 1.0.2), voxl-utils (= 0.5.2), voxl-vision-px4 (= 0.6.8), voxl_imu (= 0.0.4), voxl-time-sync (= 0.0.1), voxl-vpn (= 0.0.2), librc_math (= 1.1.2), libmodal_pipe (= 1.2.2), modalai-vl (= 0.1.3)
Status: install user installed
Section: base
Architecture: armv7a
Maintainer: james@modalai.com
MD5Sum: af706cd3c1ea59f274f2ed9b93141f1d
Size: 870
Filename: voxl-suite_0.2.0.ipk
Description: meta-package to install all of the voxl-suite
Installed-Time: 245

--------------------------------------------------------------------------------

## Reply by modaltb (ModalAI staff) · 2021-05-04 23:52:07 UTC

This thread is related to [this](https://forum.modalai.com/topic/223/collision-prevention)

## Reply by hmlow · 2022-02-14 03:47:38 UTC

I ran into the same issue where QGC displays: 
Avoidance/collision prevention   Error

I think i know what is causing this issue in case there isnt any resolution yet.

It seems that QGC is interpreting what is sent from the AP the onboard_control_sensors_health bitfield in the MAV_SYS_STATUS_SENSOR message. And the bit responsible for this is MAV_SYS_STATUS_OBSTACLE_AVOIDANCE.

Looking at the PX4's Commander module, it also seems that the MAV_SYS_STATUS_OBSTACLE_AVOIDANCE bit is used for both obstacle avoidance AND collision prevention. While the VOXL-CAM is communicating with the AP for Collision Prevention, this health bit will always be false because the Avoidance system is not setup.
https://github.com/PX4/PX4-Autopilot/blob/ae0bb8371df1d2d2816e5ec2db67ca3936d0221c/src/modules/commander/Commander.cpp

But i have yet to confirm if in spite of this, the Collision Prevention function still works. FYI i have a brand new Seeker which i have not tested in flight yet. Will anyone be able to advise before i go for my first flight?

## Reply by James Strawson (ModalAI staff) · 2022-02-15 20:38:21 UTC (in reply to hmlow)

@hmlow 

Yes, PX4's obstacle avoidance and Collision Prevention are separate features. We only support the Collision Prevention functionality which is governed by the PX4 CP_DIST and similar parameters. Make sure the COM_OBS_AVOID  parameter is OFF (0) in PX4

James
