-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to upload rally_items through MAVSDK #692
Comments
Hmm, when you say "ignores" what happens? Does it not upload anything? Do you get an error? |
No error occurs, it just doesn't appear to upload the rally items to the drone. I can still run the mission items and the drone will go to the waypoints but it won't ever go to the rally points and they aren't visible in AMC. |
Can you check whether the rally point import actually works. just check the length of the |
The rally import works, printing the length of For reference, the code I am running is: # ...connect to drone
out = await drone.mission_raw.import_qgroundcontrol_mission("sample_mission.plan")
print(len(out.rally_items)) # prints 2
await drone.mission_raw.upload_rally_points(out.rally_items)
await drone.mission_raw.upload_mission(out.mission_items) This is the mission plan I am testing with: {
"UUID": "c79a2c853872309b8dd462791474cb323d936af2",
"fileType": "Plan",
"geoFence": {
"circles": [
],
"polygons": [
{
"inclusion": true,
"polygon": [
[
43.85722818608631,
-79.61147095948077
],
[
43.85722818608631,
-79.60492835311206
],
[
43.85429874744504,
-79.60492835311206
],
[
43.85429874744504,
-79.61147095948077
]
],
"version": 1
}
],
"version": 2
},
"groundStation": "QGroundControl",
"mission": {
"cruiseSpeed": 15,
"firmwareType": 12,
"globalPlanAltitudeMode": 1,
"hoverSpeed": 5,
"items": [
{
"MISSION_ITEM_ID": "0",
"autoContinue": true,
"command": 178,
"doJumpId": 1,
"frame": 2,
"params": [
1,
5,
-1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"AMSLAltAboveTerrain": 100,
"Altitude": 100,
"AltitudeMode": 1,
"MISSION_ITEM_ID": "2",
"autoContinue": true,
"command": 16,
"doJumpId": 2,
"frame": 3,
"params": [
0,
0,
0,
null,
43.85613586,
-79.60898841,
100
],
"type": "SimpleItem"
},
{
"AMSLAltAboveTerrain": 100,
"Altitude": 100,
"AltitudeMode": 1,
"MISSION_ITEM_ID": "3",
"autoContinue": true,
"command": 16,
"doJumpId": 3,
"frame": 3,
"params": [
0,
0,
0,
null,
43.85572471,
-79.60793674,
100
],
"type": "SimpleItem"
},
{
"AMSLAltAboveTerrain": 100,
"Altitude": 100,
"AltitudeMode": 1,
"MISSION_ITEM_ID": "4",
"autoContinue": true,
"command": 16,
"doJumpId": 4,
"frame": 3,
"params": [
0,
0,
0,
null,
43.85642823,
-79.60695476,
100
],
"type": "SimpleItem"
},
{
"AMSLAltAboveTerrain": 100,
"Altitude": 100,
"AltitudeMode": 1,
"MISSION_ITEM_ID": "5",
"autoContinue": true,
"command": 16,
"doJumpId": 5,
"frame": 3,
"params": [
0,
0,
0,
null,
43.85687592,
-79.6084499,
100
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 20,
"doJumpId": 6,
"frame": 2,
"params": [
0,
0,
0,
0,
0,
0,
0
],
"type": "SimpleItem"
}
],
"plannedHomePosition": [
43.856405656176875,
-79.60898841,
217
],
"vehicleType": 2,
"version": 2
},
"rallyPoints": {
"points": [
[
43.85535468,
-79.6069801,
0
],
[
43.8566064,
-79.60628322,
0
]
],
"version": 2
},
"version": 1
} Thank you! |
Great, thanks for that. |
Ok, I tried this and I get this:
As soon as I add in a sleep before doing the rally points, it starts working. That's a workaround but hopefully gets you unblocked.
|
And the real fix is over here: mavlink/MAVSDK#2311 |
Thank you for providing updated code, I tested it and while the rally point uploads don't crash, the rally points in the file still don't seem to be actually uploaded to the drone. The Code: ...
out = await drone.mission_raw.import_qgroundcontrol_mission("sample_mission.plan")
await drone.mission_raw.upload_mission(out.mission_items) # this is sent to the drone
await asyncio.sleep(0.1)
assert len(out.geofence_items) > 0
await drone.mission_raw.upload_geofence(out.geofence_items) # this is sent to the drone
await asyncio.sleep(0.1)
assert len(out.rally_items) > 0
await drone.mission_raw.upload_rally_points(out.rally_items) # this isn't sent to the drone, no error occurs Is this something that is fixed in mavlink/MAVSDK#2311 or is this a separate issue? Thanks |
They were uploaded in my testing just fine, so that's confusing. |
One other thing to consider is whether your version of PX4 has this: PX4/PX4-Autopilot#22309 |
Hi,
I am working with the MissionRaw plugin and am attempting to upload a mission file which also contains rally points to the drone. While I am able to upload a
.plan
file and view the correct mission details through AMC, attempting to perform the same action with MAVSDK-Python ignores therally_items
:Minimal example:
Versions:
Am I using the right interface for this and is there an alternate order I should be performing the uploads?
Thanks
The text was updated successfully, but these errors were encountered: