Servers by jDrones

Using mavlink command in MAVPROXY module does not have any response from SITL

(Nicholas Stout) #1

Hi, I am trying to get a drone in SITL to change it’s yaw while standing in place in guided mode. In the guided mode documentation it appears I can use set_position_target_global_int_send, however SITL does not send a COMMAND_ACK and the simulation drone does not move.

I have also tried a sending MAV_CMD_CONDITION_YAW in a long command, and that is acknowledged, but it returns a error 4, which I believe means it is not supported.

here is the relavent code:
self.master.mav.set_position_target_global_int_send(time_boot_ms, self.settings.target_system, self.settings.target_component, self.module('wp').get_default_frame(), 0b11100000010, self.target_pos[0], self.target_pos[1], #current location self.follow_settings.altitude, 0,0,0,0,0,0, self.turn_angle,0)

self.master.mav.command_long_send(self.settings.target_system,
                                              self.settings.target_component,
                                              mavutil.mavlink.MAV_CMD_CONDITION_YAW, 0,
                                              relyaw,
                                              self.follow_settings.vehicle_throttle,
                                              1, 0, 0, 0, 0)
(Khancyr) #2

Hello,

I have tried on mavproxy and both command are working.
Did you takeoff before sending the commands?

As you are using python, you could try to look into mavproxy source to get the right syntax!