Where to change MPC_OBS_AVOID in QGroundControl v3.5


As is shown in https://docs.px4.io/v1.8.2/en/computer_vision/obstacle_avoidance.html
Obstacle avoidance is enabled within PX4 by setting the MPC_OBS_AVOID to 1.
But I cannot find MPC_OBS_AVOID in parameters in QGroundControl. Where can I find this parameter and change it?
And does it mean that only by setting MPC_OBS_AVOID to 1 can vehicle change its trajectory while executing waypoint mission? If MPC_OBS_AVOID isn’t set to 1, is it possible to change vehicle’s trajectory when it is in Mission mode through ROS?

Thanks in advance.

The name of this parameter recently changed to COM_OBS_AVOID. I’ll get to updating the documentation.

And yes, the parameter needs to be set to 1, and you need a connection to a companion computer to avoid obstacles. This does work in mission mode if it’s set up properly.

Yes, you can also make your own avoidance algorithm. This would be easiest in ROS, running mavros. You need to subscribe to /mavros/trajectory/desired and publish a (potentially adjusted) setpoint on /mavros/trajectory/generated.

Thank you for your reply.
I tried COM_OBS_AVOID but still could’t find this parameter.
If I make my own avoidance algorithm, is there a need to set COM_OBS_AVOID to 1?
I tried to subscribe to subscribe to /mavros/trajectory/desired in a simulation when I set the mode to Mission and executed a mission in ROS, but there was no output.


You need latest master to have these parameters.

The upcoming 1.9 release will work too, once it is finalized.

Thank you for your reply!
I switched to master and found the parameter. When will 1.9 be released?
In the SITL simulation, when I uploaded the mission, it showed Critical: ARMING DENIED: Avoidance system not ready. I just used make px4_sitl_default gazebo and roslaunch mavros px4.launch. Did I miss something?

Well, yes you need to run the avoidance :wink:
Check https://github.com/PX4/avoidance

Thank you for your reply. I ran the avoidance and it did work.
I’d like to know what should be turned on or used in the code to make sure avoidance system is ready?

If you are using the latest master of the firmware, the notifications in QGC will tell you whether the avoidance system is connected or not. When it’s up and running, you can just start a mission

Yes, I’m using the latest master. I’d like to know in which condition the system can be defined as Avoidance system is ready. If I just run make px4_sitl_default gazebo and set mission items in QGC, the vehicle will not be armed and there will be Critical: Avoidance system not available. If I’m not going to run PX4/avoidance and just run my own node, what should I add to make sure there is an avoidance system?

To use your own avoidance system you need to adhere to the same interface. This is done through the mavros messages /mavros/trajectory/desired and /mavros/trajectory/generated. The interface is documented on the readme on the avoidance repository.

I’m not exactly sure about the logic on the firmware side that decides on the healthiness of the avoidance system. If you want to dig into the code maybe start here: https://github.com/PX4/Firmware/pull/11550

If you write your own node you need to send the mavros message CompanionProcessStatus to report the healthiness of your node to the Firmware.