I’m using set_position_target_local_ned command to guide quad copter in Guide Mode. When I trying to set command them to go backward (vx = -2) They always turn and fly. Any Solution for my problem i want them to fly backward (reverse) not turn and fly to that direction.
Can you show how you use that command?
You should not ignore yaw at the POSITION_TARGET_TYPEMASK.
command_ned.target_system = mavlink_system.sysid;
command_ned.target_component = 0;
command_ned.coordinate_frame = 1; // MAV_FRAME_LOCAL_NED
command_ned.type_mask = 0b111111000111;
command_ned.vx = -5;
command_ned.vy = 0;
command_ned.vz = 0;
I just tested this in SITL and it is working.
Start an SITL instance and connect to it using MAVProxy, and then:
module load message
And after then:
message set_position_target_local_ned 0 0 0 8 0 -100 0 0 0 0 0 0 0 0 0 0
It just goes 100 meters backward.
Also note that, you set the velocity with that command.