0
$\begingroup$

Rosanswers logo

hi everyone, I try to do this tutorial :http://wiki.ros.org/navigation/Tutorials/Writing%20A%20Global%20Path%20Planner%20As%20Plugin%20in%20ROS

But as i work on groovy i can't use catkin_make with the costmap_2d. So i have tried this tutorial with rosmake.

My probleme is: I can't load my plugin.

CMakeLists.txt

cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
rosbuild_init()
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
rosbuild_add_library(${PROJECT_NAME} src/global_planner.cpp)

manifest.xml

<package>
  <description brief="set_path_plug">

     set_path_plug

  </description>
  <author>Guillaume</author>
  <license>BSD</license>
  <review status="unreviewed" notes=""/>
  <depend package="message_generation"/>
  <depend package="roscpp"/>
  <depend package="rospy"/>
  <depend package="std_msgs"/>
  <depend package="tf"/>
  <depend package="costmap_2d"/>
  <depend package="nav_core"/>
  <depend package="geometry_msgs"/>
  <depend package="angles"/>
  <depend package="base_local_planner"/>
  <export>
    <nav_core plugin="${prefix}/global_planner_plugin.xml" />
  </export>

</package>

global_planner_plugin.xml (I have tried library path= with the full path)

 <library path="lib">
  <class name="global_planner/GlobalPlanner" type="global_planner::GlobalPlanner" base_class_type="nav_core::BaseGlobalPlanner">
    <description>This is a global planner plugin.</description>
  </class>
 </library>

And my .cpp and .h are the same than in the tutorial.

when i launch a move_base with this globalplanner i have this error:

[FATAL] [1406644445.324290214, 939.388000000]: Failed to create the global_planner/GlobalPlanner planner, are you sure it is properly registered and that the containing library is built? Exception: According to the loaded plugin descriptions the class global_planner/GlobalPlanner with base class type nav_core::BaseGlobalPlanner does not exist. Declared types are  carrot_planner/CarrotPlanner navfn/NavfnROS pr2_navigation_controllers/GoalPasser

I think the problem come from my manifest.xml, the export is not correct. Is it possible the make a plugin with rosmake? (when I rosmake everything going well) If someone have an idea?

thanks


Originally posted by GuillaumeB on ROS Answers with karma: 312 on 2014-07-29

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

manifest.xml

<package>
  <description brief="set_path_plug">
     set_path_plug
  </description>
  <author>Guillaume</author>
  <license>BSD</license>
  <review status="unreviewed" notes=""/>
  <url>http://ros.org/wiki/set_path_plug</url>
  <depend package="message_generation"/>
  <depend package="roscpp"/>
  <depend package="rospy"/>
  <depend package="std_msgs"/>
  <depend package="tf"/>
  <depend package="costmap_2d"/>
  <depend package="nav_core"/>
  <depend package="geometry_msgs"/>
  <depend package="angles"/>
  <depend package="base_local_planner"/>
  <depend package="pluginlib"/>

  <export>
    <nav_core plugin="${prefix}/global_planner_plugin.xml" />
  </export>

</package>

global_planner_plugin.xml

 <library path="lib/libset_path_plug">
 <!-- <class name="global_planner/GlobalPlanner" type="global_planner::GlobalPlanner" base_class_type="nav_core::BaseGlobalPlanner">-->
<class name="global_planner/GlobalPlanner" type="global_planner::GlobalPlanner" base_class_type="nav_core::BaseGlobalPlanner">
    <description>This is a global planner plugin.</description>
  </class>
 </library>

and PLUGINLIB_DECLARE_CLASS(set_path_plug, global_planner_plugin, global_planner::GlobalPlanner, nav_core::BaseGlobalPlanner) at the begining of the .cpp file.

I was not able to see the output because i forgot the argument output="screen" for my move_base_node in my launchfile


Originally posted by GuillaumeB with karma: 312 on 2014-07-31

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.