ankitdhall / lidar_camera_calibration

ROS package to find a rigid-body transformation between a LiDAR and a camera for "LiDAR-Camera Calibration using 3D-3D Point correspondences"
http://arxiv.org/abs/1705.09785
GNU General Public License v3.0
1.47k stars 459 forks source link

Build issue: aruco_mapping.h #116

Closed mac137 closed 4 years ago

mac137 commented 4 years ago

when building the aruco_mapping pkg I get the following error. I tried to change the order of building as advised by #104 but it did not work. The error: In file included from /home/maciej/ros/src/aruco_mapping/src/aruco_mapping.cpp:37:0: /home/maciej/ros/src/aruco_mapping/include/aruco_mapping.h:160:24: error: ‘constexpr’ needed for in-class initialization of static data member ‘const double aruco_mapping::ArucoMapping::WAIT_FOR_TRANSFORM_INTERVAL’ of non-integral type [-fpermissive] static const double WAIT_FOR_TRANSFORM_INTERVAL = 2.0; ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/maciej/ros/src/aruco_mapping/include/aruco_mapping.h:161:24: error: ‘constexpr’ needed for in-class initialization of static data member ‘const double aruco_mapping::ArucoMapping::BROADCAST_WAIT_INTERVAL’ of non-integral type [-fpermissive] static const double BROADCAST_WAIT_INTERVAL = 0.0001; ^~~~~~~~~~~~~~~~~~~~~~~ /home/maciej/ros/src/aruco_mapping/include/aruco_mapping.h:162:24: error: ‘constexpr’ needed for in-class initialization of static data member ‘const double aruco_mapping::ArucoMapping::INIT_MIN_SIZE_VALUE’ of non-integral type [-fpermissive] static const double INIT_MIN_SIZE_VALUE = 1000000; ^~~~~~~~~~~~~~~~~~~ /home/maciej/ros/src/aruco_mapping/include/aruco_mapping.h:164:24: error: ‘constexpr’ needed for in-class initialization of static data member ‘const double aruco_mapping::ArucoMapping::RVIZ_MARKER_HEIGHT’ of non-integral type [-fpermissive] static const double RVIZ_MARKER_HEIGHT = 0.01; ^~~~~~~~~~~~~~~~~~ /home/maciej/ros/src/aruco_mapping/include/aruco_mapping.h:165:24: error: ‘constexpr’ needed for in-class initialization of static data member ‘const double aruco_mapping::ArucoMapping::RVIZ_MARKER_LIFETIME’ of non-integral type [-fpermissive] static const double RVIZ_MARKER_LIFETIME = 0.2; ^~~~~~~~~~~~~~~~~~~~ /home/maciej/ros/src/aruco_mapping/include/aruco_mapping.h:166:24: error: ‘constexpr’ needed for in-class initialization of static data member ‘const double aruco_mapping::ArucoMapping::RVIZ_MARKER_COLOR_R’ of non-integral type [-fpermissive] static const double RVIZ_MARKER_COLOR_R = 1.0; ^~~~~~~~~~~~~~~~~~~ /home/maciej/ros/src/aruco_mapping/include/aruco_mapping.h:167:24: error: ‘constexpr’ needed for in-class initialization of static data member ‘const double aruco_mapping::ArucoMapping::RVIZ_MARKER_COLOR_G’ of non-integral type [-fpermissive] static const double RVIZ_MARKER_COLOR_G = 1.0; ^~~~~~~~~~~~~~~~~~~ /home/maciej/ros/src/aruco_mapping/include/aruco_mapping.h:168:24: error: ‘constexpr’ needed for in-class initialization of static data member ‘const double aruco_mapping::ArucoMapping::RVIZ_MARKER_COLOR_B’ of non-integral type [-fpermissive] static const double RVIZ_MARKER_COLOR_B = 1.0; ^~~~~~~~~~~~~~~~~~~ /home/maciej/ros/src/aruco_mapping/include/aruco_mapping.h:169:24: error: ‘constexpr’ needed for in-class initialization of static data member ‘const double aruco_mapping::ArucoMapping::RVIZ_MARKER_COLOR_A’ of non-integral type [-fpermissive] static const double RVIZ_MARKER_COLOR_A = 1.0; ^~~~~~~~~~~~~~~~~~~ /home/maciej/ros/src/aruco_mapping/include/aruco_mapping.h:171:24: error: ‘constexpr’ needed for in-class initialization of static data member ‘const double aruco_mapping::ArucoMapping::THIS_IS_FIRST_MARKER’ of non-integral type [-fpermissive] static const double THIS_IS_FIRST_MARKER = -2; ^~~~~~~~~~~~~~~~~~~~ aruco_mapping/CMakeFiles/aruco_mapping.dir/build.make:62: recipe for target 'aruco_mapping/CMakeFiles/aruco_mapping.dir/src/main.cpp.o' failed make[2]: *** [aruco_mapping/CMakeFiles/aruco_mapping.dir/src/main.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... aruco_mapping/CMakeFiles/aruco_mapping.dir/build.make:86: recipe for target 'aruco_mapping/CMakeFiles/aruco_mapping.dir/src/aruco_mapping.cpp.o' failed make[2]: *** [aruco_mapping/CMakeFiles/aruco_mapping.dir/src/aruco_mapping.cpp.o] Error 1 CMakeFiles/Makefile2:1585: recipe for target 'aruco_mapping/CMakeFiles/aruco_mapping.dir/all' failed make[1]: *** [aruco_mapping/CMakeFiles/aruco_mapping.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j8 -l8" failed any help?

mac137 commented 4 years ago

the solution found here. Change the code in aruco_mapping.h to be: ` static constexpr double WAIT_FOR_TRANSFORM_INTERVAL = 2.0; static constexpr double BROADCAST_WAIT_INTERVAL = 0.0001; static constexpr double INIT_MIN_SIZE_VALUE = 1000000;

static constexpr double RVIZ_MARKER_HEIGHT = 0.01; static constexpr double RVIZ_MARKER_LIFETIME = 0.2; static constexpr double RVIZ_MARKER_COLOR_R = 1.0; static constexpr double RVIZ_MARKER_COLOR_G = 1.0; static constexpr double RVIZ_MARKER_COLOR_B = 1.0; static constexpr double RVIZ_MARKER_COLOR_A = 1.0;

static constexpr double THIS_IS_FIRST_MARKER = -2;`