Hi,
(os.path.join('share', package_name, 'launch'), glob('launch/*.launch.py')),
(os.path.join('share', package_name, 'config'), glob('config/*')),
The above is the recommended part of the setup.py, but for this, launching does nto work with the command
ros2 launch cartographer_slam cartographer.launch.py
So maybe this recommendation would be better:
(os.path.join('share', package_name), glob('launch/*.launch.py')),
(os.path.join('share', package_name, 'config'), glob('config/*'))
Thank you in advance
Péter
rtetete
December 27, 2023, 10:45am
2
Hi Peter,
there is something wrong in your system if you need to apply your modification to the setup.py
file and not use the provided line.
The correct addition to the setup.py
is the following:
(os.path.join('share', package_name, 'launch'), glob('launch/*.launch.py')),
(os.path.join('share', package_name, 'config'), glob('config/*')),
That line, indicates where in the install
folder the launch file will be installed. It should be installed in the /home/user/ros2_ws/install/cartographer_slam/share/cartographer_slam/launch
directory, as shown in the following image:
If you don’t install it in that directory, then the launch system will not be able to find it.
Please do the following:
Delete your install
and build
directories
Change your setup.py
to the one I mentioned above
Recompile
Now it should work.
Hi
Thanks, you are absolutely right. There is nothing wrong with the recommended setup.py.
Péter
system
Closed
January 1, 2024, 4:21pm
4
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.