borglab / gpmp2

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

The error on python package installation of gpmp2 #12

Closed WangHonghui123 closed 1 year ago

WangHonghui123 commented 1 year ago

Hi, I am currently installing python package installation of gpmp2 after I have installed GTSAM and its python wrapper.

When I use command "cmake -DGPMP2_BUILD_PYTHON_TOOLBOX:=ON .." The error happens, shown as follows:

-- GTSAM include directory: /usr/local/lib/cmake/GTSAM/../../../include -- Building Module: geometry -- Building Module: gp -- Building Module: kinematics -- Building Module: dynamics -- Building Module: obstacle -- Building Module: planner -- Building Module: utils -- GPMP2 Version: 0.3.0 -- Install prefix: /usr/local -- Build shared library CMake Warning at python/CMakeLists.txt:1 (find_package): By not providing "Findgtwrap.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "gtwrap", but CMake did not find one.

Could not find a package configuration file provided by "gtwrap" with any of the following names:

gtwrapConfig.cmake
gtwrap-config.cmake

Add the installation prefix of "gtwrap" to CMAKE_PREFIX_PATH or set "gtwrap_DIR" to a directory containing one of the above files. If "gtwrap" provides a separate development package or SDK, be sure it has been installed.

CMake Error at python/CMakeLists.txt:7 (gtwrap_get_python_version): Unknown CMake command "gtwrap_get_python_version".

-- Configuring incomplete, errors occurred! See also "/home/test/PycharmProjects/pythonProject/gpmp2/build/CMakeFiles/CMakeOutput.log". See also "/home/test/PycharmProjects/pythonProject/gpmp2/build/CMakeFiles/CMakeError.log".

I would like to know how to fix it. Thanks.

varunvupparige commented 1 year ago

I'm facing the same issue. Any fixes?

varunagrawal commented 1 year ago

Have you installed GTSAM with the Python wrapper installed? That will install the gtwrap package which is used for generating the Python bindings.

mattking-smith commented 1 year ago

Have you installed GTSAM with the Python wrapper installed? That will install the gtwrap package which is used for generating the Python bindings.

@varunagrawal I am looking the instruction at the ReadMe.md and we do not make a comment about needing to have GTSAM with the Python wrapper installed... Do we need to update this?

varunvupparige commented 1 year ago

@varunagrawal @mattking-smith After installing the GTSAM with python wrapper, when I try to install the gpmp2 according the readme file, I run into the following error:

Traceback (most recent call last): File "/usr/local/bin/gtwrap/pybind_wrap.py", line 94, in main() File "/usr/local/bin/gtwrap/pybind_wrap.py", line 90, in main wrapper.wrap(sources, args.out) File "/usr/local/lib/gtwrap/gtwrap/pybind_wrapper.py", line 718, in wrap submodules=submodules) File "/usr/local/lib/gtwrap/gtwrap/pybind_wrapper.py", line 669, in wrap_file submodules_init="\n".join(submodules_init), KeyError: 'include_boost' python/CMakeFiles/pybind_wrap_gpmp2.dir/build.make:75: recipe for target 'python/gpmp2.cpp' failed make[3]: [python/gpmp2.cpp] Error 1 CMakeFiles/Makefile2:2677: recipe for target 'python/CMakeFiles/pybind_wrap_gpmp2.dir/all' failed make[2]: [python/CMakeFiles/pybind_wrap_gpmp2.dir/all] Error 2 CMakeFiles/Makefile2:2737: recipe for target 'python/CMakeFiles/python-install.dir/rule' failed make[1]: [python/CMakeFiles/python-install.dir/rule] Error 2 Makefile:1323: recipe for target 'python-install' failed make: [python-install] Error 2

varunagrawal commented 1 year ago

@varunvupparige #13 will resolve that issue. Matt has been a bit busy but we'll hopefully land that PR soon.

In the meantime, I recommend checking out that branch and using it instead of master.

varunvupparige commented 1 year ago

@varunagrawal I run into a different error when I build (make -j8) the upgrade branch instead master. Would you recommend using this repo instead: https://github.com/gtrll/gpmp2? What are the major additions to gpmp2 between these two repos?

Here is the error output for your reference:

