How to avoid built in velocity control for thrust in guided mode

Hi,
For an onboard MPC application I would like to control my quadcopter as in stabilize or acro mode (attitude and thrust inputs). I am working with mavros on a companion computer (Nvidia Jetson TX2).
The issue I am facing is that this only works in guided mode, and in this mode a thrust input (published to /mavros/setpoint_attitude/thrust, which corresponds to the SET_ATTITUDE_TARGET message) is interpreted as some vertical velocity setpoint, rather than an actual thrust setpoint. How can I work around this built-in vertical velocity controller and send an actual thrust input in guided mode?

@BosMathias,

I’m afraid we don’t support directly controlling thrust in Guided mode. We’ve got an item on the to-do list here to support it. It’s not a very difficult task to change the commands to the position controller so that thrust is sent instead of a climb rate target but there are just so many other items on the to-do list to tackle that I can’t personally make any promises on when this will be done.

1 Like

Thank you for your reply and for pointing out where to start. I might try to fix it myself, but I also look forward to a ‘proper’ fix.

This is now implemented - you need to set GUID_OPTIONS correctly and thrust will be interpreted directly as motor thrust rather than inputs to the altitude hold algorithm.

1 Like