-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
catkin_make failed! #980
Comments
Can someone help me? Thank you very much. UBUNTU 16.04 + ros kinetic |
There's a official install process recommended. I've installed cartographer right under its instruction with UBUNTU 16.04 + ROS kinetic.Hope it's' helpful |
@ZhouYixuanRobtic thank you! I will try. But I still want to know where I was wrong. |
@ZhouYixuanRobtic
Using the specified version of the code, smoothly compile and pass. |
#964 is not merged yet in cartographer_ros, while the corresponding PR in cartographer was merged. This is why you could not get master to compile. |
PoseGraph{2D,3D}::FinishTrajectory() calls AddWorkItem() which requires the mutex to be held. This adds code to do this.
When I use the catkin_make to compile cartographer_ros, the errors is reported as below:
/home/cgd/catkin_ws/src/cartographer_ros/cartographer_ros/cartographer_ros/sensor_bridge.cc:180:32: error: no match for ‘operator[]’ (operand types are ‘const value_type {aka const cartographer::sensor::TimedRangefinderPoint}’ and ‘int’) CHECK_LE(points.points.back()[3], 0); ^ /home/cgd/catkin_ws/src/cartographer_ros/cartographer_ros/cartographer_ros/sensor_bridge.cc:192:62: error: no match for ‘operator[]’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<cartographer::sensor::TimedRangefinderPoint> >::value_type {aka cartographer::sensor::TimedRangefinderPoint}’ and ‘int’) const double time_to_subdivision_end = subdivision.back()[3]; ^ /home/cgd/catkin_ws/src/cartographer_ros/cartographer_ros/cartographer_ros/sensor_bridge.cc:207:35: error: invalid initialization of reference of type ‘Eigen::Vector4f& {aka Eigen::Matrix<float, 4, 1>&}’ from expression of type ‘cartographer::sensor::TimedRangefinderPoint’ for (Eigen::Vector4f& point : subdivision) { ^ In file included from /usr/local/include/cartographer/common/lua_parameter_dictionary.h:27:0, from /usr/local/include/cartographer/mapping/trajectory_builder_interface.h:25, from /home/cgd/catkin_ws/src/cartographer_ros/cartographer_ros/cartographer_ros/sensor_bridge.h:23, from /home/cgd/catkin_ws/src/cartographer_ros/cartographer_ros/cartographer_ros/sensor_bridge.cc:17: /home/cgd/catkin_ws/src/cartographer_ros/cartographer_ros/cartographer_ros/sensor_bridge.cc:210:32: error: no match for ‘operator[]’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<cartographer::sensor::TimedRangefinderPoint> >::value_type {aka cartographer::sensor::TimedRangefinderPoint}’ and ‘int’) CHECK_EQ(subdivision.back()[3], 0);
Below is my entire compilation and installation steps.
`
sudo apt-get update
sudo apt-get install -y
g++
git
google-mock
libboost-all-dev
libcairo2-dev
libeigen3-dev
libgflags-dev
libgoogle-glog-dev
liblua5.2-dev
libsuitesparse-dev
ninja-build
python-sphinx
git clone https://github.com/ceres-solver/ceres-solver.git
cd ceres-solver
git checkout tags/1.13.0
mkdir build
cmake .. -G Ninja -DCXX11=ON
ninja
CTEST_OUTPUT_ON_FAILURE=1 ninja test
sudo ninja install
git clone https://github.com/google/protobuf.git
cd protobuf
git checkout tags/v3.4.1
mkdir build
cd build
cmake -G Ninja
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DCMAKE_BUILD_TYPE=Release
-Dprotobuf_BUILD_TESTS=OFF
../cmake
ninja
sudo ninja install
git clone https://github.com/googlecartographer/cartographer.git
cd cartographer
mkdir build
cd build
cmake .. -G Ninja
ninja
CTEST_OUTPUT_ON_FAILURE=1 ninja test
sudo ninja install
cd ~/catkin_ws/src
git clone https://github.com/googlecartographer/cartographer_ros.git
cd ~/catkin_ws
catkin_make --only-pkg-with-deps cartographer_ros
`
The text was updated successfully, but these errors were encountered: