I have just made a change in the setup.py file and provide the directories for launch and config files. I am not sure whats wrong with the setup.py file or may be the error is coming from somewhere esle. I have provided my setup.py file for your reference.
from setuptools import setup
import os
package_name = 'cartographer_slam'
from glob import glob
from setuptools import setup
import os
package_name = ‘cartographer_slam’
from glob import glob
setup(
name=package_name,
version=‘0.0.0’,
packages=[package_name],
data_files=[
(‘share/ament_index/resource_index/packages’,
[‘resource/’ + package_name]),
(‘share/’ + package_name, [‘package.xml’]),
(os.path.join(‘share’, package_name, ‘launch’), glob(‘launch/.launch.py’)),
(os.path.join(‘share’, package_name, ‘config’), glob('config/’)),
],
install_requires=['setuptools'],
zip_safe=True,
maintainer='user',
maintainer_email='user@todo.todo',
description='TODO: Package description',
license='TODO: License declaration',
tests_require=['pytest'],
entry_points={
'console_scripts': [
],
},
)
user:~/ros2_ws$ colcon build --packages-select cartographer_slam
Starting >>> cartographer_slam
--- stderr: cartographer_slam
/usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
---
Finished <<< cartographer_slam [1.51s]
Summary: 1 package finished [2.79s]
1 package had stderr output: cartographer_slam