Hi there,
for my research project, I would like to control a fixed wing UAV from outside the flight stack. After implementing the MAVROS offboard example, I modified the publisher to:
ros::Publisher target_pos_pub = nh.advertise "mavros_msgs::PositionTarget"
("mavros/setpoint_raw/local", 10);
and adjusted
mavros_msgs::PositionTarget target;
target.header.stamp = ros::Time::now();
target.coordinate_frame = 8;
target.type_mask=0b010111000111;
to send velocity and yaw rate setpoints.
The offboard node seems to correctly publish the topic, since both the Iris and VTOL airframes (Gazebo) take off and fly as expected. However, the fixed wing plane does not.
I took a closer look at the position_setpoint_triplet and the vehicle_attitude_setpoint topics, to conclude that the fw_pos_control_l1 module does not transform the position setpoints to attitude setpoints as expected (in offboard mode). Whereas the mc_pos_control does publish roll, pitch, yaw, yaw rate and thrust setpoints, the fw_pos_control does not.
To be honest, I do not have a clue on how to make it work. Can someone take a look at this please? Any help would be greatly appreciated. Thanks!