ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
4

Local planner creation

asked 2013-04-23 03:57:40 -0600

camilla gravatar image

updated 2013-04-23 06:04:35 -0600

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.

edit retag flag offensive close merge delete

Comments

Have you released the planner somewhere? That would be awesome.

Hendrik Wiese gravatar image Hendrik Wiese  ( 2013-11-01 08:47:43 -0600 )edit

I am also interested.

sustainable gravatar image sustainable  ( 2018-04-17 08:40:04 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2013-04-29 21:43:30 -0600

Alexandr Buyval gravatar image

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

edit flag offensive delete link more

Comments

And you have to export this XML file in the package.xml:

<export>
    <nav_core plugin="${prefix}/blp_plugin.xml" />
</export>
Felix Widmaier gravatar image Felix Widmaier  ( 2016-12-16 04:11:45 -0600 )edit

Question Tools

Stats

Asked: 2013-04-23 03:57:40 -0600

Seen: 2,069 times

Last updated: Apr 29 '13