I have two questions.
I would like to realize a fixed wing fleet algorithm with Mavros and Gazebo. The leader follows a virtual point, and the followers follow the leader.
In algorithm, the followers’ velocity needs to change with the velocity of leader. But according to PX4 user guide, fixed wing can receive the setpoint form position, attitude, body rate and thrust. Velocity setpoint and acceleration setpoint are automatically ignored. Is there a way to control the fixed wing linear velocity?
I try to realize the part of leader and virtual point. In algorithm, virtual point’s velocity changes with leader’s velocity and the distance of these two. And leader’s yaw rate changes with relative position of these two.
I set the height in position setpoint, I set the yaw rate in body rate setpoint and I set the thrust in thrust setpoint. In PX4 user guide, attitude and body rate must be set with thrust but I don’t know why.
The result is: When it switches to offboard, plane will climb to expected height quickly. Once heading changed, plane would lose height and crash finally.
I can’t control it even fly along a circle. Please help!!