Hello there,
I am struggling with the PointNfly feature of olympe using an anafi ai under sphinx without GUI (I have my own):
expectation_point = self.drone(
Execute(point=dict(Point(gimbal_control_mode=msg.poi_mode, latitude=msg.latitude, longitude=msg.longitude,altitude=msg.altitude)))
>> State(active=dict(point=dict(Point(gimbal_control_mode=msg.poi_mode, latitude=msg.latitude, longitude=msg.longitude,altitude=msg.altitude))))
>> FlyingStateChanged(state="flying")
).wait(_timeout=10)
if not expectation_point.success():
print("PointNfFly The drone has failed executing the 'Point' directive")
expectation_pointnfly_above_alt = self.drone(
State(unavailable=dict(reasons=["UNAVAILABILITY_REASON_DRONE_ABOVE_MAX_ALTITUDE"]))
).wait(_timeout=10)
if expectation_pointnfly_above_alt.success():
print("PointNFly failed because above alt")
return
expectation_pointnfly_not_flying = self.drone(
State(unavailable=dict(reasons=["UNAVAILABILITY_REASON_DRONE_NOT_FLYING"]))
).wait(_timeout=10)
if expectation_pointnfly_not_flying.success():
print("PointNFly is not possible when the drone is not flying")
return
expectation_pointnfly_not_calib = self.drone(
State(unavailable=dict(reasons=["UNAVAILABILITY_REASON_DRONE_NOT_CALIBRATED"]))
).wait(_timeout=10)
if expectation_pointnfly_not_calib.success():
print("PointNFly failed because not calib")
return
expectation_pointnfly_closetogroud = self.drone(
State(unavailable=dict(reasons=["UNAVAILABILITY_REASON_DRONE_TOO_CLOSE_TO_GROUND"]))
).wait(_timeout=10)
if expectation_pointnfly_closetogroud.success():
print("PointNFly failed because too close to ground")
return
expectation_pointnfly_no_batt = self.drone(
State(unavailable=dict(reasons=["UNAVAILABILITY_REASON_DRONE_INSUFFICIENT_BATTERY"]))
).wait(_timeout=10)
if expectation_pointnfly_no_batt.success():
print("PointNFly failed because no battery")
return
expectation_pointnfly_no_gps = self.drone(
State(unavailable=dict(reasons=["UNAVAILABILITY_REASON_DRONE_GPS_INFO_INACCURATE"]))
).wait(_timeout=10)
if expectation_pointnfly_no_gps.success():
print("PointNFly failed because no gps")
return
expectation_pointnfly_out_geo = self.drone(
State(unavailable=dict(reasons=["UNAVAILABILITY_REASON_DRONE_OUT_GEOFENCE"]))
).wait(_timeout=10)
if expectation_pointnfly_out_geo.success():
print("PointNFly failed because out geofence")
return
return
print("PointNFly 'Point' directive is executing! The drone is pointing to it")
I tried to get the info why the Point was failing but nothing it just returns :
PointNfFly The drone has failed executing the 'Point' directive
Do you have any idea why it doesn’t work for me ?
Thanks !