[ 42%] Building CXX object gpmp2/CMakeFiles/gpmp2.dir/kinematics/Pose2MobileVetLinArm.cpp.o gpmp2/CMakeFiles/gpmp2.dir/build.make:103: recipe for target 'gpmp2/CMakeFiles/gpmp2.dir/kinematics/PointRobot.cpp.o' failed make[2]: [gpmp2/CMakeFiles/gpmp2.dir/kinematics/PointRobot.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... gpmp2/CMakeFiles/gpmp2.dir/build.make:145: recipe for target 'gpmp2/CMakeFiles/gpmp2.dir/kinematics/Pose2MobileBase.cpp.o' failed make[2]: [gpmp2/CMakeFiles/gpmp2.dir/kinematics/Pose2MobileBase.cpp.o] Error 1 gpmp2/CMakeFiles/gpmp2.dir/build.make:89: recipe for target 'gpmp2/CMakeFiles/gpmp2.dir/kinematics/Arm.cpp.o' failed make[2]: [gpmp2/CMakeFiles/gpmp2.dir/kinematics/Arm.cpp.o] Error 1 gpmp2/CMakeFiles/gpmp2.dir/build.make:131: recipe for target 'gpmp2/CMakeFiles/gpmp2.dir/kinematics/Pose2MobileArm.cpp.o' failed make[2]: [gpmp2/CMakeFiles/gpmp2.dir/kinematics/Pose2MobileArm.cpp.o] Error 1 gpmp2/CMakeFiles/gpmp2.dir/build.make:117: recipe for target 'gpmp2/CMakeFiles/gpmp2.dir/kinematics/Pose2Mobile2Arms.cpp.o' failed make[2]: [gpmp2/CMakeFiles/gpmp2.dir/kinematics/Pose2Mobile2Arms.cpp.o] Error 1 gpmp2/CMakeFiles/gpmp2.dir/build.make:159: recipe for target 'gpmp2/CMakeFiles/gpmp2.dir/kinematics/Pose2MobileVetLin2Arms.cpp.o' failed make[2]: *** [gpmp2/CMakeFiles/gpmp2.dir/kinematics/Pose2MobileVetLin2Arms.cpp.o] Error 1 [ 42%] Built target pybind_wrap_gpmp2 In file included from /home/varun/gpmp2/gpmp2/geometry/Pose2Vector.h:13:0, from /home/varun/gpmp2/gpmp2/kinematics/Pose2MobileVetLinArm.h:11, from /home/varun/gpmp2/gpmp2/kinematics/Pose2MobileVetLinArm.cpp:8: /home/varun/gpmp2/gpmp2/geometry/ProductDynamicLieGroup.h:23:24: error: expected identifier before ‘(’ token GTSAM_CONCEPT_ASSERT((gtsam::IsLieGroup)); ^ /home/varun/gpmp2/gpmp2/geometry/ProductDynamicLieGroup.h:23:46: error: ISO C++ forbids declaration of ‘GTSAM_CONCEPT_ASSERT’ with no type [-fpermissive] GTSAM_CONCEPT_ASSERT((gtsam::IsLieGroup)); ^ /home/varun/gpmp2/gpmp2/geometry/ProductDynamicLieGroup.h:24:24: error: expected identifier before ‘(’ token GTSAM_CONCEPT_ASSERT((gtsam::IsLieGroup)); ^ /home/varun/gpmp2/gpmp2/geometry/ProductDynamicLieGroup.h:24:46: error: ISO C++ forbids declaration of ‘GTSAM_CONCEPT_ASSERT’ with no type [-fpermissive] GTSAM_CONCEPT_ASSERT((gtsam::IsLieGroup)); ^ In file included from /usr/local/include/gtsam/nonlinear/Values.h:37:0, from /usr/local/include/gtsam/nonlinear/NonlinearFactor.h:23, from /home/varun/gpmp2/gpmp2/kinematics/ForwardKinematics.h:13, from /home/varun/gpmp2/gpmp2/kinematics/Arm.h:12, from /home/varun/gpmp2/gpmp2/kinematics/Pose2MobileVetLinArm.h:12, from /home/varun/gpmp2/gpmp2/kinematics/Pose2MobileVetLinArm.cpp:8: /usr/include/boost/bind.hpp:41:1: note: #pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior. )

mattking-smith commented 1 year ago

@varunvupparige We have merged #13 so make sure you are on the latest develop branch of GTSAM and then try this compilation again.

mattking-smith commented 1 year ago

@WangHonghui123 this issue has become stale. If an issue still persists please reopen the issue after you have tried a fresh install/compile of GTSAM and GPMP2.