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
984 stars 545 forks source link

undefined reference to `int boost::math::sign<double>(double const&)' #410

Open muellerbernd opened 1 year ago

muellerbernd commented 1 year ago

Hello, on archlinux and NixOS we get an error while compiling: undefined reference to int boost::math::sign<double>(double const&). The reason is that in newer boost versions you need to include a new header. We have fixed that with the following patch:

diff --color -Naur teb_local_planner-release-release-noetic-teb_local_planner/include/teb_local_planner/h_signature.h teb_local_planner-release-release-noetic-teb_local_planner_new/include/teb_local_planner/h_signature.h
--- A/include/teb_local_planner/h_signature.h   2020-05-29 18:12:46.000000000 +0200
+++ B/include/teb_local_planner/h_signature.h   2023-01-20 19:56:56.259209108 +0100
@@ -51,6 +51,7 @@
 #include <functional>
 #include <vector>
 #include <iterator>
+#include <boost/math/special_functions/sign.hpp>

 namespace teb_local_planner

see also this issue in the nix-ros-overlay repo.

loco-choco commented 1 year ago

Created this fix so I could use it in my projects.