ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It looks like your package.xml is from ROS1 (only ROS1 dependencies in it and specifying catkin as a buildtool dependency). So my guess is that colcon is trying to build your package as a catkin package and not an ament package.

Fixing your package.xml may be sufficient to fix your issue. Something similar to:

<?xml version="1.0"?>
<package format="2">
  <name>obstacle_publisher</name>
  <version>0.0.0</version>
  <description>The obstacle_publisher package</description>

  <maintainer email="paul">Paul</maintainer>
  <license>TODO</license>
  <!-- <author email="paul">Paul</author> -->

  <buildtool_depend>ament_cmake</buildtool_depend>
  <depend>rclcpp</depend>
  <depend>std_msgs</depend>
  <depend>obstacle_msgs</depend>

  <!-- The export tag contains other, unspecified, tags -->
  <export>
    <!-- Other tools can request additional information be placed here -->
    <build_type>ament_cmake</build_type>
  </export>
</package>