Hello Parrot Developers,
I have implemented Precise landing in a landing stage with a new state. Drone is not able to find landing pad. The value is_target.found is never true in the logs… I tried same landing pad with default mission and freeflight that works perfect. What am I missing in the implementation? I am starting search from 16 meters above landing pad.
Thanks in advance.
Happy new year.
def init(self, *args, **kwargs):
super().init(*args, **kwargs)
self.gdnc_dsc_svc = None
# ---------------------------Get precise Home manager
self.phome_manager = self.mission.get_manager(
PreciseHomeManager, create_if_needed=True
)
# ---------End of precise get home manager--------------------------------------
def enter(self, msg):
# self.phome_manager = self.mission.get_manager(PreciseHomeManager, True)
# To enable descent precise home
self.landing_type = gdnc_descent_msgs.TYPE_DEFAULT
if (
self.phome_manager is not None
and not self.phome_manager.is_move_already_interrupted()
):
# Start precise home manager and find target
self.phome_manager.start_process()
if self.phome_manager.is_target_found():
self.self.log.info("TARGET FOUND")
self.landing_type = gdnc_descent_msgs.TYPE_DEFAULT_PRECISE
self.phome_manager.set_move_in_progress(True)
# Descent precise home if its manager is valid and a target is successfully found.
# If not, descent normal to ground
self.set_guidance_mode(
UID + ".descent_to_ground",
gdnc_descent_msgs.Config(
type=self.landing_type,
target_type=gdnc_descent_msgs.TARGET_TYPE_GROUND,
),
)
# You should call self.phome_manager.stop_process() in exit() of your state
# in order to make precise home manager ready for the next takeoff
self.mc.dctl.cmd.sender.set_estimation_mode(cbry_est.LANDING)
self.log.info("PRECISE LANDING FINAL")
# KILL MANAGER
# def step(self, msg):
# self.log.info("takeoff - ascent - Step - Enter")
# self.log.info(msg)
# self.log.info("takeoff - ascent - Step - Exit")
def exit(self, msg):
self.phome_manager.stop_process()
self.phome_manager = None
self.log.info("PRECISE LANDING completed")
self.log.info("PRECISE LANDING EXIT - EXIT")
These are the logs:
01-01 01:03:20.400 I transitions.core(fsup-423) : Entered state landing
01-01 01:03:20.400 I pimp_hovering(pimp-hovering-a-188) : packages/pimp-hovering/src/pimp-hovering-control.c:550 sending event result for 2d/start estimate
01-01 01:03:20.400 N fsup.PreciseHomeManager(fsup-423) : EVT:PRECISE_HOME;distance=0.111381
01-01 01:03:20.400 I pimp_hovering(pimp-hovering-a-188) : packages/pimp-hovering/src/pimp-hovering-control.c:181 handle start_compute command (5)
01-01 01:03:20.400 I fsup.PreciseHomeManager(fsup-423) : starting precise home computation
01-01 01:03:20.400 N guidance (guidance-421) : EVT:GUIDANCE;mode=‘com.parrot.missions.default.descent_to_ground’;obstacle_avoidance=0
01-01 01:03:20.400 I fsup.firewatch.PreciseHomeDescent(fsup-423) : PRECISE LANDING FINAL
01-01 01:03:20.400 I transitions.core(fsup-423) : Entered state landing.precise_home_descent
01-01 01:03:20.400 I guidance (guidance-421) : config.type_url: type.googleapis.com/Guidance.Descent.Messages.Config
01-01 01:03:20.400 N fsup.flyingstmgr(fsup-423) : EVT:AUTOPILOT;state=‘landing.precise_home_descent’;flying_state=‘landing’;message=‘Guidance.Descent.Messages.Event.done’
01-01 01:03:20.400 I pimp_hovering(pimp-hovering-a-188) : packages/pimp-hovering/src/pimp-hovering.c:626 changing home pipeline to PLAYING (ret: SUCCESS)
01-01 01:03:20.400 I pimp_hovering(pimp-hovering-a-188) : packages/pimp-hovering/src/pimp-hovering.c:779 hovering-home-pipeline: pipeline state changed state from READY to PAUSED.
01-01 01:03:20.400 I vipcsrc (pimp-hovering-a-188/prhome-src:src-488): gstvipcsrc.c:901:gst_vipc_src_connection_status_cb:vipc connected
01-01 01:03:20.400 I vipcsrc (pimp-hovering-a-188/prhome-src:src-488): gstvipcsrc.c:519:gst_vipc_src_status_cb:vipc status received
01-01 01:03:20.400 I fsup.mvavailmgr(fsup-423) : missing_inputs=MoveIndicator.DRONE_VALID_STATE
01-01 01:03:20.400 I pimp_hovering(pimp-hovering-a-188) : packages/pimp-hovering/src/pimp-hovering.c:779 hovering-home-pipeline: pipeline state changed state from PAUSED to PLAYING.
01-01 01:03:20.400 I vipcsrc (pimp-hovering-a-188/prhome-src:src-488): gstvipcsrc.c:1491:gst_vipc_src_create:vipc started
01-01 01:12:27.779 N vipcs (gzserver-8388/vertical_camera-11022): vcam.sock:3.prhome-src:src-488/vcam_raw start
01-01 01:03:20.402 I prhome_Strategy(pimp-hovering-a-188/prhome-queue:sr-487): Searching home position.
01-01 01:03:20.402 N toad_tm_robust_est(pimp-hovering-a-188/prhome-queue:sr-487): EVT:VISION;feature=‘precise_home’;status=‘estim_initialized’
01-01 01:03:20.403 N prhome_Strategy(pimp-hovering-a-188/prhome-queue:sr-487): EVT:VISION;feature=‘precise_home’;status=‘searching’
01-01 01:03:20.405 I dronectrl (drone-controlle-185) : Enable emergency watchdog timeout=500 ms
01-01 01:03:20.405 I colibrylite (drone-controlle-185) : Flight gyro bias before landing: x = 0.000069 — y = -0.000019 — z = 0.000012 [rad/s]
01-01 01:03:20.405 I colibry_est_mngr(drone-controlle-185) : mode set to LANDING
01-01 01:03:20.469 I toad_tm_robust_est(pimp-hovering-a-188/prhome-queue:sr-487): offset found after local search: 0
01-01 01:03:20.469 N toad_tm_robust_est(pimp-hovering-a-188/prhome-queue:sr-487): EVT:VISION;feature=‘precise_home’;status=‘estim_local_search_KO’
01-01 01:03:20.569 I toad_tm_robust_est(pimp-hovering-a-188/prhome-queue:sr-487): offset found after global search: -8
01-01 01:03:20.636 N toad_tm_robust_est(pimp-hovering-a-188/prhome-queue:sr-487): EVT:VISION;feature=‘precise_home’;status=‘estim_offset_OK’
01-01 01:03:20.636 I toad_tm_robust_est(pimp-hovering-a-188/prhome-queue:sr-487): final offset: -8
01-01 01:03:20.770 N prhome_Strategy(pimp-hovering-a-188/prhome-queue:sr-487): EVT:VISION;feature=‘precise_home’;status=‘in_progress’
01-01 01:03:20.770 N fsup.PreciseHomeManager(fsup-423) : EVT:PRECISE_HOME;correction=2.593576
01-01 01:03:22.899 I rtsp_server (stream-server-187) : received RTSP request GET_PARAMETER: cseq=28 session=14d117b0bbd6e04f
01-01 01:03:22.899 I rtsp_server (stream-server-187) : send RTSP response to GET_PARAMETER: status=200(OK) cseq=28 session=14d117b0bbd6e04f
01-01 01:03:23.367 E vstrm (stream-server-187) : invalid DLSR vs. time diff for RTD
01-01 01:03:23.433 E vstrm (stream-server-187) : RTD is now valid (1 invalid RTD(s))
01-01 01:03:24.340 N colibrylite (drone-controlle-185) : EVT:COLIBRY;event=‘vcam’;action=‘start’
01-01 01:03:25.773 I rtsp_server (stream-server-187) : received RTSP request GET_PARAMETER: cseq=29 session=14d117b0bbd6e04f
01-01 01:03:25.773 I rtsp_server (stream-server-187) : send RTSP response to GET_PARAMETER: status=200(OK) cseq=29 session=14d117b0bbd6e04f
01-01 01:03:26.535 I colibrylite (drone-controlle-185) : Weather: updated air density = 1.224082 kg/m^3, using pressure 101233.5 Pa and standard air temperature
01-01 01:03:28.718 I rtsp_server (stream-server-187) : received RTSP request GET_PARAMETER: cseq=30 session=14d117b0bbd6e04f
01-01 01:03:28.718 I rtsp_server (stream-server-187) : send RTSP response to GET_PARAMETER: status=200(OK) cseq=30 session=14d117b0bbd6e04f
01-01 01:03:28.762 E vstrm (stream-server-187) : invalid DLSR vs. time diff for RTD
01-01 01:03:28.835 E vstrm (stream-server-187) : RTD is now valid (1 invalid RTD(s))
01-01 01:03:31.721 I rtsp_server (stream-server-187) : received RTSP request GET_PARAMETER: cseq=31 session=14d117b0bbd6e04f
01-01 01:03:31.721 I rtsp_server (stream-server-187) : send RTSP response to GET_PARAMETER: status=200(OK) cseq=31 session=14d117b0bbd6e04f
01-01 01:03:34.762 I rtsp_server (stream-server-187) : received RTSP request GET_PARAMETER: cseq=32 session=14d117b0bbd6e04f
01-01 01:03:34.762 I rtsp_server (stream-server-187) : send RTSP response to GET_PARAMETER: status=200(OK) cseq=32 session=14d117b0bbd6e04f
01-01 01:03:34.954 E vstrm (stream-server-187) : invalid DLSR vs. time diff for RTD
01-01 01:03:35.033 E vstrm (stream-server-187) : RTD is now valid (1 invalid RTD(s))
01-01 01:03:35.205 I colibrylite (drone-controlle-185) : Landed detection with Accelero. AccZ spike = 1.378212 m/s^2 Current threshold = 1.000000 m/s^2