[Development] ROS 2 Ament python packages - cpslabor-education/robotwiki GitHub Wiki
ROS 2 Ament python packages
Setup configuration (setup.py file)
This section describes how can you tinker the setup.py file for your needs.
Installing launch scripts
You can achieve it pretty easily, by adding the setup directive the following parameter (the following will install all files that ends with "*.launch.py" to the share folder):
setup(
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
('share/' + package_name, ['package.xml']),
(
os.path.join('share', package_name, 'launch'),
glob(os.path.join('launch', '*.launch.py')))
],
)