borglab / gpmp2

Gaussian Process Motion Planner 2
Other
38 stars 10 forks source link

Compilation Error #10

Closed MF-Ahmed closed 1 year ago

MF-Ahmed commented 1 year ago

I am getting the following error during make check on Ubunto 20.04, cmake >3, Boost 1.7

make check
Scanning dependencies of target gpmp2 [ 1%] Building CXX object gpmp2/CMakeFiles/gpmp2.dir/gp/GPutils.cpp.o [ 2%] Building CXX object gpmp2/CMakeFiles/gpmp2.dir/kinematics/Arm.cpp.o In file included from /home/user/data/git/gpmp2/gpmp2/kinematics/ForwardKinematics.h:83, from /home/user/data/git/gpmp2/gpmp2/kinematics/Arm.h:10, from /home/user/data/git/gpmp2/gpmp2/kinematics/Arm.cpp:8: /home/user/data/git/gpmp2/gpmp2/kinematics/ForwardKinematics-inl.h: In member function ‘gtsam::Matrix gpmp2::ForwardKinematics<POSE, VELOCITY>::forwardKinematicsPose(const Pose&) const’: /home/user/data/git/gpmp2/gpmp2/kinematics/ForwardKinematics-inl.h:25:30: error: ‘const Point3’ {aka ‘const class Eigen::Matrix<double, 3, 1>’} has no member named ‘vector’ 25 | jpx[i].translation().vector()).finished(); | ^~ /home/user/data/git/gpmp2/gpmp2/kinematics/ForwardKinematics-inl.h: In member function ‘gtsam::Matrix gpmp2::ForwardKinematics<POSE, VELOCITY>::forwardKinematicsPosition(const Pose&) const’: /home/user/data/git/gpmp2/gpmp2/kinematics/ForwardKinematics-inl.h:39:43: error: ‘const Point3’ {aka ‘const class Eigen::Matrix<double, 3, 1>’} has no member named ‘vector’ 39 | jpx_mat.col(i) = jpx[i].translation().vector(); | ^~ make[3]: [gpmp2/CMakeFiles/gpmp2.dir/build.make:76: gpmp2/CMakeFiles/gpmp2.dir/kinematics/Arm.cpp.o] Error 1 make[2]: [CMakeFiles/Makefile2:599: gpmp2/CMakeFiles/gpmp2.dir/all] Error 2 make[1]: [CMakeFiles/Makefile2:579: CMakeFiles/check.dir/rule] Error 2 make: [Makefile:227: check] Error 2

mattking-smith commented 1 year ago

@MF-Ahmed When you compile both GTSAM and GPMP2 is the make variable GTSAM_ALLOW_DEPRECATED_SINCE_V41 on or off during compilation?

varunagrawal commented 1 year ago

Matt is correct. You need to turn off the pre-4.1 compatibility flag he mentioned and it should compile.

mattking-smith commented 1 year ago

@MF-Ahmed I just did a fresh compile with GTSAM and GPMP2 and believe your problem is with the compilation make variable GTSAM_ALLOW_DEPRECATED_SINCE_V41=on, which is turned on by default. You will need to change that and recompile.

mattking-smith commented 1 year ago

@MF-Ahmed following the steps for the GTSAM installation in the Readme will now resolve this issue.