How to set copters Attitude via DroneKit -- SET_ATTITUDE_TARGET not working -
i have dronekit working sitl sim, project want able command attitude of copter. can via rc on ride in alt_hold mode, don't approach.
i have been trying use mavlink message set_attitude_target (#82), when send messages sim, nothing happens. have been able set velocity , position, , work fine.
here function:
def att_msg_mode(): print "=========== building message" veh1.mode = vehiclemode("alt_hold") msg = veh1.message_factory.set_attitude_target_encode( 0, 0, #target system 0, #target component 0b11100010, #type mask [.9438,0,0,.17364], #q 0, #body roll rate 0, #body pitch rate 0, #body yaw rate 0) #thrust time.sleep(1) veh1.send_mavlink(msg) veh1.flush() print "=========== message sent"
can me out?
it not possible set attitude directly because command not supported copter in either guided mode or auto mode/missions). list of supported commands in guided mode here , auto commands here.
what can set yaw. (hacky) approach may work setting roi point camera (and whole vehicle) @ target.
this sounds reasonable requirement - perhaps create request explanation of why useful you?
Comments
Post a Comment