kiwicampus / Turtlebot-Gazebo-Navigator

Robotics engineer hiring project
Apache License 2.0
2 stars 6 forks source link

Error after run 'ros2 run low_level_pkg controller_interface_test' #2

Closed JuanCarlos-TiqueRangel closed 1 year ago

JuanCarlos-TiqueRangel commented 1 year ago

Hi,

I was working in section 1. However, I was struggle with this step, because after run ros2 run low_level_pkg controller_interface_test I got the next error:

Traceback (most recent call last):
  File "/workspace/rover/ros2/install/low_level_pkg/lib/low_level_pkg/controller_interface_test", line 33, in <module>
    sys.exit(load_entry_point('low-level-pkg==0.0.0', 'console_scripts', 'controller_interface_test')())
  File "/workspace/rover/ros2/install/low_level_pkg/lib/low_level_pkg/controller_interface_test", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'low_level_pkg.util'
[ros2run]: Process exited with failure 1

I was thinking it's for not building the package, however the directories build and install have the package.

image

image

Besides, I run the setup.py just to be sure that the packages was sourcing and installed. Also in the root (workspace/rover/ros2) I ran the commands source install/setup.bash and source install/local_setup.bash.

I thought the problem was for the Older ubuntu installation, so I decided to install ubuntu again on another newer laptop but I still have the same problem. I did small changes in the class controller_interface.py do you think that was the problem ? or it is something related with the pkg?

NicolasRochaPacheco commented 1 year ago

Hi,

We checked that situation and we could not reproduce your error. We even downloaded the code from your repo and then run it from scratch. We did so by executing the following steps:

$ colcon build --symlink-install --packages-up-to low_level_pkg
$ source install/setup.bash 
$ ros2 run low_level_pkg controller_interface_test

If you have any steps on how to reproduce the error, we will be glad to take a look at them. Nonetheless, we invite you to check the process you are following to build your packages and setup your ROS2 development environment.

pepisg commented 1 year ago

image Hi! I just checked the changes you mention and you seem to have run colcon build on /workspace/rover/ros2/src/low_level_pkg. This probably ruined your workspace setup.

Please, if you open an issue you think it may be related to the original repo try to reproduce it on the original repo beforehand (not in your fork), an provide a clear sequence of steps that must be followed to reproduce it.

Feel free to reopen if you experience the same problem on a fresh clone - fresh container build of the original repo