Open ynaka01-max opened 3 years ago
Agent comment from kyle.cai in Zendesk ticket #39151:
Dear developer ,
Thank you for contacting DJI.
You can't set the Coordinate System directly by the demo: flight_control_node.cpp. The flight control API: flightCtrl (OSDK API)), which used to change the Coordinate System.
About the ROS invoke OSDK API,you can refer to the vehicle_wrapper.cpp: bool VehicleWrapper::moveByPositionOffset(ACK::ErrorCode& ack, int timeout, MoveOffset& p_offset) {
...
//OSDK API
vehicle->control->positionAndYawCtrl(xCmd, yCmd, zCmd, yawDesiredRad / DEG2RAD);
...
}
Thank you for your understanding and support, hope you have a nice day.
Best Regards, DJI SDK Support Team
You can also use the flightCtrl method in vehicle->control. It gives you the flexibility to use whichever mode you desire.
Sample code flight_control_node.cpp's moveByPosOffset move drone according to Ground (World) Coordinate System(NEU), however, I want to move drone according to body coordinate system (DRU). How should I change the code below?