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

Found a few further issues or bugs while testing the configs. #45

Open
khaep opened this issue May 11, 2023 · 5 comments
Open

Found a few further issues or bugs while testing the configs. #45

khaep opened this issue May 11, 2023 · 5 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@khaep
Copy link

khaep commented May 11, 2023

Hello all,

in relation to the bugfix mentioned here, I pulled the updates from the ros2 branch, built the package again with colcon buildand test the other configs from the config folder.

Thereby some other issues occured that indicate other bugs.
The config files with the corresponding error messages are listed below.

------------------------------fre21_task_1------------------------------

ros2 run virtual_maize_field generate_world fre21_task_1

Error message:

Traceback (most recent call last):
  File "/home/user/00_code/tutorials/test_ws/install/virtual_maize_field/lib/virtual_maize_field/generate_world", line 33, in <module>
    sys.exit(load_entry_point('virtual-maize-field==4.7.3', 'console_scripts', 'generate_world')())
  File "/home/user/00_code/tutorials/test_ws/install/virtual_maize_field/lib/python3.10/site-packages/virtual_maize_field/generate_world.py", line 174, in main
    generator.generate()
  File "/home/user/00_code/tutorials/test_ws/install/virtual_maize_field/lib/python3.10/site-packages/virtual_maize_field/generate_world.py", line 31, in generate
    generated_sdf, heightmap = self.fgen.generate()
  File "/home/user/00_code/tutorials/test_ws/install/virtual_maize_field/lib/python3.10/site-packages/virtual_maize_field/world_generator/field_2d_generator.py", line 167, in generate
    self.generate_ground()
  File "/home/user/00_code/tutorials/test_ws/install/virtual_maize_field/lib/python3.10/site-packages/virtual_maize_field/world_generator/field_2d_generator.py", line 470, in generate_ground
    height = heightmap[py, px]
IndexError: index 2101 is out of bounds for axis 1 with size 2049
[ros2run]: Process exited with failure 1

------------------------------fre21_task_1_fast------------------------------

ros2 run virtual_maize_field generate_world fre21_task_1_fast

Error message:

Traceback (most recent call last):
  File "/home/user/00_code/tutorials/test_ws/install/virtual_maize_field/lib/virtual_maize_field/generate_world", line 33, in <module>
    sys.exit(load_entry_point('virtual-maize-field==4.7.3', 'console_scripts', 'generate_world')())
  File "/home/user/00_code/tutorials/test_ws/install/virtual_maize_field/lib/python3.10/site-packages/virtual_maize_field/generate_world.py", line 174, in main
    generator.generate()
  File "/home/user/00_code/tutorials/test_ws/install/virtual_maize_field/lib/python3.10/site-packages/virtual_maize_field/generate_world.py", line 31, in generate
    generated_sdf, heightmap = self.fgen.generate()
  File "/home/user/00_code/tutorials/test_ws/install/virtual_maize_field/lib/python3.10/site-packages/virtual_maize_field/world_generator/field_2d_generator.py", line 167, in generate
    self.generate_ground()
  File "/home/user/00_code/tutorials/test_ws/install/virtual_maize_field/lib/python3.10/site-packages/virtual_maize_field/world_generator/field_2d_generator.py", line 470, in generate_ground
    height = heightmap[py, px]
IndexError: index 129 is out of bounds for axis 1 with size 129
[ros2run]: Process exited with failure 1

------------------------------fre21_task_3------------------------------

ros2 run virtual_maize_field generate_world fre21_task_3

Error message:

Traceback (most recent call last):
  File "/home/user/00_code/tutorials/test_ws/install/virtual_maize_field/lib/virtual_maize_field/generate_world", line 33, in <module>
    sys.exit(load_entry_point('virtual-maize-field==4.7.3', 'console_scripts', 'generate_world')())
  File "/home/user/00_code/tutorials/test_ws/install/virtual_maize_field/lib/python3.10/site-packages/virtual_maize_field/generate_world.py", line 174, in main
    generator.generate()
  File "/home/user/00_code/tutorials/test_ws/install/virtual_maize_field/lib/python3.10/site-packages/virtual_maize_field/generate_world.py", line 31, in generate
    generated_sdf, heightmap = self.fgen.generate()
  File "/home/user/00_code/tutorials/test_ws/install/virtual_maize_field/lib/python3.10/site-packages/virtual_maize_field/world_generator/field_2d_generator.py", line 169, in generate
    self.render_to_template()
  File "/home/user/00_code/tutorials/test_ws/install/virtual_maize_field/lib/python3.10/site-packages/virtual_maize_field/world_generator/field_2d_generator.py", line 574, in render_to_template
    object_coordinates = [
  File "/home/user/00_code/tutorials/test_ws/install/virtual_maize_field/lib/python3.10/site-packages/virtual_maize_field/world_generator/field_2d_generator.py", line 575, in <listcomp>
    into_dict(
  File "/home/user/00_code/tutorials/test_ws/install/virtual_maize_field/lib/python3.10/site-packages/virtual_maize_field/world_generator/field_2d_generator.py", line 529, in into_dict
    coordinate["custom_visual"] = model.get_model_visual()
  File "/home/user/00_code/tutorials/test_ws/install/virtual_maize_field/lib/python3.10/site-packages/virtual_maize_field/world_generator/models.py", line 29, in get_model_visual
    assert model_folder.is_dir(), f"Cannot find model {self.model_name}!"
AssertionError: Cannot find model nettle!
[ros2run]: Process exited with failure 1

Same error for fre21_task_3_fast.yaml and fre21_task_3_mini.yaml.

------------------------------fre22_task_mapping------------------------------

ros2 run virtual_maize_field generate_world fre22_task_mapping

Error message:

Error: Cannot find any model matching the regular expression '(dandelion_[0-9]+)' in the models folder! Did you add the models to that folder?
[ros2run]: Process exited with failure 1

Same error for fre22_task_mapping_fast.yaml and fre22_task_mapping_mini.yaml.

Can you please provide a bug fix or a hint how to solve this problem?

Kind regards

@Rick-v-E
Copy link
Member

Thanks for testing!

The fre22_task_mapping worlds needs dandelion models. These were not open-source and only distributed among the competitors of last years event. Therefore, you cannot build these. Probably this should be clarified in the readme somewhere.

The IndexError only happens sometimes if I am correct. Rerunning ros2 run virtual_maize_field generate_world fre21_task_1_fast should work.

Furthermore, there was an error in the ROS2 code for generating ros2 run virtual_maize_field generate_world fre21_task_3. That should be solved when #46 is merged.

@Rick-v-E Rick-v-E added bug Something isn't working documentation Improvements or additions to documentation labels May 15, 2023
@khaep
Copy link
Author

khaep commented May 15, 2023

Thanks for the information.
Are you planning to merge #46 in foreseeable future to solve the error from ros2 run virtual_maize_field generate_world fre21_task_3?

@Rick-v-E
Copy link
Member

I will merge it now, however, the IndexError still exists. If you encounter it, just rerun the generate_world script.

@khaep
Copy link
Author

khaep commented May 17, 2023

Thanks for merging.
After pulling the changes, the AssertionError: Cannot find model nettle! in fre21_task_3 was fixed as described above.

However, it would be nice to have a fix for the IndexError. But you are right, running multiple times works so far.

@Rick-v-E
Copy link
Member

Rick-v-E commented May 17, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants