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

scenario formats? #51

Open
ydhadix opened this issue Jul 12, 2023 · 1 comment
Open

scenario formats? #51

ydhadix opened this issue Jul 12, 2023 · 1 comment

Comments

@ydhadix
Copy link

ydhadix commented Jul 12, 2023

Running v0.2.2, it seems like there are two different formats for scenario .json files. Some follow the format in SCHEMA.json, but many do not, such as test_scenario. Attempting to run these scenarios gives the following error.

  File "/home/username/catkin_ws/devel/lib/task_generator/task_generator_node.py", line 15, in <module>
    exec(compile(fh.read(), python_script, 'exec'), context)
  File "/home/username/catkin_ws/src/arena-rosnav/task_generator/scripts/task_generator_node.py", line 118, in <module>
    task_generator = TaskGenerator()
  File "/home/username/catkin_ws/src/arena-rosnav/task_generator/scripts/task_generator_node.py", line 40, in __init__
    self.task = get_predefined_task("", self.task_mode, self.env_wrapper)
  File "/home/username/catkin_ws/src/arena-rosnav/task_generator/task_generator/tasks/utils.py", line 49, in get_predefined_task
    task = TaskFactory.instantiate(
  File "/home/username/catkin_ws/src/arena-rosnav/task_generator/task_generator/tasks/task_factory.py", line 23, in instantiate
    return simulator(*args, **kwargs)
  File "/home/username/catkin_ws/src/arena-rosnav/task_generator/task_generator/tasks/scenario.py", line 26, in __init__
    super().__init__(obstacles_manager, robot_managers, map_manager, **kwargs)
  File "/home/username/catkin_ws/src/arena-rosnav/task_generator/task_generator/tasks/base_task.py", line 24, in __init__
    self._set_up_robot_managers()
  File "/home/username/catkin_ws/src/arena-rosnav/task_generator/task_generator/tasks/scenario.py", line 94, in _set_up_robot_managers
    self._check_robot_manager_length()
  File "/home/username/catkin_ws/src/arena-rosnav/task_generator/task_generator/tasks/scenario.py", line 99, in _check_robot_manager_length
    scenario_robots_length = len(self.scenario_file["robots"])
KeyError: 'robots'

The companion application arena-tools produces files of the second, nonfunctioning format (and have a 'format' field indicating as much).

Am I missing some obvious method to use the provided and generated arena-tools scenarios?

A related but less important question, both scenario formats indicate the map that pairs with the given scenario, and attempting to launch a scenario with a different map results in an error. Is there a reason the map is even a launch parameter if it can never be different than the map listed in the chosen scenario?

@linhdoan8
Copy link
Contributor

Hey, yes we have had multiple formats and are currently updating our companion app to create scenarios in the new format. We will dismiss the arena-tools and instead use arena-web to create new scenarios. The update will be announced in the next week. sorry for the confusion.

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

2 participants