0
$\begingroup$

Rosanswers logo

Hi, I developed a local planner which implements the vfh algorithm and substituted it in the navigation stack. But I get this error:

[FATAL] [1366724467.565835509, 463.545000000]: Failed to create the vfh_local_planner/VFHPlannerROS planner, are you sure it is properly registered and that the containing library is built? Exception: According to the loaded plugin descriptions the class vfh_local_planner/VFHPlannerROS with base class type nav_core::BaseLocalPlanner does not exist. Declared types are base_local_planner/TrajectoryPlannerROS dwa_local_planner/DWAPlannerROS pr2_navigation_controllers/PoseFollower

I changed the navigation.launch this way:

<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
...
        <param name="base_local_planner" type="string" value="vfh_local_planner/VFHPlannerROS" />
...
</node>

I also changed properly the parametrs in the base_local_planner_params.yaml. And at the beginning of my code I added:

//register this planner as a BaseLocalPlanner plugin 
PLUGINLIB_DECLARE_CLASS(vfh_local_planner, VFHPlannerROS, vfh_local_planner::VFHPlannerROS, nav_core::BaseLocalPlanner)

My CMakeLists.txt is the following:

cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)

# Set the build type.  Options are:
#  Coverage       : w/ debug symbols, w/o optimization, w/ code-coverage
#  Debug          : w/ debug symbols, w/o optimization
#  Release        : w/o debug symbols, w/ optimization
#  RelWithDebInfo : w/ debug symbols, w/ optimization
#  MinSizeRel     : w/o debug symbols, w/ optimization, stripped binaries
#set(ROS_BUILD_TYPE RelWithDebInfo)

rosbuild_init()

#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

#uncomment if you have defined messages
#rosbuild_genmsg()
#uncomment if you have defined services
#rosbuild_gensrv()

rosbuild_find_ros_package(dynamic_reconfigure)
include(${dynamic_reconfigure_PACKAGE_PATH}/cmake/cfgbuild.cmake)
gencfg()


#common commands for building c++ executables and libraries
#rosbuild_add_library(${PROJECT_NAME} src/example.cpp)
rosbuild_add_library(vfh_local_planner src/vfh_planner_ros.cpp src/vfh_algorithm.cc)
#target_link_libraries(${PROJECT_NAME} another_library)
#rosbuild_add_boost_directories()
#rosbuild_link_boost(${PROJECT_NAME} thread)
#rosbuild_add_executable(example examples/example.cpp)
#rosbuild_add_executable(vfh_local_planner src/vfh_planner_ros.cpp src/vfh_algorithm.cc)
#target_link_libraries(example ${PROJECT_NAME})

Can you help me to solve the error? Thank you in advance.


Originally posted by camilla on ROS Answers with karma: 255 on 2013-04-23

Post score: 4


Original comments

Comment by Hendrik Wiese on 2013-11-01:
Have you released the planner somewhere? That would be awesome.

Comment by sustainable on 2018-04-17:
I am also interested.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Hi,

It seems, you need create 'blp_plugin.xml' file like this:

<library path="lib/libbase_local_planner">
  <class name="vfh_local_planner/VFHPlannerROS" type="vfh_local_planner::VFHPlannerROS" base_class_type="nav_core::BaseLocalPlanner">
    <description>
      ...       </description>
  </class>
</library>

Best Regards, Alex


Originally posted by Alexandr Buyval with karma: 641 on 2013-04-29

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by Felix Widmaier on 2016-12-16:
And you have to export this XML file in the package.xml:

<export>
    <nav_core plugin="${prefix}/blp_plugin.xml" />
</export>
$\endgroup$

Your Answer

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