I have written my own global planner and have successfully registered the plugin so that move_base can detect it.
I am getting a problem where move_base will crash whenever I instantiate an instance of base_local_planner::CostmapModel.
I've removed all the code from my global planner so that it will run as a plugin that does nothing. This is what my initialize function looks like:
void FrontierPlanner::initialize(string name, Costmap2DROS* costmap_ros)
{
map = costmap_ros;
Costmap2D* costmap = map->getCostmap();
base_local_planner::CostmapModel model(*costmap); //The offending line
}
This will cause move_base to crash. If I comment out the third line then it will run no problem. It compiles in both cases as well.
The error move_base gives me is:
[FATAL] [1438809026.524028208]: Failed to create the bob/FrontierPlanner planner, are you sure it is properly registered and that the containing library is built? Exception: Failed to load library /home/viki/catkin_ws/devel/lib//libfrontier_planner_lib.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = /home/viki/catkin_ws/devel/lib//libfrontier_planner_lib.so: undefined symbol: _ZTVN18base_local_planner12CostmapModelE)
[move_base-5] process has died [pid 2554, exit code 1, cmd /opt/ros/indigo/lib/move_base/move_base __name:=move_base __log:=/home/viki/.ros/log/6207c02a-3bb6-11e5-8754-080027c434d6/move_base-5.log].
log file: /home/viki/.ros/log/6207c02a-3bb6-11e5-8754-080027c434d6/move_base-5*.log
Any ideas?
↧
move_base crashes with custom global planner whenever instantiating base_local_planner::CostmapModel
↧