Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

RGBDslam compile errors

Hi, I compiled the RGBDslam package as mentioned in http://www.ros.org/wiki/rgbdslam with the command

rosmake --rosdep-install rgbdslam

I got the following errors

[rosmake-1] Starting >>> rgbdslam [ make ]                                                                                                                              
[ rosmake ] All 36 linesgbdslam: 8.0 sec ]                                                                                                   [ 1 Active 60/61 Complete ]
{-------------------------------------------------------------------------------
  mkdir -p bin
  cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake  ..
  [rosbuild] Building package rgbdslam
  [rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/rospy/cmake/rospy.cmake
  [rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/roslisp/cmake/roslisp.cmake
  [rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/cmake/roscpp.cmake
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /workspace/karthik/RRC/ros_workspace/rgbdslam/build
  cd build && make -l4
  make[1]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[2]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  [  0%] Built target rospack_genmsg_libexe
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  [  0%] Built target rosbuild_precompile
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  Scanning dependencies of target rgbdslam
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  [  5%] Building CXX object CMakeFiles/rgbdslam.dir/src/graph_manager.o
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp: In member function ‘void GraphManager::visualizeFeatureFlow3D(unsigned int, bool) const’:
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp:442:9: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 8 has type ‘std::vector<cv::DMatch, std::allocator<cv::DMatch> >::size_type’
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp:442:9: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 9 has type ‘std::vector<cv::DMatch, std::allocator<cv::DMatch> >::size_type’
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp: In function ‘void transformAndAppendPointCloud(const pointcloud_type&, pointcloud_type&, tf::Transform, float)’:
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp:1043:67: error: invalid conversion from ‘const float*’ to ‘float*’
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp:1043:67: error:   initializing argument 1 of ‘Eigen::Map<MatrixType, MapOptions, StrideType>::Map(Eigen::Map<MatrixType, MapOptions, StrideType>::PointerArgType, Eigen::Map<MatrixType, MapOptions, StrideType>::Index, Eigen::Map<MatrixType, MapOptions, StrideType>::Index, const StrideType&) [with PlainObjectType = Eigen::Matrix<float, 3, 1>, int MapOptions = 0, StrideType = Eigen::Stride<0, 0>, Eigen::Map<MatrixType, MapOptions, StrideType>::PointerArgType = float*, Eigen::Map<MatrixType, MapOptions, StrideType>::Index = int]’
  make[3]: *** [CMakeFiles/rgbdslam.dir/src/graph_manager.o] Error 1
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[2]: *** [CMakeFiles/rgbdslam.dir/all] Error 2
  make[2]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[1]: *** [all] Error 2
  make[1]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
-------------------------------------------------------------------------------}

I found this issue already answered for this issue at http://answers.ros.org/question/2183/rgbdslam-compiler-errors But it didn't work for me. When i followed the solution proposed by Daniel Canelhas, by editing the line 1043 in graph_manager.cpp with

pointcloud_type ncloud=cloud_in;
 Eigen::Map<Eigen::Vector3f> p_in (&ncloud.points[i].x, 3, 1);

I am getting the following errors when i compile after this change.

[rosmake-2] Starting >>> rgbdslam [ make ]                                                                                                                              
[ rosmake ] All 39 linesgbdslam: 23.6 sec ]                                                                                                  [ 1 Active 60/61 Complete ]
{-------------------------------------------------------------------------------
  mkdir -p bin
  cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake  ..
  [rosbuild] Building package rgbdslam
  [rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/rospy/cmake/rospy.cmake
  [rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/roslisp/cmake/roslisp.cmake
  [rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/cmake/roscpp.cmake
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /workspace/karthik/RRC/ros_workspace/rgbdslam/build
  cd build && make -l4
  make[1]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[2]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  [  0%] Built target rospack_genmsg_libexe
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  [  0%] Built target rosbuild_precompile
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  [  5%] Building CXX object CMakeFiles/rgbdslam.dir/src/graph_manager.o
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp: In member function ‘void GraphManager::visualizeFeatureFlow3D(unsigned int, bool) const’:
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp:442:9: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 8 has type ‘std::vector<cv::DMatch, std::allocator<cv::DMatch> >::size_type’
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp:442:9: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 9 has type ‘std::vector<cv::DMatch, std::allocator<cv::DMatch> >::size_type’
  [ 10%] Building CXX object CMakeFiles/rgbdslam.dir/src/glviewer.o
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/glviewer.cpp: In member function ‘void GLViewer::pointCloud2GLStrip(const pointcloud_type*)’:
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/glviewer.cpp:300:50: error: in C++98 ‘origin’ must be initialized by constructor, not by ‘{...}’
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/glviewer.cpp:300:50: error: could not convert ‘{{{0.0}}, {{0.0}}}’ to ‘const point_type’
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/glviewer.cpp: In member function ‘void GLViewer::pointCloud2GLList(const pointcloud_type*)’:
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/glviewer.cpp:446:50: error: in C++98 ‘origin’ must be initialized by constructor, not by ‘{...}’
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/glviewer.cpp:446:50: error: could not convert ‘{{{0.0}}, {{0.0}}}’ to ‘const point_type’
  make[3]: *** [CMakeFiles/rgbdslam.dir/src/glviewer.o] Error 1
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[2]: *** [CMakeFiles/rgbdslam.dir/all] Error 2
  make[2]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[1]: *** [all] Error 2
  make[1]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
-------------------------------------------------------------------------------}

So can someone help me out in compiling the rgbdslam. Sorry for posting such a long question. I just wanted to be clear in what the issue is.

Thanks, Karthik

RGBDslam compile errors

Hi, I am using 11.04 Ubuntu, ROS Electric. I compiled the RGBDslam package as mentioned in http://www.ros.org/wiki/rgbdslam with the command

rosmake --rosdep-install rgbdslam

I got the following errors

[rosmake-1] Starting >>> rgbdslam [ make ]                                                                                                                              
[ rosmake ] All 36 linesgbdslam: 8.0 sec ]                                                                                                   [ 1 Active 60/61 Complete ]
{-------------------------------------------------------------------------------
  mkdir -p bin
  cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake  ..
  [rosbuild] Building package rgbdslam
  [rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/rospy/cmake/rospy.cmake
  [rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/roslisp/cmake/roslisp.cmake
  [rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/cmake/roscpp.cmake
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /workspace/karthik/RRC/ros_workspace/rgbdslam/build
  cd build && make -l4
  make[1]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[2]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  [  0%] Built target rospack_genmsg_libexe
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  [  0%] Built target rosbuild_precompile
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  Scanning dependencies of target rgbdslam
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  [  5%] Building CXX object CMakeFiles/rgbdslam.dir/src/graph_manager.o
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp: In member function ‘void GraphManager::visualizeFeatureFlow3D(unsigned int, bool) const’:
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp:442:9: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 8 has type ‘std::vector<cv::DMatch, std::allocator<cv::DMatch> >::size_type’
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp:442:9: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 9 has type ‘std::vector<cv::DMatch, std::allocator<cv::DMatch> >::size_type’
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp: In function ‘void transformAndAppendPointCloud(const pointcloud_type&, pointcloud_type&, tf::Transform, float)’:
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp:1043:67: error: invalid conversion from ‘const float*’ to ‘float*’
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp:1043:67: error:   initializing argument 1 of ‘Eigen::Map<MatrixType, MapOptions, StrideType>::Map(Eigen::Map<MatrixType, MapOptions, StrideType>::PointerArgType, Eigen::Map<MatrixType, MapOptions, StrideType>::Index, Eigen::Map<MatrixType, MapOptions, StrideType>::Index, const StrideType&) [with PlainObjectType = Eigen::Matrix<float, 3, 1>, int MapOptions = 0, StrideType = Eigen::Stride<0, 0>, Eigen::Map<MatrixType, MapOptions, StrideType>::PointerArgType = float*, Eigen::Map<MatrixType, MapOptions, StrideType>::Index = int]’
  make[3]: *** [CMakeFiles/rgbdslam.dir/src/graph_manager.o] Error 1
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[2]: *** [CMakeFiles/rgbdslam.dir/all] Error 2
  make[2]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[1]: *** [all] Error 2
  make[1]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
-------------------------------------------------------------------------------}

I found this issue already answered for this issue at http://answers.ros.org/question/2183/rgbdslam-compiler-errors But it didn't work for me. When i followed the solution proposed by Daniel Canelhas, by editing the line 1043 in graph_manager.cpp with

pointcloud_type ncloud=cloud_in;
 Eigen::Map<Eigen::Vector3f> p_in (&ncloud.points[i].x, 3, 1);

I am getting the following errors when i compile after this change.

[rosmake-2] Starting >>> rgbdslam [ make ]                                                                                                                              
[ rosmake ] All 39 linesgbdslam: 23.6 sec ]                                                                                                  [ 1 Active 60/61 Complete ]
{-------------------------------------------------------------------------------
  mkdir -p bin
  cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake  ..
  [rosbuild] Building package rgbdslam
  [rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/rospy/cmake/rospy.cmake
  [rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/roslisp/cmake/roslisp.cmake
  [rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/cmake/roscpp.cmake
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /workspace/karthik/RRC/ros_workspace/rgbdslam/build
  cd build && make -l4
  make[1]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[2]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  [  0%] Built target rospack_genmsg_libexe
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  [  0%] Built target rosbuild_precompile
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  [  5%] Building CXX object CMakeFiles/rgbdslam.dir/src/graph_manager.o
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp: In member function ‘void GraphManager::visualizeFeatureFlow3D(unsigned int, bool) const’:
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp:442:9: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 8 has type ‘std::vector<cv::DMatch, std::allocator<cv::DMatch> >::size_type’
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp:442:9: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 9 has type ‘std::vector<cv::DMatch, std::allocator<cv::DMatch> >::size_type’
  [ 10%] Building CXX object CMakeFiles/rgbdslam.dir/src/glviewer.o
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/glviewer.cpp: In member function ‘void GLViewer::pointCloud2GLStrip(const pointcloud_type*)’:
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/glviewer.cpp:300:50: error: in C++98 ‘origin’ must be initialized by constructor, not by ‘{...}’
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/glviewer.cpp:300:50: error: could not convert ‘{{{0.0}}, {{0.0}}}’ to ‘const point_type’
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/glviewer.cpp: In member function ‘void GLViewer::pointCloud2GLList(const pointcloud_type*)’:
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/glviewer.cpp:446:50: error: in C++98 ‘origin’ must be initialized by constructor, not by ‘{...}’
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/glviewer.cpp:446:50: error: could not convert ‘{{{0.0}}, {{0.0}}}’ to ‘const point_type’
  make[3]: *** [CMakeFiles/rgbdslam.dir/src/glviewer.o] Error 1
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[2]: *** [CMakeFiles/rgbdslam.dir/all] Error 2
  make[2]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[1]: *** [all] Error 2
  make[1]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
-------------------------------------------------------------------------------}

So can someone help me out in compiling the rgbdslam. Sorry for posting such a long question. I just wanted to be clear in what the issue is.

Thanks, Karthik

RGBDslam compile errors

Hi, I am using 11.04 Ubuntu, ROS Electric. I compiled the RGBDslam package as mentioned in http://www.ros.org/wiki/rgbdslam with the command

rosmake --rosdep-install rgbdslam

I got the following errors

[rosmake-1] Starting >>> rgbdslam [ make ]                                                                                                                              
[ rosmake ] All 36 linesgbdslam: 8.0 sec ]                                                                                                   [ 1 Active 60/61 Complete ]
{-------------------------------------------------------------------------------
  mkdir -p bin
  cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake  ..
  [rosbuild] Building package rgbdslam
  [rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/rospy/cmake/rospy.cmake
  [rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/roslisp/cmake/roslisp.cmake
  [rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/cmake/roscpp.cmake
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /workspace/karthik/RRC/ros_workspace/rgbdslam/build
  cd build && make -l4
  make[1]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[2]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  [  0%] Built target rospack_genmsg_libexe
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  [  0%] Built target rosbuild_precompile
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  Scanning dependencies of target rgbdslam
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  [  5%] Building CXX object CMakeFiles/rgbdslam.dir/src/graph_manager.o
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp: In member function ‘void GraphManager::visualizeFeatureFlow3D(unsigned int, bool) const’:
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp:442:9: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 8 has type ‘std::vector<cv::DMatch, std::allocator<cv::DMatch> >::size_type’
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp:442:9: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 9 has type ‘std::vector<cv::DMatch, std::allocator<cv::DMatch> >::size_type’
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp: In function ‘void transformAndAppendPointCloud(const pointcloud_type&, pointcloud_type&, tf::Transform, float)’:
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp:1043:67: error: invalid conversion from ‘const float*’ to ‘float*’
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp:1043:67: error:   initializing argument 1 of ‘Eigen::Map<MatrixType, MapOptions, StrideType>::Map(Eigen::Map<MatrixType, MapOptions, StrideType>::PointerArgType, Eigen::Map<MatrixType, MapOptions, StrideType>::Index, Eigen::Map<MatrixType, MapOptions, StrideType>::Index, const StrideType&) [with PlainObjectType = Eigen::Matrix<float, 3, 1>, int MapOptions = 0, StrideType = Eigen::Stride<0, 0>, Eigen::Map<MatrixType, MapOptions, StrideType>::PointerArgType = float*, Eigen::Map<MatrixType, MapOptions, StrideType>::Index = int]’
  make[3]: *** [CMakeFiles/rgbdslam.dir/src/graph_manager.o] Error 1
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[2]: *** [CMakeFiles/rgbdslam.dir/all] Error 2
  make[2]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[1]: *** [all] Error 2
  make[1]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
-------------------------------------------------------------------------------}

I found this issue already answered for this issue at http://answers.ros.org/question/2183/rgbdslam-compiler-errors But it didn't work for me. When i followed the solution proposed by Daniel Canelhas, by editing the line 1043 in graph_manager.cpp with

pointcloud_type ncloud=cloud_in;
 Eigen::Map<Eigen::Vector3f> p_in (&ncloud.points[i].x, 3, 1);

I am getting the following errors when i compile after this change.

[rosmake-2] Starting >>> rgbdslam [ make ]                                                                                                                              
[ rosmake ] All 39 linesgbdslam: 23.6 sec ]                                                                                                  [ 1 Active 60/61 Complete ]
{-------------------------------------------------------------------------------
  mkdir -p bin
  cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake  ..
  [rosbuild] Building package rgbdslam
  [rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/rospy/cmake/rospy.cmake
  [rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/roslisp/cmake/roslisp.cmake
  [rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/cmake/roscpp.cmake
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /workspace/karthik/RRC/ros_workspace/rgbdslam/build
  cd build && make -l4
  make[1]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[2]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  [  0%] Built target rospack_genmsg_libexe
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  [  0%] Built target rosbuild_precompile
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  [  5%] Building CXX object CMakeFiles/rgbdslam.dir/src/graph_manager.o
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp: In member function ‘void GraphManager::visualizeFeatureFlow3D(unsigned int, bool) const’:
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp:442:9: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 8 has type ‘std::vector<cv::DMatch, std::allocator<cv::DMatch> >::size_type’
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp:442:9: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 9 has type ‘std::vector<cv::DMatch, std::allocator<cv::DMatch> >::size_type’
  [ 10%] Building CXX object CMakeFiles/rgbdslam.dir/src/glviewer.o
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/glviewer.cpp: In member function ‘void GLViewer::pointCloud2GLStrip(const pointcloud_type*)’:
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/glviewer.cpp:300:50: error: in C++98 ‘origin’ must be initialized by constructor, not by ‘{...}’
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/glviewer.cpp:300:50: error: could not convert ‘{{{0.0}}, {{0.0}}}’ to ‘const point_type’
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/glviewer.cpp: In member function ‘void GLViewer::pointCloud2GLList(const pointcloud_type*)’:
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/glviewer.cpp:446:50: error: in C++98 ‘origin’ must be initialized by constructor, not by ‘{...}’
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/glviewer.cpp:446:50: error: could not convert ‘{{{0.0}}, {{0.0}}}’ to ‘const point_type’
  make[3]: *** [CMakeFiles/rgbdslam.dir/src/glviewer.o] Error 1
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[2]: *** [CMakeFiles/rgbdslam.dir/all] Error 2
  make[2]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[1]: *** [all] Error 2
  make[1]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
-------------------------------------------------------------------------------}

So can someone help me out in compiling the rgbdslam. Sorry for posting such a long question. I just wanted to be clear in what the issue is.

Thanks, Karthik

RGBDslam compile errors

Hi, I am using 11.04 Ubuntu, ROS Electric. I compiled the RGBDslam package as mentioned in http://www.ros.org/wiki/rgbdslam with the command

rosmake --rosdep-install rgbdslam

I got the following errors

[rosmake-1] Starting >>> rgbdslam [ make ]                                                                                                                              
[ rosmake ] All 36 linesgbdslam: 8.0 sec ]                                                                                                   [ 1 Active 60/61 Complete ]
{-------------------------------------------------------------------------------
  mkdir -p bin
  cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake  ..
  [rosbuild] Building package rgbdslam
  [rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/rospy/cmake/rospy.cmake
  [rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/roslisp/cmake/roslisp.cmake
  [rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/cmake/roscpp.cmake
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /workspace/karthik/RRC/ros_workspace/rgbdslam/build
  cd build && make -l4
  make[1]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[2]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  [  0%] Built target rospack_genmsg_libexe
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  [  0%] Built target rosbuild_precompile
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  Scanning dependencies of target rgbdslam
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  [  5%] Building CXX object CMakeFiles/rgbdslam.dir/src/graph_manager.o
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp: In member function ‘void GraphManager::visualizeFeatureFlow3D(unsigned int, bool) const’:
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp:442:9: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 8 has type ‘std::vector<cv::DMatch, std::allocator<cv::DMatch> >::size_type’
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp:442:9: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 9 has type ‘std::vector<cv::DMatch, std::allocator<cv::DMatch> >::size_type’
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp: In function ‘void transformAndAppendPointCloud(const pointcloud_type&, pointcloud_type&, tf::Transform, float)’:
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp:1043:67: error: invalid conversion from ‘const float*’ to ‘float*’
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp:1043:67: error:   initializing argument 1 of ‘Eigen::Map<MatrixType, MapOptions, StrideType>::Map(Eigen::Map<MatrixType, MapOptions, StrideType>::PointerArgType, Eigen::Map<MatrixType, MapOptions, StrideType>::Index, Eigen::Map<MatrixType, MapOptions, StrideType>::Index, const StrideType&) [with PlainObjectType = Eigen::Matrix<float, 3, 1>, int MapOptions = 0, StrideType = Eigen::Stride<0, 0>, Eigen::Map<MatrixType, MapOptions, StrideType>::PointerArgType = float*, Eigen::Map<MatrixType, MapOptions, StrideType>::Index = int]’
  make[3]: *** [CMakeFiles/rgbdslam.dir/src/graph_manager.o] Error 1
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[2]: *** [CMakeFiles/rgbdslam.dir/all] Error 2
  make[2]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[1]: *** [all] Error 2
  make[1]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
-------------------------------------------------------------------------------}

I found this issue already answered for this issue at http://answers.ros.org/question/2183/rgbdslam-compiler-errors But it didn't work for me. When i followed the solution proposed by Daniel Canelhas, by editing the line 1043 in graph_manager.cpp with

pointcloud_type ncloud=cloud_in;
 Eigen::Map<Eigen::Vector3f> p_in (&ncloud.points[i].x, 3, 1);

I am getting the following errors when i compile after this change.

[rosmake-2] Starting >>> rgbdslam [ make ]                                                                                                                              
[ rosmake ] All 39 linesgbdslam: 23.6 sec ]                                                                                                  [ 1 Active 60/61 Complete ]
{-------------------------------------------------------------------------------
  mkdir -p bin
  cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake  ..
  [rosbuild] Building package rgbdslam
  [rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/rospy/cmake/rospy.cmake
  [rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/roslisp/cmake/roslisp.cmake
  [rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/cmake/roscpp.cmake
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /workspace/karthik/RRC/ros_workspace/rgbdslam/build
  cd build && make -l4
  make[1]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[2]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  [  0%] Built target rospack_genmsg_libexe
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  [  0%] Built target rosbuild_precompile
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[3]: Entering directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  [  5%] Building CXX object CMakeFiles/rgbdslam.dir/src/graph_manager.o
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp: In member function ‘void GraphManager::visualizeFeatureFlow3D(unsigned int, bool) const’:
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp:442:9: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 8 has type ‘std::vector<cv::DMatch, std::allocator<cv::DMatch> >::size_type’
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/graph_manager.cpp:442:9: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 9 has type ‘std::vector<cv::DMatch, std::allocator<cv::DMatch> >::size_type’
  [ 10%] Building CXX object CMakeFiles/rgbdslam.dir/src/glviewer.o
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/glviewer.cpp: In member function ‘void GLViewer::pointCloud2GLStrip(const pointcloud_type*)’:
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/glviewer.cpp:300:50: error: in C++98 ‘origin’ must be initialized by constructor, not by ‘{...}’
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/glviewer.cpp:300:50: error: could not convert ‘{{{0.0}}, {{0.0}}}’ to ‘const point_type’
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/glviewer.cpp: In member function ‘void GLViewer::pointCloud2GLList(const pointcloud_type*)’:
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/glviewer.cpp:446:50: error: in C++98 ‘origin’ must be initialized by constructor, not by ‘{...}’
  /workspace/karthik/RRC/ros_workspace/rgbdslam/src/glviewer.cpp:446:50: error: could not convert ‘{{{0.0}}, {{0.0}}}’ to ‘const point_type’
  make[3]: *** [CMakeFiles/rgbdslam.dir/src/glviewer.o] Error 1
  make[3]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[2]: *** [CMakeFiles/rgbdslam.dir/all] Error 2
  make[2]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
  make[1]: *** [all] Error 2
  make[1]: Leaving directory `/workspace/karthik/RRC/ros_workspace/rgbdslam/build'
-------------------------------------------------------------------------------}

So can someone help me out in compiling the rgbdslam. Sorry for posting such a long question. I just wanted to be clear in what the issue is.

Thanks, Karthik