Git Product home page Git Product logo

Comments (6)

JonasVautherin avatar JonasVautherin commented on August 18, 2024 1

dronecode_sdk.plugins.mission.MissionError: ERROR: 'Error'; origin: start_mission(); params: ()

start_mission() raised a MissionError with code ERROR (which you could obviously catch with the usual try... except... python construct).

My guess is that your simulator refused to take off because the waypoints you uploaded are too far away from the drone.

Did you try to download the mission from QGC and run it from there?

from mavsdk-python.

joe-marrone avatar joe-marrone commented on August 18, 2024

After some experimenting, I changed the location parameters in MAVLink to my home location. Then I modified the location parameters in the mission.py script. The drone took off and rose to the specified altitude. It paused there and then landed. Just prior to the mission starting it got a RTL command. The mission readouts are below. Essentially the mission was aborted.

  1. jMAVSim output:
INFO  [logger] Opened full log file: ./log/2019-03-04/19_10_19.ulg
INFO  [logger] Start file log (type: mission)
INFO  [logger] Opened mission log file: ./mission_log/2019-03-04/19_10_19.ulg
INFO  [commander] Takeoff detected
INFO  [commander] Returning to launch
INFO  [navigator] RTL HOME activated
INFO  [navigator] RTL: climb to 100 m (10 m above home)
INFO  [navigator] RTL: return at 100 m (10 m above home)
INFO  [navigator] RTL: descend to 100 m (10 m above home)
INFO  [navigator] RTL: land at home
INFO  [commander] Landing detected
INFO  [logger] closed logfile, bytes written: 6715
INFO  [logger] closed logfile, bytes written: 2483958
  1. Backend output:
[02:10:19|Debug] Send mission item 0 (mission_impl.cpp:1109)
[02:10:19|Debug] Send mission item 1 (mission_impl.cpp:1109)
[02:10:19|Debug] Send mission item 2 (mission_impl.cpp:1109)
[02:10:19|Debug] Send mission item 3 (mission_impl.cpp:1109)
[02:10:19|Debug] Send mission item 4 (mission_impl.cpp:1109)
[02:10:19|Debug] Send mission item 5 (mission_impl.cpp:1109)
[02:10:19|Debug] Send mission item 6 (mission_impl.cpp:1109)
[02:10:19|Info ] Mission accepted (mission_impl.cpp:164)
[02:10:19|Debug] MAVLink: info: ARMED by arm/disarm component command (system_impl.cpp:292)
[02:10:19|Debug] MAVLink: info: [logger] file: ./log/2019-03-04/19_10_19.ulg (system_impl.cpp:292)
[02:10:19|Debug] MAVLink: info: Takeoff to 25.0 meters above home. (system_impl.cpp:292)
[02:10:19|Debug] MAVLink: info: Takeoff detected (system_impl.cpp:292)
[02:10:36|Debug] current: 0, total: 3 (mission_impl.cpp:1188)
[02:10:36|Debug] current: 1, total: 3 (mission_impl.cpp:1188)
[02:10:37|Debug] current: 2, total: 3 (mission_impl.cpp:1188)
[02:10:37|Debug] MAVLink: info: Returning to launch (system_impl.cpp:292)
[02:10:37|Debug] current: 3, total: 3 (mission_impl.cpp:1188)
[02:10:37|Debug] MAVLink: info: RTL HOME activated (system_impl.cpp:292)
[02:10:37|Debug] MAVLink: info: RTL: climb to 100 m (10 m above home) (system_impl.cpp:292)
[02:10:53|Debug] MAVLink: info: RTL: return at 100 m (10 m above home) (system_impl.cpp:292)
[02:10:53|Debug] MAVLink: info: RTL: descend to 100 m (10 m above home) (system_impl.cpp:292)
[02:10:53|Debug] MAVLink: info: RTL: land at home (system_impl.cpp:292)
[02:11:10|Debug] MAVLink: info: Landing detected (system_impl.cpp:292)
[02:11:11|Debug] MAVLink: info: DISARMED by auto disarm on land (system_impl.cpp:292)
  1. Python script output:
joe-pl@joe-PL:~/DronecodeSDK/DronecodeSDK-Python/examples$ python3.6 mission.py
-- Uploading mission
-- Arming
-- Starting mission
Mission progress: 0/3
Mission progress: 1/3
Mission progress: 2/3
Mission progress: 3/3

The script I used is the canned mission.py that is supplied in the DronecodeSDK/DronecodeSDK-Python/examples/ file. All I did was change the three location parameters to my location, along with changing these parameters in MAVLink.

PX4_HOME_LAT
PX4_HOME_LON
PX4_HOME_ALT

Any clues as to why the mission did not run?

Joe

from mavsdk-python.

JonasVautherin avatar JonasVautherin commented on August 18, 2024

So you say that the mission works fine if you don't change anything from the example, right?

Can you try to not start the mission (comment out the start_mission() line), upload the mission, and then download and run it from QGC?

from mavsdk-python.

joe-marrone avatar joe-marrone commented on August 18, 2024

I commented out start_mission(). How do I upload this .py file to QGC? It wants a .plan file.

from mavsdk-python.

joe-marrone avatar joe-marrone commented on August 18, 2024

I played around with waypoint locations and did get the mission.py to run using the modified parameters. Th only thing I can think of is that I had the waypoints too close together and by putting them further apart I could see the mission running. So now I have a working system.

from mavsdk-python.

JonasVautherin avatar JonasVautherin commented on August 18, 2024

Right, so it's not an SDK issue.

I commented out start_mission(). How do I upload this .py file to QGC? It wants a .plan file.

That's not what I meant. You can connect both the SDK and QGC to the drone (in this case SITL) at the same time. If you comment out start_mission() and run mission.py, it will upload a mission to the drone. From QGC, you can download this mission and see how it looks on the map. You can also try to run it.

Closing now, as you figured out why your mission was not valid 👍.

from mavsdk-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.