Local planner creation
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.
Have you released the planner somewhere? That would be awesome.
I am also interested.