Integrity of Waypoint is poor after writing to Pixhawk 2.1(Cube)

Any set of waypoints that I write to my pixhawk cube appears to lose its integrity(by integrity i mean the position). The above image portrays the problem is the best way.
The waypoints are approx. separated by 5m, and looks fine when seen in the “flight plan” tab of mission planner(top half of image). But as soon as I write to pixhawk and read back the waypoints, they come up in a different way(bottom half) to what was originally written. I’m pretty sure my rover also is following the incorrect set of waypoints while running in “Auto” mode. I’ve looked over everywhere for similar issue that anyone might’ve faced and haven’t found anyone who had faced similar problem.

I have tried all following ways of connecting pixhawk to Mission Planner, and the issue still persists.

  1. Direct USB connection
  2. Connection through a Companion computer(RPi) running MAVProxy over Wifi.
  3. via. Telemetry Radio on telemetry port 1.

Any help would be greatly appreciated.

Thanks,
SK.

@ezFarmer that’s highly unlikely to happen. Did you try cross-verifying the lat and long read back from the pixhawk with the original waypoint file? Maybe, its just a Mission planner display thing?

Thanks for your suggestion @arjun7965.

The waypoints seems to be stored that way into the pixhawk by itself. To update, I’m attaching 2 files,

  1. PathGeneration1.waypoints.txt - manually created file, intended waypoint location.
  2. 2019-04-17 10-54-30.log0wp.waypoints.txt - Waypoint file extracted from dataflash log of pixhawk.

The difference between them is alarming. All i have done is uploaded file#1 and extracted the waypoints form the log. It would be very useful if someone sheds more light into this issue.
I have tried with both MAVLINK 1 and 2 settings.

PathGeneration1.waypoints.txt (644 Bytes)
2019-04-17 10-54-30.log0wp.waypoints.txt (583 Bytes)

Thanks,
SK

1 Like

What version of Mission Planner are you using?
There is a definite change in the waypoints, including the lat/long being truncated from 7 to 4 or 5 decimal places.
The other notable thing is the 11 tabs after the name that get removed or are the source of the conflict.
I generated a file from the current MP and it produces WP with 8 decimal points.
There is also not the 11 tabs after the name.
Your original:
40%20am
Mine generated from current version:


And re-read from a PH1:

So I think you might have a version difference as the waypoint files are not generated as per your original by current MP versions.

Just as a point of reference, the autotest suite uses 0.000009 as the maximum permissible delta between the uploaded mission and its download.

You might try a different GCS to bisect the problem.

Thanks for the suggestions.

I should say that I’m still facing the same problem even with a different GCS, in this case I am using APM Planner 2. APM Planner is supporting upto 16 digits waypoint precision.

My original waypoints file is this.
path_13d_APMPlanner.txt (2.0 KB)

path_13d_loaded

When i readback the flight plan, I get this.
path_13d_APMPlanner_freshReadback.txt (2.2 KB)

path_13d_readback

The waypoints appear definitely off regardless of which GCS I use. What do you think? Is this normal, Is the difference in waypoints readback as bad as it looks? Is this a Hardware specific issue? I could only check with a pixhawk cube.

Regards,
SK

I have this same problem with Mission Planner and Pixhawk4 so I don’t think it’s hardware specific. I draw a circle in MP, and when I read the waypoints back from the rover, it’s not a circle… This is a 2-meter circle with 30 waypoints. The 2 circles (one developed in Mission Planner and one after I write the waypoints) are below:

. Perhaps someone knows what accuracy the waypoints are stored at in ardurover? @rmackay9??

@Christopher_Milner,

I’ve just done a similar test using MP Beta version (1.3.68 build 1.3.7105.26478) and uploading to Rover-3.5.1 (official version) and it seems to be working OK so I’m not immediately able to recreate the problem.

I wonder if it’s possible that on your PC an old version of MP is being used or perhaps on the flight controller it’s an old version of Rover?

Exact same versions of MP and Rover.

OK. When I create a 2 meter circle, “Write Waypoints” to the pixhawk4, then “Clear Mission”, then “Read Waypoints”, the circle is perfect (like in your example above) when viewed in the Flight Plan screen.

However when I create a 2 meter circle, “Write Waypoints”, then go to the Flight Data screen, I see the problem. So the problem manifests itself on the flight data screen (i.e. the non-smooth circle like in my post above). Further, it also manifests itself when the rover drives the “circle”; it sure seems like it’s navigating around the irregular waypoints of the circle, and not around the smooth circle I see on the Flight Plan screen.

@rmackay9 - Any thoughts on how to debug this? Thanks in advance…

OK, I’ve recreated the issue with the MP’s display of the mission on the Flight Data screen. This looks like a bug and should be raised in the MP’s issue list.

I also tested running the mission and it actually drove it better than I had expected after I made these changes:

  • WP_SPEED = 0.5
  • WP_RADIUS = 0.3

EDIT: I’ve created an issue for the MP here: https://github.com/ArduPilot/MissionPlanner/issues/2173

I worked further on tuning my vehicle … and am now navigating 1 meter radius circles (with 12 points) very well with my 175kg, 1.2 meter wide x 1.2 meter long rover. The inside wheel traces a 0.5 meter radius circle. These circles (in practice I’ll probably use 2 meter radius circles…) will be used to mow circles around obstacles such as trees. I am using WP_SPEED 0.5 and WP_RADIUS of 0.2 (Pixhawk4 with an Ardusimple RTK GPS). Fantastic.