fix: make colcon build the new urdf package

This commit is contained in:
David Sharpe
2025-08-18 14:16:57 -05:00
committed by David
parent 6671f290e5
commit c0d39aa3a6
5 changed files with 43 additions and 29 deletions

View File

@@ -1,14 +0,0 @@
cmake_minimum_required(VERSION 2.8.3)
project(rover_urdf_pkg)
find_package(catkin REQUIRED)
catkin_package()
find_package(roslaunch)
foreach(dir config launch meshes urdf)
install(DIRECTORY ${dir}/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/${dir})
endforeach(dir)

View File

@@ -1,21 +1,17 @@
<package format="2">
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>rover_urdf_pkg</name>
<version>1.0.0</version>
<description>
<p>URDF Description package for Clucky's arm</p>
<p>This package contains configuration data, 3D models and launch files
for Clucky's arm</p>
</description>
<author>David Sharpe</author>
<maintainer email="ds0196@uah.edu" />
<description>This package contains configuration data, 3D models and launch files for Clucky's arm</description>
<maintainer email="ds0196@uah.edu">David Sharpe</maintainer>
<license>BSD</license>
<buildtool_depend>catkin</buildtool_depend>
<depend>roslaunch</depend>
<depend>rclpy</depend>
<depend>robot_state_publisher</depend>
<depend>rviz</depend>
<depend>joint_state_publisher_gui</depend>
<depend>gazebo</depend>
<depend>rviz2</depend>
<export>
<architecture_independent />
<build_type>ament_python</build_type>
</export>
</package>

View File

@@ -0,0 +1,4 @@
[develop]
script_dir=$base/lib/ik_pkg
[install]
install_scripts=$base/lib/ik_pkg

View File

@@ -0,0 +1,28 @@
from setuptools import find_packages, setup
import os
from glob import glob
package_name = 'rover_urdf_pkg'
list_of_folders = ["config", "launch", "meshes", "textures", "urdf"]
setup_data_files = [
('share/ament_index/resource_index/packages', ['resource/' + package_name]),
('share/' + package_name, ['package.xml'])
]
for folder in list_of_folders:
setup_data_files.append((os.path.join('share', package_name, folder), glob(folder + '/*')))
setup(
name=package_name,
version='1.0.0',
packages=find_packages(exclude=['test']),
data_files=setup_data_files, # created above with for loop
install_requires=['setuptools'],
zip_safe=True,
maintainer='David Sharpe',
maintainer_email='ds0196@uah.edu',
description='This package contains configuration data, 3D models and launch files for Clucky\'s arm',
license='BSD'
)