0
$\begingroup$

Rosanswers logo

Hi, I am following this tutorial http://wiki.ros.org/navigation/Tutorials/Writing%20A%20Global%20Path%20Planner%20As%20Plugin%20in%20ROS and write a global planner plugin. my package is robocars, my class name is robocars::PathFollowingGlobalPlanner. Here is my package.xml:

<export>
    <!-- Other tools can request additional information be placed here -->
    <!-- <nav_core plugin="${prefix}/path_following_global_planner_plugin.xml" /
>-->
    <nav_core plugin="${prefix}/path_following_global_planner_plugin.xml" />
  </export>

And here is my path_following_global_planner_plugin.xml

<library path="lib/libpath_following_global_planner_lib">
  <class name="robocars/PathFollowingGlobalPlanner" type="robocars::PathFollowin
gGlobalPlanner" base_class_type="nav_core::BaseGlobalPlanner">
    <description>This is a global planner plugin by robocars project.</descripti
on>
  </class>
 </library>

PathFollowingGlobalPlanner class compiled fine. "rospack find robocars" can find my package. But when I run "rospack plugins --attrib=plugin nav_core", the plugin did not show up.

Why


Originally posted by AutoCar on ROS Answers with karma: 102 on 2018-07-28

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

In your package.xml -- do you have the dependency on nav_core? In order to be picked up by rospack, your package must depend directly on nav_core, the package which defines the plugin type.


Originally posted by fergs with karma: 13902 on 2018-07-28

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by AutoCar on 2018-07-28:
Yeah, you are right. I had only <build_depend>, not . After I add that, rospack picked it up.

Thank you very much.

Comment by gvdhoorn on 2018-07-29:
And just for completeness: see the pluginlib wiki page where this is documented (from #q163476).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.