Setpoint_raw/attitude offboard control without position source

Hello everyone!

I try to control my drone from mavros on companion computer by sending ‘/mavros/setpoint_raw/attitude’ message.
My goal is to control drone without providing any position source to it (no GPS, no any visual odometry).
I start my node which sends attitude setpoints on 150 Hz, then switch to OFFBOARD, then arm a vehicle - but it triggers failsafe with the following message: “[mc_pos_control] Offboard activation failed with error: Activation Failed”
For some reason I use pretty old firmware - v1.10.0.

I searched a littlle and I have a doubt - is it possible use offboard without position source at all?

It is possible, you need to figure out why entering offboard was rejected. Have you confirmed that the setpoints are actually reaching the flight controller?

Yes, I see ‘vehicle_attitude_setpoint’ message in uorb top on exactly the same rate which I have set in my code (I changed it to 116 Hz to be sure).
image

Okay, then we need to figure out “why” it is being rejected

Seen that you publish 150Hz before switching it might not be that but there is this behavior that could be the cluprit if you do not wait long enough.

Basically you must have streamed 100+ commands before switching to OFFBOARD mode

I found the reason - another node published setpoint_position at the same time.
My fault - I forget to switch it off =)

So everything works now - thank for your answers!