I am running Ardupilot SITL simulation in Gazebo. I was trying to detect an april tag and land on top of that. But when i switch to Land mode, it lands straight down.
time_usec = int(time.time() * 1000000)
frame = mavutil.mavlink.MAV_FRAME_LOCAL_NED
self.mav_connection.mav.landing_target_send(
time_usec,
1,
frame,
0.05,
0.05,
0,
0,
0
)
This is the code i used to test the landing target.
I tried to do an actual landing target but it was not working
self.mav_connection.mav.landing_target_send(
time_usec,
1, 1
frame,
angle_x,
angle_y,
0,0,0
)
When connected to mavproxy and switch to land mode, the following failsafe measure is the output and I have no idea what it means
GUIDED> mode land
GUIDED> Got COMMAND_ACK: DO_SET_MODE: ACCEPTED
LAND> Mode LAND
AP: PrecLand: Failsafe Measures
AP: Disarming motors
DISARMED
Also, the following is the PLAND params
LAND> param show PLND*
LAND> PLND_ACC_P_NSE 0.5
PLND_ALT_MAX 8.0
PLND_ALT_MIN 0.75
PLND_BUS -1
PLND_CAM_POS_X 0.0
PLND_CAM_POS_Y 0.0
PLND_CAM_POS_Z 0.0
PLND_ENABLED 1
PLND_EST_TYPE 0
PLND_LAG 0.019999999552965164
PLND_LAND_OFS_X 0.0
PLND_LAND_OFS_Y 0.0
PLND_OPTIONS 0
PLND_RET_BEHAVE 0
PLND_RET_MAX 4
PLND_STRICT 1
PLND_TIMEOUT 4.0
PLND_TYPE 3.0
PLND_XY_DIST_MAX 2.5
PLND_YAW_ALIGN 0.0
Any help is well appreciated.
Note : my initial plan was to use mavros, but it was even hopeless than this. So any help in that would be great too.
Also, i am using pymavlink.
I am quite new to ardupilot, even drones in general. So if you find any lack of info in my question, please do ask for it.