Ask Your Question
1

add potential field method as a global planner plug-in

asked 2017-05-23 18:56:54 -0600

avicenna gravatar image

updated 2017-05-24 06:03:27 -0600

gvdhoorn gravatar image

hello, i tried to add this package. catkin_make works fine, there is no error. also source devel/setup.bash works fine.but when i change my base_global_planner in move_base.launch file, i have error message which is given below,

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

[move_base-1] process has died [pid 24627, exit code 1, cmd /opt/ros/indigo/lib/move_base/move_base __name:=move_base __log:=/home/hg/.ros/log/c3bbb38c-4008-11e7-9800-ac2b6ed5e4b3/move_base-1.log]. log**

i use this link

https://github.com/gonzalesMK/Potenti...


Edit: yes, i have no error while compiling. After compiling, i source my ws and it is okey. here it is mt cmake.txt file.

cmake_minimum_required(VERSION 2.8.3)
project(potential_field)

find_package(catkin REQUIRED COMPONENTS   
  nav_core 
  costmap_2d  
  geometry_msgs  
  move_base   
  nav_msgs  
  roscpp   
  sensor_msgs   
  std_msgs   
  tf )

catkin_package(CATKIN_DEPENDS nav_core costmap_2d geometry_msgs move_base nav_msgs roscpp sensor_msgs std_msgs tf )

include_directories( ${catkin_INCLUDE_DIRS} )

add_library( potential_field_lib src/potentialField_ROS.cpp)
edit retag flag offensive close merge delete

Comments

Ah there may be several issues for that. But at the first look it seem to be everything ok.

Try to source your workspace again after compiling.

chwimmer gravatar imagechwimmer ( 2017-05-24 02:49:31 -0600 )edit

there is no problem during catkin_make or sourcing. The problem occurs when i am trying to start move_base. also when i chose default planner ( navfn global planner or global planner) there is no problem,it works fine. but when i chose base_global_planner as a potential field, it wont work

avicenna gravatar imageavicenna ( 2017-05-24 03:10:32 -0600 )edit

and the lib exists in the answer described folder?

chwimmer gravatar imagechwimmer ( 2017-05-24 06:57:06 -0600 )edit

yes i have libglobal_planner.so file under catkin_ws/devel/lib destination

avicenna gravatar imageavicenna ( 2017-05-24 07:00:33 -0600 )edit

no what we are searching for is the libpotential_field_lib

chwimmer gravatar imagechwimmer ( 2017-05-24 07:08:09 -0600 )edit

sorry, i mixed files. but i have libpotential_field_lib file too .

avicenna gravatar imageavicenna ( 2017-05-24 07:43:36 -0600 )edit

what I really would recommend is that you add

 target_link_libraries(potential_field_lib
   ${catkin_LIBRARIES}
 )

to your CMakeLists.txt

chwimmer gravatar imagechwimmer ( 2017-05-24 07:57:48 -0600 )edit

i tried what u recommended but i got same error.

avicenna gravatar imageavicenna ( 2017-05-24 08:07:14 -0600 )edit

2 Answers

Sort by » oldest newest most voted
1

answered 2017-05-24 03:30:28 -0600

ok I have to write more than a comment:

Ok that just means, that move_base cant find the plugin. What makes me a little bit nervous is, that target_link_libraries is missing in CMakeLists.txt. Its really compiling without any link errors?

Please check if the corresponding library libpotential_field_lib really exists in /your_workspace/devel/lib/

When it exists source your workspace again with source your_workspace/devel/setup.bash

edit flag offensive delete link more
0

answered 2017-05-24 11:04:09 -0600

Procópio gravatar image

did you created your plugin? as detailed here: http://wiki.ros.org/navigation/Tutori...

edit flag offensive delete link more

Comments

yes, i think i create properly with this lines in package.xml file:

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

avicenna gravatar imageavicenna ( 2017-05-24 13:00:06 -0600 )edit

Hi, were you able to add the plug-in successfully? @avicenna

jesus gravatar imagejesus ( 2019-03-04 20:35:53 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-05-23 18:56:54 -0600

Seen: 373 times

Last updated: May 24 '17