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

lsd_slam pointcloud viewer error

asked 2016-06-26 08:07:32 -0600

yasin_alm gravatar image

I'm trying to compile lsd_slam on ubuntu 15.10 with ros- kinetic. when i try to compile the lsd_slam as explained in https://github.com/tum-vision/lsd_slam , i get this error. what could be the reason?

[rosmake-1] Starting >>> lsd_slam_viewer [ make ]                                                                                                                                                           
[ rosmake ] Last 40 linesd_slam_viewer: 35.9 sec ]                                                                                                                               [ 1 Active 43/45 Complete ]
{-------------------------------------------------------------------------------
         ^
  /home/yasin/Desktop/ubuntuPythonShared/LSD_SLAM/rosbuild_ws/package_dir/lsd_slam/lsd_slam_viewer/src/PointCloudViewer.cpp: In member function ‘virtual void PointCloudViewer::keyPressEvent(QKeyEvent*)’:
  /home/yasin/Desktop/ubuntuPythonShared/LSD_SLAM/rosbuild_ws/package_dir/lsd_slam/lsd_slam_viewer/src/PointCloudViewer.cpp:327:44: error: invalid initialization of non-const reference of type ‘qreal& {aka double&}’ from an rvalue of type ‘qreal {aka double}’
          camera()->frame()->getPosition(x,y,z);
                                              ^
  In file included from /usr/include/QGLViewer/keyFrameInterpolator.h:31:0,
                   from /usr/include/QGLViewer/camera.h:26,
                   from /usr/include/QGLViewer/qglviewer.h:26,
                   from /home/yasin/Desktop/ubuntuPythonShared/LSD_SLAM/rosbuild_ws/package_dir/lsd_slam/lsd_slam_viewer/src/PointCloudViewer.h:26,
                   from /home/yasin/Desktop/ubuntuPythonShared/LSD_SLAM/rosbuild_ws/package_dir/lsd_slam/lsd_slam_viewer/src/PointCloudViewer.cpp:22:
  /usr/include/QGLViewer/frame.h:188:7: note:   initializing argument 1 of ‘void qglviewer::Frame::getPosition(qreal&, qreal&, qreal&) const’
    void getPosition(qreal& x, qreal& y, qreal& z) const;
         ^
  In file included from /home/yasin/Desktop/ubuntuPythonShared/LSD_SLAM/rosbuild_ws/package_dir/lsd_slam/lsd_slam_viewer/src/main_viewer.cpp:25:0:
  /home/yasin/Desktop/ubuntuPythonShared/LSD_SLAM/rosbuild_ws/package_dir/lsd_slam/lsd_slam_viewer/src/PointCloudViewer.h: In member function ‘std::__cxx11::string AnimationObject::toString()’:
  /home/yasin/Desktop/ubuntuPythonShared/LSD_SLAM/rosbuild_ws/package_dir/lsd_slam/lsd_slam_viewer/src/PointCloudViewer.h:136:26: error: invalid initialization of non-const reference of type ‘qreal& {aka double&}’ from an rvalue of type ‘qreal {aka double}’
     frame.getPosition(x,y,z);
                            ^
  In file included from /usr/include/QGLViewer/keyFrameInterpolator.h:31:0,
                   from /usr/include/QGLViewer/camera.h:26,
                   from /usr/include/QGLViewer/qglviewer.h:26,
                   from /home/yasin/Desktop/ubuntuPythonShared/LSD_SLAM/rosbuild_ws/package_dir/lsd_slam/lsd_slam_viewer/src/PointCloudViewer.h:26,
                   from /home/yasin/Desktop/ubuntuPythonShared/LSD_SLAM/rosbuild_ws/package_dir/lsd_slam/lsd_slam_viewer/src/main_viewer.cpp:25:
  /usr/include/QGLViewer/frame.h:188:7: note:   initializing argument 1 of ‘void qglviewer::Frame::getPosition(qreal&, qreal&, qreal&) const’
    void getPosition(qreal& x, qreal& y, qreal& z) const;
         ^
  CMakeFiles/viewer.dir/build.make:147: recipe for target 'CMakeFiles/viewer.dir/src/PointCloudViewer.cpp.o' failed
  make[3]: *** [CMakeFiles/viewer.dir/src/PointCloudViewer.cpp.o] Error 1
  make[3]: *** Waiting for unfinished jobs....
  CMakeFiles/viewer.dir/build.make:89: recipe for target 'CMakeFiles/viewer.dir/src/main_viewer.cpp.o' failed
  make[3]: *** [CMakeFiles/viewer.dir/src/main_viewer.cpp.o] Error 1
  make[3]: Leaving directory '/home/yasin/Desktop/ubuntuPythonShared/LSD_SLAM/rosbuild_ws/package_dir/lsd_slam/lsd_slam_viewer/build'
  CMakeFiles/Makefile2:886: recipe for target 'CMakeFiles/viewer.dir/all' failed
  make[2]: *** [CMakeFiles/viewer.dir/all] Error 2
  make[2]: Leaving directory '/home/yasin/Desktop/ubuntuPythonShared/LSD_SLAM/rosbuild_ws/package_dir/lsd_slam/lsd_slam_viewer/build'
  Makefile:116: recipe for target 'all' failed
  make[1]: *** [all] Error 2
  make[1]: Leaving directory '/home/yasin/Desktop/ubuntuPythonShared/LSD_SLAM/rosbuild_ws/package_dir/lsd_slam/lsd_slam_viewer/build'
  /opt/ros/kinetic/share/mk/cmake.mk:7: recipe for target 'all' failed ...
(more)
edit retag flag offensive close merge delete

Comments

how did you solve this?

gapal gravatar image gapal  ( 2016-08-18 08:33:56 -0600 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2016-08-23 11:14:00 -0600

FloFra gravatar image

Just change

float x,y,z;

to

qreal x,y,z;

and it should compile just fine.

edit flag offensive delete link more

Comments

Hi can you please tell which file should be edited replacing float x,y,z; to qreal x,y,z;

Sanjeeth gravatar image Sanjeeth  ( 2017-03-10 05:55:23 -0600 )edit

Question Tools

Stats

Asked: 2016-06-26 08:07:32 -0600

Seen: 1,072 times

Last updated: Aug 23 '16