Offboard control

Hello everyone. I’m trying to write offboard velocity and position controls. I can fly the vtol to desired point by using “goto” but how can I add offboard velocity control? Thank you.

Are you using MAVSDK? Or MAVLink?

Hi! I am struggeling with the same issue. From what I understand, offboard mode for VTOL only supports mavlink commands (Offboard Mode | PX4 User Guide). The supported mavlink commands for VTOL are:

SET_POSITION_TARGET_LOCAL_NED
SET_POSITION_TARGET_LOCAL_INT

Does anyone know if there are any plans for ROS2 support for offboard control VTOL:s, in a similar way that copters can be controlled (via px4_msgs::msg::TrajectorySetpoint)?

Hi @Kristoffer_Bergman !
VTOL (as all other types of airframe) are already supported for ROS 2 offboard control but at the moment the documentation describes only the mc case.

When I say “already supported” I mean that you can potentially send any command from ROS 2 to PX4… but with great power comes great responsibility :wink:

Hi Benja!
Thank you for your quick response :slight_smile:

We will for sure add several safety features before trying to control the UAV using offboard control mode outside of the simulator environment. So far, I have been playing around with controlling the standard vtol in gz garden from ROS2. I am able to control the UAV from QgroundControl to different locations, but only manages to perfrom takeoff and then transition to loiter from ROS2. However, it is good to know that there are no limitations, I will keep trying to get it to work from ROS2.

Another related question - is the TrajectorySetpoint (only commanding a position) command similar to the mavlink command “SET_POSITION_TARGET_LOCAL_NED”? Or are they handled differently within PX4?

Exactly!

To be more precise: it is exactly equal to SET_POSITION_TARGET_LOCAL_NED with MAV_FRAME_LOCAL_NED as coordinate frame

1 Like