ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

rgbdslam_v2 on Tegra TK1 build error

asked 2015-12-01 04:22:48 -0600

YingHua gravatar image

updated 2015-12-01 04:23:27 -0600

Hi ,

My ros version is Indigo base on Ubuntu 14.04 and hardware is using Nvidia TK1. I follow this web http://felixendres.github.io/rgbdslam... to install rgbdslam_v2 but something error when building.

Here log shows

====================[ error message ]=====================

/home/ubuntu/catkin_ws/src/rgbdslam_v2/src/glviewer.cpp: In member function 'void GLViewer::drawOneCloud(int)': /home/ubuntu/catkin_ws/src/rgbdslam_v2/src/glviewer.cpp:341:75: error: invalid static_cast from type 'qreal* {aka float}' to type 'GLdouble {aka double}' glMultMatrixd(static_cast<gldouble*>( (cloud_matrices)[i].data() ));//works as long as qreal and GLdouble are typedefs to double (might depend on hardware) ^ /home/ubuntu/catkin_ws/src/rgbdslam_v2/src/glviewer.cpp: In member function 'void GLViewer::drawClouds(float)': /home/ubuntu/catkin_ws/src/rgbdslam_v2/src/glviewer.cpp:377:64: error: invalid static_cast from type 'qreal* {aka float}' to type 'GLdouble {aka double}' glMultMatrixd(static_cast<gldouble*>( viewpoint_tf_.data() ));//works as long as qreal and GLdouble are typedefs to double (might depend on hardware) ^ /home/ubuntu/catkin_ws/src/rgbdslam_v2/src/glviewer.cpp:416:75: error: invalid static_cast from type 'qreal {aka float}' to type 'GLdouble {aka double}' glMultMatrixd(static_cast<gldouble*>( (cloud_matrices)[i].data() ));//works as long as qreal and GLdouble are typedefs to double (might depend on hardware) ^ make[2]: * [rgbdslam_v2/CMakeFiles/rgbdslam.dir/src/glviewer.o] Error 1 make[1]: [rgbdslam_v2/CMakeFiles/rgbdslam.dir/all] Error 2 make: ** [all] Error 2

====================[ error message ]=====================

and if I swap glviewer.cpp with glviewer2.cpp in cmakelist.txt. it still shows error.

====================[ error message ]=====================

/home/ubuntu/catkin_ws/src/rgbdslam_v2/src/glviewer2.cpp: In constructor 'GLViewer::GLViewer(QWidget)': /home/ubuntu/catkin_ws/src/rgbdslam_v2/src/glviewer2.cpp:20:39: error: type 'QWidget' is not a direct base of 'GLViewer' GLViewer::GLViewer(QWidget parent) : QWidget(parent) { } ^ make[2]: * [rgbdslam_v2/CMakeFiles/rgbdslam.dir/src/glviewer2.o] Error 1 make[1]: * [rgbdslam_v2/CMakeFiles/rgbdslam.dir/all] Error 2

make: * [all] Error 2

====================[ error message ]=====================

I also ask on github. But it seems nobody answer that. https://github.com/felixendres/rgbdsl...

I am studying rgbd slam. Could anyone give me some advise?

Thanks a lot!!

edit retag flag offensive close merge delete

Comments

I have been installed success on x86 platform but still can't on arm.

YingHua gravatar image YingHua  ( 2015-12-03 00:40:15 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-01-13 05:04:30 -0600

As the comment says, the cast of the matrix only works if both opengl and qt use the same floating point type.

Maybe you can just change the line

glMultMatrixd(static_cast<GLdouble*>( (*cloud_matrices)[i].data() ));//works as long as qreal and GLdouble are typedefs to double (might depend on hardware)

to

glMultMatrixf(static_cast<GLfloat*>( (*cloud_matrices)[i].data() ));//works as long as qreal and GLfloat are typedefs to float (depends on hardware)
edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2015-12-01 04:22:48 -0600

Seen: 470 times

Last updated: Jan 13 '16