FLT_MAX not declared
After installing libnlopt(-dev)
from Trusty on Precise, I've been able to get all pkgs in this repository to compile on a Hydro installation, and the plugin seems to work correctly.
I did run into issues with the FLT_MAX
symbol not being defined. This appears to be used in trac_ik_lib/src/kdl_tl.cpp
and trac_ik_lib/src/trac_ik.cpp
. Including cmath
fixes this (same for trac_ik.cpp
):
diff --git a/trac_ik_lib/src/kdl_tl.cpp b/trac_ik_lib/src/kdl_tl.cpp
index 6df087f..4dc6d89 100644
--- a/trac_ik_lib/src/kdl_tl.cpp
+++ b/trac_ik_lib/src/kdl_tl.cpp
@@ -31,6 +31,8 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
#include <trac_ik/kdl_tl.hpp>
#include <boost/date_time.hpp>
#include <ros/ros.h>
+#include <cfloat>
+
namespace KDL
{
I'm curious though: wouldn't numeric_limits<float>::max()
from limits
have been more appropriate?
Comments (5)
-
-
Account Deactivated - marked as trivial
-
Account Deactivated - changed status to resolved
Added with commit ab1cb3f. Thank you for your report of this and the easy fix.
-
Account Deactivated FLT_MAX and std::numeric_limits<float>::max() are equivalent numbers.
-
FLT_MAX and std::numeric_limits<float>::max() are equivalent numbers
Sure.
std::numeric_limits<float>::max()
is proper C++ though. - Log in to comment
This was me, forgot to log in.