Robotics StackExchange | Archived questions

Failed to create local planner.

Hi, I have created my own customized local planner. When I compile it, there were no errors. But when I try to run my robot using the local planner, it showed the following error image description

I have checked move_base.xml file, there is no error. I cross-checked using the command

rospack plugins −−attrib=plugin nav_core

This shows that navcore exported the new created shiftylocal_planner. But when I roslaunch it, it throws this error. Could you tell me exactly where is the problem?

Thank You.

Asked by malgudi on 2018-06-04 03:49:27 UTC

Comments

Please don't use an image to display text. Images are not searchable and people cannot copy and paste the text from the image. Please update your question with a copy and paste of the error instead (using the 101010 button to enable formatting).

Asked by jayess on 2018-07-16 08:23:56 UTC

Answers

The solution is right in the error message:

"[...] the class shifty_local_planner/ShiftyPlannerROS [...] does not exist."

"Declared types are ShiftyPlannerROS ..."

So it's looking for shifty_local_planner/ShiftyPlannerROS, but all it could find was ShiftyPlannerROS (without the namespace).

Asked by Martin Günther on 2018-07-16 08:20:46 UTC

Comments

As Martin has pointed out the problem is displayed in the error message. The fix would be to edit your blp_plugin.xml file properly. It should contain the following:

<library path="lib/libshifty_local_planner">
  <class name="shifty_local_planner/ShiftyPlannerROS" type="shifty_local_planner::ShiftyPlannerROS" base_class_type="nav_core::BaseLocalPlanner">
    <description>
      A implementation of a ShiftyPlannerROS local planner.
    </description>
  </class>
</library>

You should use the shifty_local_planner as a namespace and ShiftyPlannerROS as the name of the class in your source files.

Also, do a clean build afterwards.

Asked by pavel92 on 2018-07-17 01:42:06 UTC

Comments