ament_index_python.packages.PackageNotFoundError:

asked 2021-03-01 20:47:19 -0500

mugetsu gravatar image

This is my first time trying to build my own package in ROS2. I copied a robot_description package(no source code, only urdf) from ROS1 and verbatim changed CMakeList.txt and package.xml to match a sample ROS2 package. I was able to build successfully.

However, with the new launcher, ament_index_python is not able to find this package that I built.

Here is my cmakelist.txt:

cmake_minimum_required(VERSION 3.10.2)
project(motiv_models)
find_package(ament_cmake REQUIRED)

ament_package()

install(DIRECTORY robot sim part stl DESTINATION share/${PROJECT_NAME})

package:

<package format="3">
<name>motiv_models</name>
<version>2.0.0</version>
<description>motiv models</description>
<author email="myemail@email.com">mugetsu</author>
<maintainer email="myemail@email.com">mugetsu</maintainer>
<license>BSD</license>

<buildtool_depend>ament_cmake</buildtool_depend>
<export>
<build_type>ament_cmake</build_type>
</export>
</package>

the I build:

colcon build --mixin debug --symlink-install --packages-select motiv_models

the errors seems to be from:

package_path = get_package_share_directory('motiv_models')

What am I doing wrong with my build? I can see all the other packages that I've built from source, just not this custom one I made myself.

edit retag flag offensive close merge delete