Comments (6)
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.
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.
- 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
- 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)
- 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.
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.
I commented out start_mission()
. How do I upload this .py
file to QGC? It wants a .plan
file.
from mavsdk-python.
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.
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)
- drone.info.get_version() INFORMATION_NOT_RECEIVED_YET HOT 8
- FILE_DOES_NOT_EXIST on calling the drone.ftp.list_directory() to fetch internal directories file HOT 13
- The use of drone.offboard.set_position_ned HOT 9
- Unable to upload rally_items through MAVSDK HOT 10
- Error when uploading mission: INVALID_PARAM1 HOT 6
- `aiogrpc` RuntimeError HOT 35
- Running missions in ArduPilot HOT 12
- How to use mavsdk-python to takeoff without GPS HOT 4
- How do I use `telemetry_server` correctly? HOT 4
- Analyzing log files or Distance travelled data from mavsdk python HOT 5
- Geofence crashes with the only information being "Error" HOT 1
- connectivity HOT 5
- Support custom COMMAND_LONG listeners and be able to ACK HOT 6
- can't connect to QGC via UDP connection using mavsdk HOT 3
- Get HEARTBEAT message from MAVSDK HOT 5
- How to use Mavsdk to call Led_control to control LED lights? HOT 2
- MAVSDK server not connecting with JMAVSIM - Windows WSL HOT 2
- How can I set flight mode - manual mode? HOT 1
- Altitude error while doing swarming using mavsdk-python ? HOT 2
- RuntimeError: Task pending got Future attached to a different loop during Offboard control with FastAPI and MAVSDK HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mavsdk-python.