Ask Your Question

GoalChecker plugin loading in nav2 Controller plugin

asked 2020-07-15 06:09:59 -0600

SmallJoeMan gravatar image

updated 2020-07-15 06:41:57 -0600

I'm writing a controller plugin for the nav2 stack. The controller loads fine, and the robot moves as I expect.

However, I am now trying to load a GoalChecker plugin into my Controller plugin, but its failing to find the plugin:

Failed to create controller. Exception: According to the loaded plugin descriptions the class cc_nav::SimpleGoalChecker with base class type nav2_core::GoalChecker does not exist. Declared types are

Note: empty list of declared types.

In my plugin XML the SimpleGoalChecker plugin is listed in the same library as my Controller plugin (which then gets exported in CMakeLists with pluginlib_export_plugin_description_file(nav2_core nav2_plugin.xml))

Does the SimpleGoalChecker plugin need to be defined in a different package as the controller plugin?

Incidentally I get a similar error if I try the dwb_plugins::SimpleGoalChecker plugin. Makes me wonder about the empty declared types list

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-07-15 07:22:19 -0600

SmallJoeMan gravatar image

Solved it.

So it is absolutely fine to have a flat plugin structure (as I did for this simple test). My issue was that my controller had the line: goal_check_loader_("cc_nav", "nav2_core::GoalChecker") when it should be goal_check_loader_("nav2_core", "nav2_core::GoalChecker").

I was taking inspiration from the dbw controller plugin in which the SimpleGoalChecker is loaded from dwb_core, so I thought I needed my package in the first argument. The dwb goal_checker_loader instantiation works because the SimpleGoalChecker in dwb_plugins is exported into dwb_core from a separate package: pluginlib_export_plugin_description_file(dwb_core plugins.xml). In my case all my plugins are exported into nav2_core.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2020-07-15 06:09:59 -0600

Seen: 80 times

Last updated: Jul 15 '20