Open marcoarruda opened 6 years ago
I believe this error is due to the costmap_2d package being converted to use tf2 instead of tf. This happened ~5 months ago (https://github.com/ros-planning/navigation/tree/melodic-devel/costmap_2d).
If I roll back the navigation package to before the "costmap_2d using tf2" conversion, then I can get this package to compile. Inside of my catkin_ws/src:
git clone https://github.com/ros-planning/navigation cd navigation git reset --hard 8665d81a20a1ecd45811ac6195a9c0d1a472080b
If anyone updates frontier_exploration to support melodic and rely on tf2 instead of tf, I'd be interested in knowing.
Hello,
I'm trying to compile it with ROS melodic, I'm using the
melodic-devel
branch. But I'm getting the following error:[ 98%] Building CXX object all_lib/frontier_exploration/CMakeFiles/explore_server.dir/src/explore_server.cpp.o /home/simulations/lib_ws/src/all_lib/frontier_exploration/src/explore_server.cpp: In constructor ‘frontier_exploration::FrontierExplorationServer::FrontierExplorationServer(std::__cxx11::string)’: /home/simulations/lib_ws/src/all_lib/frontier_exploration/src/explore_server.cpp:46:136: error: no matching function for call to ‘costmap_2d::Costmap2DROS::Costmap2DROS(const char [16], tf::TransformListener&)’ explore_costmap_ros_ = boost::shared_ptr<costmap_2d::Costmap2DROS>(new costmap_2d::Costmap2DROS("explore_costmap", tf_listener_)); ^ In file included from /home/simulations/lib_ws/src/all_lib/frontier_exploration/src/explore_server.cpp:4:0: /opt/ros/melodic/include/costmap_2d/costmap_2d_ros.h:82:3: note: candidate: costmap_2d::Costmap2DROS::Costmap2DROS(const string&, tf2_ros::Buffer&) Costmap2DROS(const std::string &name, tf2_ros::Buffer& tf); ^~~~~~~~~~~~ /opt/ros/melodic/include/costmap_2d/costmap_2d_ros.h:82:3: note: no known conversion for argument 2 from ‘tf::TransformListener’ to ‘tf2_ros::Buffer&’ /home/simulations/lib_ws/src/all_lib/frontier_exploration/src/explore_server.cpp: In member function ‘void frontier_exploration::FrontierExplorationServer::executeCb(const ExploreTaskGoalConstPtr&)’: /home/simulations/lib_ws/src/all_lib/frontier_exploration/src/explore_server.cpp:116:58: error: no matching function for call to ‘costmap_2d::Costmap2DROS::getRobotPose(tf::Stamped<tf::Transform>&)’ explore_costmap_ros_->getRobotPose(robot_pose); ^ In file included from /home/simulations/lib_ws/src/all_lib/frontier_exploration/src/explore_server.cpp:4:0: /opt/ros/melodic/include/costmap_2d/costmap_2d_ros.h:125:8: note: candidate: bool costmap_2d::Costmap2DROS::getRobotPose(geometry_msgs::PoseStamped&) const bool getRobotPose(geometry_msgs::PoseStamped& global_pose) const; ^~~~~~~~~~~~ /opt/ros/melodic/include/costmap_2d/costmap_2d_ros.h:125:8: note: no known conversion for argument 1 from ‘tf::Stamped<tf::Transform>’ to ‘geometry_msgs::PoseStamped& {aka geometry_msgs::PoseStamped_<std::allocator<void> >&}’ all_lib/frontier_exploration/CMakeFiles/explore_server.dir/build.make:62: recipe for target 'all_lib/frontier_exploration/CMakeFiles/explore_server.dir/src/explore_server.cpp.o' failed make[2]: *** [all_lib/frontier_exploration/CMakeFiles/explore_server.dir/src/explore_server.cpp.o] Error 1 CMakeFiles/Makefile2:15069: recipe for target 'all_lib/frontier_exploration/CMakeFiles/explore_server.dir/all' failed make[1]: *** [all_lib/frontier_exploration/CMakeFiles/explore_server.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j1" failed
Is it missing a dependency?
Thanks!