I’m wondering how can I use olympe to run this mission. I have already installed the mission to the physical drone. Here is the script for runnning the service, but I didn’t see anything happen when the script done. Where did i go wrong? Help appreciated.
import logging
import olympe
import olympe.log
import os
from olympe.messages import mission
DRONE_IP = os.environ.get("DRONE_IP","192.168.42.1")
# telemetry test mission
TELEMETRY_MISSION_URL = os.environ.get("TELEMETRY_MISSION_URL", "/home/user/code/airsdk-samples/telemetry_py/.airsdk/out/telemetry_py-anafi2_classic/images/com.parrot.missions.samples.telemetry_py.tar.gz")
olympe.log.update_config({"loggers": {"olympe": {"level": "WARNING"}}})
logger = logging.getLogger("olympe")
def test_telemetry_mission():
drone = olympe.Drone(DRONE_IP)
with drone.mission.from_path(TELEMETRY_MISSION_URL).open() as telemetry:
assert drone.connect()
mission_activated = drone(
mission.load(uid=telemetry.uid)
>> mission.activate(uid=telemetry.uid)
)
assert mission_activated.wait(), mission_activated.explain()
input("Press to stop...")
assert drone.disconnect()
if __name__ == "__main__":
test_telemetry_mission()