amock / rmcl_example

RMCL Examples
https://github.com/uos/rmcl
BSD 3-Clause "New" or "Revised" License
4 stars 0 forks source link

example fails to launch #1

Open iliabaranov opened 2 months ago

iliabaranov commented 2 months ago

Running the robot launch example fails with:

ros2 launch rmcl_example start_robot_launch.py 
[INFO] [launch]: All log files can be found below /home/iliabara/.ros/log/2024-07-07-14-12-59-307095-Brigid-Framework16-90676
[INFO] [launch]: Default logging verbosity is set to INFO
[ERROR] [launch]: Caught exception in launch (see debug for traceback): Caught multiple exceptions when trying to load file of format [py]:
 - ModuleNotFoundError: No module named 'scripts'
 - InvalidFrontendLaunchFileError: The launch file may have a syntax error, or its format is unknown

This seems to be related to: https://github.com/aock/rmcl_example/blob/main/launch/start_robot_launch.py#L8

amock commented 2 months ago

Interesting problem. I have tested it on several computers without having this problem. Just now I updated my ROS-humble and it still works. So I am not able to reproduce the problem. However, I have two guesses that might fix your problem:

  1. Maybe something is wrong with your Gazebo installation: https://robotics.stackexchange.com/questions/103799/importerror-cannot-import-name-gazeborospaths-from-scripts

  2. Or maybe you have another "scripts" package somewhere that hides Gazebo's scripts package: https://github.com/ros-simulation/gazebo_ros_pkgs/issues/1050#issuecomment-651126179

Let me know if one of these solves your issue. Nevertheless, I don't like that there is a package-include called "scripts" in my python script anyways. So in the meantime I will try to find a workaround to avoid that.

amock commented 2 months ago

I think I have found a workaround. It is on the "avoid-gazebo-scripts" branch. You may try this solution first before you change anything on your system.

amock commented 1 month ago

@iliabaranov have you tried it?