Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile problem related to sdf.hpp #9

Open
mohradza opened this issue Mar 27, 2019 · 0 comments
Open

compile problem related to sdf.hpp #9

mohradza opened this issue Mar 27, 2019 · 0 comments

Comments

@mohradza
Copy link

mohradza commented Mar 27, 2019

When trying to compile Btraj, I am getting the following compiler error:

In file included from /home/ohrad/catkin_ws/src/Btraj/third_party/sdf_tools/include/sdf_tools/collision_map.hpp:14:0,
from /home/ohrad/catkin_ws/src/Btraj/include/a_star.h:9,
from /home/ohrad/catkin_ws/src/Btraj/src/a_star.cpp:1:
/home/ohrad/catkin_ws/src/Btraj/third_party/sdf_tools/include/sdf_tools/sdf.hpp: In member function ‘double sdf_tools::SignedDistanceField::EstimateDistanceInternal(double, double, double, int64_t, int64_t, int64_t) const’:
/home/ohrad/catkin_ws/src/Btraj/third_party/sdf_tools/include/sdf_tools/sdf.hpp:435:89: error: operands to ?: have different types ‘const ScalarMultipleReturnType {aka const Eigen::CwiseUnaryOp<Eigen::internal::scalar_multiple_op, const Eigen::Matrix<double, 3, 1> >}’ and ‘const Vector3d {aka const Eigen::Matrix<double, 3, 1>}’
const Eigen::Vector3d direction_to_boundary = (nominal_sdf_distance >= 0.0) ? -gradient : gradient;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/ohrad/catkin_ws/src/Btraj/third_party/sdf_tools/include/sdf_tools/sdf.hpp:435:89: note: and each type can be converted to the other

I see that there is a TODO note related to gradient and I am wondering if that is related.

Removing the negative sign in front of gradient fixes this compile error, but this does not seem like the proper fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant