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

"Missing Arguments" error when running simple_mission_2 (or _1) #4

Open
yeff-fresh opened this issue Feb 22, 2024 · 0 comments
Open

Comments

@yeff-fresh
Copy link

yeff-fresh commented Feb 22, 2024

Hi Clearpath --

I'm using the latest (main) clearpath_onav_examples and running them against a CP Husky running OutdoorNav v0.11. I cloned the repository earlier today (Wed Feb 21)

When trying to run simple_mission_2, I got an error (this also happened with simple_mission_1):

Traceback (most recent call last):
File "/home/seymour/workspace/src/clearpath_onav_examples/clearpath_onav_api_examples/scripts/simple_mission_2", line 43, in
if SimpleMission2().run():
File "/home/seymour/workspace/src/clearpath_onav_examples/clearpath_onav_api_examples/scripts/simple_mission_2", line 29, in init
self.mission = Mission("Mission 2", "uuid-mission-2", waypoints)
TypeError: init() missing 2 required positional arguments: 'on_start_tasks' and 'on_stop_tasks'

Looking at the definition of Mission in clearnav_onav_api_examples_lib/src/mission.py, I see that the class constructor does want parameters on_start_tasks and on_stop_tasks and does not provide a default for them.

Changing simple_mission_2 to define the variables and add to the constructor solved the problem:

    on_start_tasks = []
    on_stop_tasks = []
    self.mission = Mission("Mission 2", "uuid-mission-2", waypoints, on_start_tasks, on_stop_tasks)

Thought you'd want to know!

(ETA - Looks like all the Mission() constructor calls in the examples have this issue. Probably easier to add defaults to the mission constructor in mission.py. I did this and it works great).

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

No branches or pull requests

1 participant