Question about running telemetry_py example

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()

Hi @doom0831,

The telemetry_py mission get the telemetry and log them into the drone. It’s normal if you doesn’t seem anything because the mission doesn’t send external logs or messages. Take a look at this documentation to find out how to connect to the drone, and consult the logs. (don’t forget to enable the missions logs)

Regards,
Axel

This topic was automatically closed after 30 days. New replies are no longer allowed.