# avoidance collision prevention disabled

Source: https://forum.modalai.com/topic/2834/avoidance-collision-prevention-disabled
Category: VOXL 2 and VOXL 2 Mini (https://forum.modalai.com/category/26/voxl-2-and-voxl-2-mini)
Tags: voxl-2
Posted: 2023-11-08 15:06:45 UTC by Guest
Replies: 18 · Views: 24292

## tom (ModalAI staff) · 2023-11-08 18:10:37 UTC

@AP123 First off I'd recommend loading SDK 1.0 but secondly did you load the voa helper files from https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-px4-params/-/blob/master/params/v1.12/collision_prevention_enable.params ?

These are px4 v1.12 specific since you're on SDK 0.9.5

## Reply by tom (ModalAI staff) · 2023-11-08 19:19:41 UTC

@AP123 SDK 1.0 allows you to load params using an onboard wizard but on 0.9.5 you'll have to load them via. QGroundControl: https://docs.modalai.com/upload-px4-parameters/#4-upload-parameters-file

You'll have to clone the https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-px4-params repo and load this file https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-px4-params/-/blob/master/params/v1.12/collision_prevention_enable.params through the above method

## Reply by tom (ModalAI staff) · 2023-11-09 17:56:21 UTC

@AP123 Where is it saying that message>

## Reply by tom (ModalAI staff) · 2023-11-09 19:14:41 UTC

@AP123 Are you able to see all the expected data in voxl-portal? https://docs.modalai.com/voxl-vision-px4-collision-prevention-0_9/#voxl-portal-to-view-depth-map

## Reply by tom (ModalAI staff) · 2023-11-09 19:52:22 UTC

@AP123 And when you view them , data is coming through correctly?

## Reply by tom (ModalAI staff) · 2023-11-09 20:01:27 UTC

@AP123 In portal you aren't seeing anything when you select "Stereo Front Disparity" for example?

## Reply by tom (ModalAI staff) · 2023-11-09 20:38:51 UTC

@AP123 What about the "stereo" one itself?

## Reply by tom (ModalAI staff) · 2023-11-09 23:04:03 UTC

@AP123 might be worth trying this to see if the voxl-vision-px4 is handling the avoidance data correctly: https://docs.modalai.com/voxl-vision-px4-collision-prevention-0_9/#debugging-collision-prevention

## Reply by tom (ModalAI staff) · 2023-11-10 17:40:07 UTC

@AP123 When you click on Not Ready does it give you any more info?

## Reply by tom (ModalAI staff) · 2023-11-10 22:23:16 UTC

@AP123 What hardware setup are you using? One of our drones or a custom setup?

## Reply by tom (ModalAI staff) · 2023-11-10 22:47:43 UTC

@AP123 It's possible, I would take a look here as well for some relevant info: https://docs.modalai.com/configure-extrinsics/

## Reply by tom (ModalAI staff) · 2023-11-13 19:32:20 UTC

@AP123 I'm at the end of my personal knowledge with VOA, I'll see if I can tag someone in

## Reply by Cliff Wong (ModalAI staff) · 2023-11-13 23:48:27 UTC

@AP123 Hey there. Are you running VOA against a stereo camera pair or via a ToF sensor?

If you run ```voxl-inspect-points voa_pc_out```  and see data, then the voxl2 SDK services are good and generating the correct mavlink obstacle distance points to PX4. If not then there's a configuration issue. 

If that is good, then  you need to make sure PX4 has
```MPC_POS_MODE``` =   *Simple pos control* or *smooth pos control*, ```COM_OBS_AVOID``` is *enabled*, ```CP_DIST``` > 0 (e.g. 2) and you must have an established home position (or good position from qvio if that is the case). Typically an "obstacle system not ready" is due to the MPC_POS_MODE (I think we default to *acceleration-based input*).

If all those check out, then it's likely missing a home position requirement in PX4 & not voxl, and we'll need to look that up.

## Reply by tom (ModalAI staff) · 2023-11-14 17:31:16 UTC

@AP123 We just released SDK 1.1 yesterday which contains a few months worth of bug fixes, I would recommend loading that and seeing if your issue is resolved

## Reply by tom (ModalAI staff) · 2023-11-14 19:10:50 UTC

@AP123 No, didn't realize you were tackling that as well. M0065 PWM support will be in SDK 1.1.1 and we're actively polishing / testing that release and hope to have it out in the next couple weeks

## Reply by tom (ModalAI staff) · 2023-11-14 19:44:18 UTC

@AP123 We don't have any known issues with the 4 in 1 escs. If you have an issue can you open a new thread?

## Reply by wilkinsaf · 2023-11-14 21:31:54 UTC

@AP123 This is a shot in the dark, but can you turn off your GPS and Mag and see if that works. We tried to do collision prevention with GPS on and we were getting these errors

## Reply by wilkinsaf · 2023-11-15 04:05:58 UTC

@AP123 

you can turn it off with has_gps and has_mag parameters I believe. 
Yes, i believe this might be a PX4 thing. Might need to troubleshoot that PX4 bug in order to resolve

## Reply by Cliff Wong (ModalAI staff) · 2023-11-15 18:55:20 UTC

Hi there, looks like there's some confusion with what mode is being tested. Here's some clarification. PX4 has 2 approaches to handling obstacle distance data:
a. Obstacle Avoidance(OA) feature which stops the aircraft if object detection occurs from the voxl-voa service. This requires CP_* parameters [set that you can compare with your drone](https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-px4-params/-/tree/master/params/v1.14/voa_helpers?ref_type=heads) listed here based on your application. 

b. Collision Prevention(CP) feature, which not only includes OA, but also rerouting capability in all autonomous modes (position, alt, mission, offboard) and leverages the same voxl-voa service. This requires not only the CP_* parameters but also requires COM_OBS_AVOID = enable.

If your application requires (a), you can leave com_obs_avoid = disable and OA should work out of the box as is. If your application requires (b), then we have discovered a software bug in the VOA service. And the main reason you get the "collision module not ready", no arm possible. It has been corrected [[code here](https://gitlab.com/voxl-public/voxl-sdk/services/voxl-vision-hub/-/tree/voa-enable?ref_type=heads)] and binaries will be available in our gitlab daily builds shortly.
