Can't compile package.xml with catkin_make for Control course

Hallo,

I am doing the ROS control course and am about to create a controller.
In the torturial, I’m supposed to update the package.xml with the following, before doing a catkin_make:
<controller_interface plugin="${prefix}/controller_plugins.xml"/>
inside the tag.
I get an error and I’m confused about the low amount of pointers, regarding how to set up the package.xml.
I have uploaded an image of the error I receive when I use catkin_make. You can see where I’ve placed the snippet in my package.xml on the image.
Maybe the placement is completely wrong.

Kind regards,
Asger D. Larsen

Hello Asger,
from what I can see on the screenshot I can tell that the line:

<controller_interface plugin="${prefix}/controller_plugins.xml"/>

is not placed inside the
<export> </export> tags.

Please put that line after the <export> tag before the closing </export> tag.

Here is the complete package.xml file. Please compare your package.xml with this one.


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

  <!-- One maintainer tag required, multiple allowed, one person per tag -->
  <!-- Example:  -->
  <!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> -->
  <maintainer email="user@todo.todo">user</maintainer>


  <!-- One license tag required, multiple allowed, one license per tag -->
  <!-- Commonly used license strings: -->
  <!--   BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
  <license>TODO</license>


  <!-- Url tags are optional, but multiple are allowed, one per tag -->
  <!-- Optional attribute type can be: website, bugtracker, or repository -->
  <!-- Example: -->
  <!-- <url type="website">http://wiki.ros.org/my_controller</url> -->


  <!-- Author tags are optional, multiple are allowed, one per tag -->
  <!-- Authors do not have to be maintainers, but could be -->
  <!-- Example: -->
  <!-- <author email="jane.doe@example.com">Jane Doe</author> -->


  <!-- The *depend tags are used to specify dependencies -->
  <!-- Dependencies can be catkin packages or system dependencies -->
  <!-- Examples: -->
  <!-- Use depend as a shortcut for packages that are both build and exec dependencies -->
  <!--   <depend>roscpp</depend> -->
  <!--   Note that this is equivalent to the following: -->
  <!--   <build_depend>roscpp</build_depend> -->
  <!--   <exec_depend>roscpp</exec_depend> -->
  <!-- Use build_depend for packages you need at compile time: -->
  <!--   <build_depend>message_generation</build_depend> -->
  <!-- Use build_export_depend for packages you need in order to build against this package: -->
  <!--   <build_export_depend>message_generation</build_export_depend> -->
  <!-- Use buildtool_depend for build tool packages: -->
  <!--   <buildtool_depend>catkin</buildtool_depend> -->
  <!-- Use exec_depend for packages you need at runtime: -->
  <!--   <exec_depend>message_runtime</exec_depend> -->
  <!-- Use test_depend for packages you need only for testing: -->
  <!--   <test_depend>gtest</test_depend> -->
  <!-- Use doc_depend for packages you need only for building documentation: -->
  <!--   <doc_depend>doxygen</doc_depend> -->
  <buildtool_depend>catkin</buildtool_depend>
  <build_depend>controller_interface</build_depend>
  <build_depend>hardware_interface</build_depend>
  <build_depend>pluginlib</build_depend>
  <build_depend>roscpp</build_depend>
  <build_export_depend>controller_interface</build_export_depend>
  <build_export_depend>hardware_interface</build_export_depend>
  <build_export_depend>pluginlib</build_export_depend>
  <build_export_depend>roscpp</build_export_depend>
  <exec_depend>controller_interface</exec_depend>
  <exec_depend>hardware_interface</exec_depend>
  <exec_depend>pluginlib</exec_depend>
  <exec_depend>roscpp</exec_depend>


  <!-- The export tag contains other, unspecified, tags -->
  <export>
    <!-- Other tools can request additional information be placed here -->
    <controller_interface plugin="${prefix}/controller_plugins.xml"/>
  </export>
</package>

Hope this helps,

Roberto

Makes a lot of sense! thank you :slight_smile: