Hello,
In my application I have my own Airsdk mission. In this mission I’m trying to implement Precise Home Landing. In order to take a photo at 0.8 meters I have a state called take_off_to_photo and in that I do following:
• import and initialize PreciseHomeManager with following code :
self.precise_home_mng = self.mission.get_manager(
PreciseHomeManager, create_if_needed=True)
• start and initialize precise home manager with following :
self.precise_home_mng.start_process()
self.precise_home_mng.enable_precise_home(True)
• Take photo at 0.8 meters with following :
self.precise_home_mng.check_reset_sensor_timer = 30
self.precise_home_mng.get_precise_home_local_position = True
self.precise_home_mng.set_ref_image = True
ref_image = self.precise_home_mng.check_set_ref_image_condition
self.log.info("PRECISE PHOTO IMAGE CONDITION : " + str(ref_image))
self.log.info("PRECISE HOME STATUS " + str(self.precise_home_mng))
From the logs I read that image is a valid ref image from the following:
prhome_Strategy(pimp-hovering-a-188/prhome-queue:sr-476): EVT:VISION; feature=‘precise_home’; status='ref_image_valid"
pimp_hovering(pimp-hovering-a-188/prhome-queue: sr-476): packages/pimp-hovering/src/pimp-hovering.c:300 precise home is ready for compute pausing the pipeline
I vipcsrc (pimp-hovering-a-188/prhome-src:src-478): gstvipcsrc.c:1461:gst_vipc_src_flush:vipc stopped (gzserver-9710/vertical_camera-46272): vcam.sock:3.prhome-src:src-478/vcam_raw stop
vipcs
After the mission during descent I use following to make sure that drone is approaching and tracking landing pad and making corrections:
self.log.info(“entering Precise Home Descent State”)
self.gdnc_dsc_svc = self.mc.attach_client_service_pair(
self.mc.gdnc_channel, gdnc_descent_msgs, forward_events=True)
self.log.info("LANDING PAD FOUND " + str(self.precise_home_mng.is_target_found()))
self.set_guidance_mode(
“com.parrot.missions.default.descent_to_position”,
gdnc_descent_msgs.Config(
type=gdnc_descent_msgs.TYPE_DEFAULT_PRECISE,
target_type=gdnc_descent_msgs.TARGET_TYPE_ALTITUDE_ATO,
altitude=1.0,),)
self.mc.dctl.cmd.sender.set_estimation_mode(cbry_est.LANDING)
• My questions :
◦ What is the right way to accomplish precise landing?
◦ What am I missing?
◦ What do following available functions do exactly.
▪ check_reset_sensor_timer(self, _)
▪ check_set_ref_image_condition(self)
▪ enable_precise_home(self, enable)
▪ get_drone_geo_position(self)
▪ get_drone_local_position(self)
▪ get_precise_home_local_position(self)
▪ is_move_already_interrupted(self)
▪ is_target_found(self)
▪ on_gps_ok(self)
▪ on_pcmd_horiz(self)
▪ on_set_mode(self, mode)
▪ on_state(self, state)
▪ reset_sensor(self)
▪ set_heading_is_locked(self)
▪ set_move_in_progress(self, ok)
▪ set_ref_image_timer(self, _)
▪ should_reset_sensor_score(self)
▪ should_search_phome(self)
▪ start_process(self)
▪ stop_process(self)
▪ check_reset_sensor_timer
▪ set_ref_image_timer
Thanks in advance.