GridMap on a Gazebo Plugin
Hi,
I would like to use the GridMap package in the AutonomousActorPlugin to improve obstacle avoidance. This is the simple code I add to the AutoActorPlugin::Load(physics::ModelPtr _model, sdf::ElementPtr _sdf)
method:
ros::NodeHandle nh("~");
ros::Publisher publisher = nh.advertise<grid_map_msgs::GridMap>("grid_map", 1, true);
GridMap obs_map({"obstacles"});
obs_map.setFrameId("map");
obs_map.setGeometry(Length(2.0, 2.0), 0.1, Position(init_pose[0], init_pose[1]));
The building is ok, but in run time it gives me this error:
gzserver: symbol lookup error: /home/alberto/ros/tiago_public_ws/devel/lib/libAutonomousActorPluginDebug.so: undefined symbol: _ZN8grid_map7GridMapC1ERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE
================================================================================REQUIRED process [gazebo-2] has died!
process has died [pid 22593, exit code 127, cmd /home/alberto/ros/tiago_public_ws/src/gazebo_ros_pkgs/gazebo_ros/scripts/gzserver --verbose -e ode worlds/simple_office_with_people_motion2.world __name:=gazebo __log:=/home/alberto/.ros/log/206b8d22-93da-11eb-800e-d8cb8abf4555/gazebo-2.log].
log file: /home/alberto/.ros/log/206b8d22-93da-11eb-800e-d8cb8abf4555/gazebo-2*.log
Initiating shutdown!
================================================================================
Can someone suggest me a solution? Thank you in advance.
seems like the loader is having problems finding a gridmap binary symbol. This usually comes from incompatible changes done to the libraries used by the plugin without recompiling the plugin. Could you please remove build/ install/ spaces in catkin and rebuild the whole thing again to see if that helps?