Advertisement

Ubuntu16.04 install lsd-slam

阅读量:

LSD-SLAM Repo address by TUM:

https://github.com/tum-vision/lsd_slam

When I tried to build LSD-SLAM in Ubuntu16.04, here some problems happened in my machine.

Problem 1

Reference: https://github.com/tum-vision/lsd_slam/issues/222
Hey, I was able to compile lsd_slam on ubuntu 16.04 with ros-kinetic. However, while running lsd_slam_viewer I get following error:

复制代码
    *** Error in `/home/chirag/vision/SLAM-ROS/package_dir/lsd_slam/lsd_slam_viewer/bin/viewer': realloc(): invalid pointer: 0x00007fda0b922820 ***
    ======= Backtrace: =========
    /lib/x86_64-linux-gnu/libc.so.6(+0x77725)[0x7fda0a30a725]
    /lib/x86_64-linux-gnu/libc.so.6(realloc+0x348)[0x7fda0a316f88]
    /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN9QListData7reallocEi+0x1f)[0x7fda056b9a5f]
    /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN9QListData6appendEi+0x81)[0x7fda056b9b31]
    /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(+0x1d7018)[0x7fda05786018] 
    
    
      
      
      
      
      
      
      
    

solution 1

复制代码
    # step 1
    sudo apt-get purge --auto-remove qt5-default
    # step 2
    qglviewer, decompress and cd into the folder, then qmake & make & sudo make install
    # step 3
    rebuild lsd_slam
    
    
      
      
      
      
      
      
      
    

Problem 2

If you compile lsd_slam, and the command line report an error about qreal and float, you can refer as follows. change the variable type from float to qreal as follows.

Solution 2

from mattdinhnguyen

guess you’re also installing on x86_64, I changed as below then it built through:

复制代码
    ~/Workspace/rosbuild_ws/package_dir/lsd_slam/lsd_slam_viewer/src/PointCLoudViewer.cpp:
    326: float x, y, z; // change to —> qreal x, y, z;
    
    ~/Workspace/rosbuild_ws/package_dir/lsd_slam/lsd_slam_viewer/src/PointCLoudViewer.h:
    135: float x, y, z; // change to —> qreal x, y, z;
    
    
      
      
      
      
      
      
    

Problem 3

opencv2/opencv.hpp report error

Solution 3

Ref: https://github.com/FirefoxMetzger/lsd_slam/commit/ee1f6765cbd431c00b057b8624a10a02a6945d1e?diff=split#diff-721aeb1730c0b3c4e1993e6cc203fcfaR32

复制代码
    #include <GL/gl.h>
     #include <GL/glu.h>
     #include <GL/glu.h>
    
    // add comment on the following line
    //#include "opencv2/opencv.hpp"
    
    
     #include "ros/package.h"
     #include "ros/package.h"
    
      
      
      
      
      
      
      
      
      
      
    

全部评论 (0)

还没有任何评论哟~