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


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">
  <description>The my_controller package</description>

  <!-- One maintainer tag required, multiple allowed, one person per tag -->
  <!-- Example:  -->
  <!-- <maintainer email="">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 -->

  <!-- Url tags are optional, but multiple are allowed, one per tag -->
  <!-- Optional attribute type can be: website, bugtracker, or repository -->
  <!-- Example: -->
  <!-- <url type="website"></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</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> -->

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

Hope this helps,


Makes a lot of sense! thank you :slight_smile: