Ask Your Question
1

RGBDslam compile errors

asked 2011-11-10 10:28:33 -0500

karthik gravatar image

updated 2014-01-28 17:10:45 -0500

ngrennan gravatar image

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 ... (more)

edit retag flag offensive close merge delete

Comments

Well, the solution seems to have solved your first problem. Now you have another compilation problem. check out lines 300 and 446 in glviewer.cpp to see what could be the cause for this.
LiMuBei gravatar imageLiMuBei ( 2011-11-11 02:03:10 -0500 )edit
I think the second problem might be related to this warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x (ie, add one of those flags...or maybe I just had to remove some of the curly brackets?) Feel free to add your solution to my earlier answer in any case
Daniel Canelhas gravatar imageDaniel Canelhas ( 2011-11-12 10:51:55 -0500 )edit
I think the second problem might be related to this warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x
Daniel Canelhas gravatar imageDaniel Canelhas ( 2011-11-12 10:51:57 -0500 )edit

1 Answer

Sort by » oldest newest most voted
6

answered 2011-11-11 04:51:39 -0500

karthik gravatar image

Thanks LiMuBei, I did checkout for the error before posting the question. I rechecked the error and replaced the lines 300 and 446 in the glviewer.cpp with the following lines.

unsigned int kr=0, kb=0, kg=0;
const point_type origin(kr, kb, kg);

And it worked. I don't know if these errors are environment specific. In that case they have to be incorporated in the source as well at both glviewer.cpp and graphmanager.cpp.

Thanks, Karthik

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2011-11-10 10:28:33 -0500

Seen: 755 times

Last updated: Nov 11 '11