rst-tu-dortmund / teb_local_planner

An optimal trajectory planner considering distinctive topologies for mobile robots based on Timed-Elastic-Bands (ROS Package)
http://wiki.ros.org/teb_local_planner
BSD 3-Clause "New" or "Revised" License
1.06k stars 550 forks source link

Error when compiling TEB Local Planner with ROS2 Galactic on Ubuntu 20.04 #416

Closed mingliangshi4 closed 1 year ago

mingliangshi4 commented 1 year ago

I am currently using Ubuntu 20.04 and have installed the Galactic version of ROS2 using the command sudo apt install ros-galactic-desktop. The navigation2 version I am using is 1.0.12

I encountered an error when trying to compile the ros2-master version of TEB. Here is the error message I received:

In file included from /home/yahboom/my_ws/src/teb_local_planner/teb_local_planner/src/teb_local_planner_ros.cpp:39:
/home/yahboom/my_ws/src/teb_local_planner/teb_local_planner/include/teb_local_planner/teb_local_planner_ros.h: At global scope:
/home/yahboom/my_ws/src/teb_local_planner/teb_local_planner/include/teb_local_planner/teb_local_planner_ros.h:111:8: error: ‘void teb_local_planner::TebLocalPlannerROS::configure(const WeakPtr&, std::string, std::shared_ptr<tf2_ros::Buffer>, std::shared_ptr<nav2_costmap_2d::Costmap2DROS>)’ marked ‘override’, but does not override
  111 |   void configure(
      |        ^~~~~~~~~
In file included from /opt/ros/galactic/include/class_loader/class_loader_core.hpp:57,
                 from /opt/ros/galactic/include/class_loader/class_loader.hpp:55,
                 from /opt/ros/galactic/include/class_loader/multi_library_class_loader.hpp:52,
                 from /opt/ros/galactic/include/pluginlib/class_loader.hpp:54,
                 from /home/yahboom/my_ws/src/teb_local_planner/teb_local_planner/include/teb_local_planner/teb_local_planner_ros.h:42,
                 from /home/yahboom/my_ws/src/teb_local_planner/teb_local_planner/src/teb_local_planner_ros.cpp:39:
/opt/ros/galactic/include/class_loader/meta_object.hpp: In instantiation of ‘B* class_loader::impl::MetaObject<C, B>::create() const [with C = teb_local_planner::TebLocalPlannerROS; B = nav2_core::Controller]’:
/opt/ros/galactic/include/class_loader/meta_object.hpp:216:7:   required from here
/opt/ros/galactic/include/class_loader/meta_object.hpp:218:12: error: invalid new-expression of abstract class type ‘teb_local_planner::TebLocalPlannerROS’
  218 |     return new C;
      |            ^~~~~

Any help or guidance on how to resolve this issue would be greatly appreciated. Thank you!

mingliangshi4 commented 1 year ago

glactice version teb_local_planner

https://github.com/Tractonomy/teb_local_planner/tree/318372bb7747ee03bac095245a69f405c5dfe018