Servers by jDrones

Rover: Planned mission waypoints truncated unable to follow survery requirements

General description

Using AionRobotics with pixhawk4 and here+ RTK GPS.

The requirements of our survey are that the lines be separated by no more than 60cm. The planned linespacing of mission is at 0.4m with an inline spacing of 0.2m.

The problem is that the coordinates planned are truncated when stored in the pixhawk. This causes unregular linespacing of the mission (some waypoints are truncated in different ways from the previous points).

Analysis

The read vs written waypoints files are available here: https://drive.google.com/open?id=1358n4gqWHD_3hiR6Ss6FsIIgQxJn2T0l

The python script used to analyze the differences between the waypoints is on the same link:

import re


def get_wps_comp(wps_path: str) -> list:
    wps = open(wps_path)
    return [re.sub("\t", " ", l.strip()).split() for l in wps]


read_wps = get_wps_comp(r'path_to/compare_read_wps.waypoints')
write_wps = get_wps_comp(r'path_to/compare_written_wps.waypoints')

count = 0
for a, b in zip(read_wps, write_wps):
    if a != b:
        count += 1
        print(a[-4:-2], '\n', b[-4:-2], '\n')

print(f'total num of unmatches: {count}, percentage: {count / len(write_wps) * 100}')

17% of the waypoints do not have matching coordinates for a total of 113 waypoints.

Issue

I understand that this is probably the expected behavior that results from a willingness to limit the space required by the waypoints. Using truncation methods is legitimate for most applications (particularly drone missions).

However, for survey applications that require having sensors at the ground level, being able to follow predefine at the 10cm level is a requirement. The goals of the application simply cannot be reached without working at that scale.

Solution

Does anyone know of current work being done on this front? I am willing to help on the development side of things to make this feature available.

The two options seem like either we must change how the pixelhawk truncates coordinates or we must develop an independent method of navigation for the rover.

Do not hesitate if you have any questions.

1 Like

From memory the underlying issue is that ArduPilot stores the waypoints as floats, and the level of accuracy you’re after would require int32.
I’m not sure how involved changing that would be.
Perhaps @MagicRuB could comment?

@zacharyDez As @james_pattison said, it is likely a double -> float truncation in the transfer. How are you uploading the missions?

I was uploading the missions using mission planner directly. Using a new solution with Mavproxy instead to read WPS directly off rover’s on-board computer. Not sure if this will solve the truncation issue, but seems like the wp is not being stored directly in the pixelhawk. Removes limitation of 723 WPS per mission as well.

Somewhere in there we have an int to float truncation. There are separate mavlink commands. Are you running new-ish firmware? Like, something in the last 4 years? Everything should be on _INT these days. Do you have any custom mavlink handing anywhere?

Servers by jDrones