I am wondering if there is a certain point in which I am supposed to upload the mission to the vehicle?
All current missions that I am planning are set at 5m/s and yet it seems like nearly everytime I activate the mission the speed the drone flys at is 10m/s.
My step by step is the following:
- Create mission prior to flight removing take off and land waypoints (I do it manually)
- Turn on drone and calibrate the compass
- Import mission (do not fiddle with speed or altitude settings but check to see if the grayed out velocity is ok)
- Upload the mission to the drone
- Take off and head to desired first way point
- Start mission via remote controller (flip switch)
The one thing I have noticed is once the mission ends, if I change the speed to say 4m/s and reupload it to the drone mid-air it flys at the desired speed.
Is it a missions setting that I am missing? Do the missions need to be upload post-take off if I am doing it manually?
I have also noticed that if I change the missions and save them under the same name, and reupload them, that the changed settings are not reflected in the file.
What PX4 version are you using? Can you share a .plan file?
I was recently working on the speed handling in missions, if you feel like you can try it out: Navigator: Resume mission with last flight speed by sfuhrer · Pull Request #21714 · PX4/PX4-Autopilot · GitHub (it only has had very basic testing yet).
To be honest I am not sure what version is loaded on the vehicle. The manufacturer already claimed that foir various reasons their drone works on a previous version of the firmware.
That being said when asked upon, they admitted what I was experiencing was a bug intending to be fixed.
The issue seems to be that in the mission planner, unless the first waypoint`s speed is set by clicking the check mark, it will fly at the max cruise speed parameter setting.
I`ll take a look at what you shared but at the very least it seems like there is a workaround.
I can tell you what “should” happen from a mavlink perspective
Speed settings are “under the hood” implemented as the addition of the mavlink command MAV_CMD_DO_CHANGE_SPEED. This sets a speed setpoint - i.e. the current speed of the vehicle. That speed should be maintained until either of two things happen:
- There is a new speed setpoint - i.e. the setpoint is changed in another mission item, an external command changes the setpoint.
- The flight mode changes
@sfuhrer I am not sure if the setpoint changes for other reasons. I.e. if internally the setpoint is changed to slow you down around a setpoint or whatever. There was also discussion that the setpoint should persist for the lifetime of the mission until replaced - so if you switch back to a mission from hold the same value should be used. IMO that is desirable because it is the intent - i.e. users want to set the “speed between waypoints” and have it used until replaced or the mission ends.
The point at which you upload a mission should definitely not change the operation of the mission.
The only exception would be if you uploaded a new mission while the mission count was later than the point at which you set the speed.