tum-vision / dvo_slam

Dense Visual Odometry and SLAM
630 stars 305 forks source link

rosmake error with Indigo #21

Open mlowney opened 9 years ago

mlowney commented 9 years ago

I've been trying to get the dvo_slam code to work using ROS Indigo but have been running into problems. When the "rosmake dvo_core dvo_ros dvo_slam dvo_benchmark" command is called I get the following errors:

Linking CXX executable /home/cig/rosbuild_ws/package_dir/dvo_slam/g2o/g2o_src/bin/g2o_viewer /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libQGLViewer.so: undefined reference to gluNewQuadric' /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libQGLViewer.so: undefined reference togluUnProject' /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libQGLViewer.so: undefined reference to gluCylinder' /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libQGLViewer.so: undefined reference togluPickMatrix' /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libQGLViewer.so: undefined reference to gluSphere' /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libQGLViewer.so: undefined reference togluProject' collect2: error: ld returned 1 exit status

It only occurs when we try to make dvo_slam and dvo_benchmark.

uliB24 commented 9 years ago

I had the same error. Adding the Following to the dvo_slam/g2o/g2o_src/g2o/apps/g2o_viewer/CMakeLists.txt file fixed it:

find_package(OpenGL REQUIRED) find_package(GLUT REQUIRED) include_directories( ${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS} )

And change TARGET_LINK_LIBRARIES(g2o_viewer viewer_library) to TARGET_LINK_LIBRARIES(g2o_viewer viewer_library ${OPENGL_LIBRARIES} ${GLUT_LIBRARY})

dhgomezg6 commented 9 years ago

I have the same error, the solution provided doesn't work, instead the file has been overwritten with the previous version.