Offboard Control with mavros

#1

hi there

i have a question… :slight_smile: - hope someone can help me.

my goal is to start a flying wing manually, fly around for a bit, switch to the offboardmode (via rc) and and then my wing should follow some given setpoints.

i have a pixhawk cube, a lattepanda alpha as companion computer with ros/mavros installed.

now: do i need to write a c++ file with the given setpoints or where shoud the ‘offboard’-route be written? how can i guarantee that the script starts as soon as i am in the offboard mode?

thanks for any help!

#2

Currently offboard mode is not supported for fixedwing.

Normally, yes you need to write your own ros node which should be streaming setpoints before you switch to offboard mode. Otherwise the flight controller will reject getting into offboard mode.

#3

thanks for your answer.
are you sure that offboard mode is not supported for fixedwing?

i am very new to mavros etc and i can’t see quite through yet…
i am not sure how to stream these setpoints…
so let’s say i go out, and start my companion computer and pixhawk. i take off and fly… what is the companion computer doing at that time? and yes, if offboard is possible: how does the node start?

‘streaming setpoints before’ means i’d need node that starts automatically after booting the companion computer?

#4

You can go through the documentation for more information here

I have tried offboard in fixedwing, but I believe it is currently not in a working state. Whether the node starts automatically or you start it manually, you need to stream setpoints within the timeout (default: 0.5s) or your drone has no existing setpoint to follow, therefore offboard mode will be rejected