[Phenomenon]
Pitch controls the left and right movement of the plane, roll controls the front and back movement of the plane.
[Temporary solution]
After investigation, it is found that there is a problem with the interface name, so when using RollPitchControlMode.VELOCITY, the roll value should be passed in the setPitch function, and the pitch value should be passed in setRoll().
//It is recommended to use the following settings by default, the standard American hand control mode mFlightController.setVerticalControlMode(VerticalControlMode.VELOCITY);
mFlightController.setRollPitchControlMode(RollPitchControlMode.VELOCITY);
mFlightController.setYawControlMode(YawControlMode.ANGULAR_VELOCITY);
mFlightController.setRollPitchCoordinateSystem(FlightCoordinateSystem.BODY);
//The interface name is reversed, setPitch() should pass in the roll value, and setRoll() should pass in the pitch value
flightControlData.setRoll(pitch);
flightControlData.setYaw(yaw);
flightControlData.setVerticalThrottle(throttle);
Comments
0 comments
Please sign in to leave a comment.