Skip to content
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

Add new modules to support uploading Fence and Rally with Mission Item Protocol #676

Merged

Conversation

peterbarker
Copy link
Contributor

@peterbarker peterbarker commented Aug 29, 2019

.... also changes to mavproxy_map to allow manipulation of same.

@peterbarker peterbarker force-pushed the pr/mission-item-protocol-fence-rally branch 4 times, most recently from 8d0a5c1 to c163243 Compare September 2, 2019 02:56
@peterbarker peterbarker force-pushed the pr/mission-item-protocol-fence-rally branch 2 times, most recently from 2021d85 to a01a0b6 Compare September 16, 2019 12:22
@peterbarker peterbarker force-pushed the pr/mission-item-protocol-fence-rally branch from a01a0b6 to f3fa2f4 Compare May 28, 2020 01:30
@tridge
Copy link
Contributor

tridge commented May 27, 2022

@peterbarker ping?

@peterbarker peterbarker force-pushed the pr/mission-item-protocol-fence-rally branch 2 times, most recently from 40a5bab to 2d5c712 Compare July 22, 2023 03:10
@peterbarker peterbarker removed the WIP label Jul 22, 2023
@tridge
Copy link
Contributor

tridge commented Jul 22, 2023

@peterbarker it seems to be missing some changes in mavwp: ```
Traceback (most recent call last):
File "/home/tridge/.local/bin/mavproxy.py", line 4, in
import('pkg_resources').run_script('MAVProxy==1.8.65', 'mavproxy.py')
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 656, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 1460, in run_script
exec(script_code, namespace, namespace)
File "/home/tridge/.local/lib/python3.10/site-packages/MAVProxy-1.8.65-py3.10.egg/EGG-INFO/scripts/mavproxy.py", line 1448, in
File "/home/tridge/.local/lib/python3.10/site-packages/MAVProxy-1.8.65-py3.10.egg/EGG-INFO/scripts/mavproxy.py", line 530, in load_module
File "/home/tridge/.local/lib/python3.10/site-packages/MAVProxy-1.8.65-py3.10.egg/MAVProxy/modules/mavproxy_rally.py", line 143, in init
File "/home/tridge/.local/lib/python3.10/site-packages/MAVProxy-1.8.65-py3.10.egg/MAVProxy/modules/mavproxy_rally.py", line 21, in init
AttributeError: module 'pymavlink.mavwp' has no attribute 'MissionItemProtocol_Rally'

maybe we should just not load rally module if this fails?

@peterbarker peterbarker force-pushed the pr/mission-item-protocol-fence-rally branch from 2d5c712 to 4543740 Compare July 22, 2023 08:53
Copy link
Contributor

@tridge tridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the FEN icon in console doesn't seem to be updating correctly? Shows as grey with a fence enabled and in breach

'''process a waypoint request from the master'''
if m.mission_type != self.mav_mission_type():
return
print("Processing %s request: (%s)" % (self.itemtype(), str(m)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this debug is very annoying

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

self.request_list_send()

def cmd_load(self, args):
print("args: %s" % str(args))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove debug

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

'''save waypoints to a file in human-readable CSV file'''
f = open(filename, mode='w')
headers = ["Seq", "Frame", "Cmd", "P1", "P2", "P3", "P4", "X", "Y", "Z"]
print(self.csv_line(headers))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

self.pretty_parameter_value(w.y),
self.pretty_parameter_value(w.z),
]
print(self.csv_line(out_list))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more debug

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

if ftp is None:
print("Need ftp module")
return
print("Fetching mission with ftp")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Copy link
Contributor Author

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

'''process a waypoint request from the master'''
if m.mission_type != self.mav_mission_type():
return
print("Processing %s request: (%s)" % (self.itemtype(), str(m)))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

self.request_list_send()

def cmd_load(self, args):
print("args: %s" % str(args))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

'''save waypoints to a file in human-readable CSV file'''
f = open(filename, mode='w')
headers = ["Seq", "Frame", "Cmd", "P1", "P2", "P3", "P4", "X", "Y", "Z"]
print(self.csv_line(headers))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

self.pretty_parameter_value(w.y),
self.pretty_parameter_value(w.z),
]
print(self.csv_line(out_list))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

if ftp is None:
print("Need ftp module")
return
print("Fetching mission with ftp")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@peterbarker
Copy link
Contributor Author

the FEN icon in console doesn't seem to be updating correctly? Shows as grey with a fence enabled and in breach

This turned out to be because the action was report-only.

to make way for mission-item-protocol-base-transfer
to make way for mission-item-protocol-base-transfer
mavproxy_map: SlipCircle handles clicked callback

Allows circles to be right-clicked and manipulated.

mavproxy_map: mp_slipmap_util.py: add UnclosedSlipPolygon

Variant of the existing SlipPolygon which doesn't assume it can discern
item types and doesn't assume a closing point on the polygon.

mavproxy_map: add support for drawing MissionItemProtocol fences

mavproxy_map: add option to insert polygon points

mavproxy_map: add option to draw polyfences on map

mavproxy_map: hide remove-fence option
@peterbarker peterbarker force-pushed the pr/mission-item-protocol-fence-rally branch from 046aaf1 to 8049c5f Compare July 28, 2023 00:26
@tridge tridge merged commit f4b3b62 into ArduPilot:master Jul 29, 2023
1 check passed
@peterbarker peterbarker deleted the pr/mission-item-protocol-fence-rally branch July 30, 2023 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants