lsd_slam icon indicating copy to clipboard operation
lsd_slam copied to clipboard

lsd_slam_core and lsd_slam_viewer in Ubuntu 16.04

Open chiragmajithia opened this issue 9 years ago • 14 comments
trafficstars

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] ...

The same issue can be seen here.

As, suggested in issue#33 -- my libqglviewer2 is already the newest version (2.6.3+dfsg1-1).

However, I think the rosrun lsd_slam_core live_slam image:=/image_raw camera_info:=/camera_info is running with following output:

Received ROS Camera Calibration: fx: 254.326950, fy: 375.934387, cx: 267.381897, cy: 231.599091 @ 640x480 RECEIVED ROS camera calibration! Started mapping thread! Started constraint search thread! Started optimization thread Doing Random initialization! started image display thread! Done Random initialization! init done QObject::startTimer: Timers cannot be started from another thread TRACKING LOST for frame 1175 (0.01% good Points, which is 100.00% of available points, DIVERGED)! QObject::killTimer: Timers cannot be stopped from another thread QObject::startTimer: Timers cannot be started from another thread

There is nothing echoed from /lsd_slam/pose .. There are no tfs published so that I can use them to view in rviz. I am relatively new to using ROS -- is it possible to get the package running on 16.04 kinetic system?

I had to change couple of lines in /lsd_slam_viewer/src/PointCloudViewer.cpp and /lsd_slam_viewer/src/PointCloudViewer.h

from float x,y,z to qreal x,y,z beforeqreal x,y,z; camera()->frame()->getPosition(x,y,z); function is called

to make the package compile sucessfully.

chiragmajithia avatar Oct 17 '16 04:10 chiragmajithia

Did u make any progress with this

sagarwal-atg avatar Nov 05 '16 20:11 sagarwal-atg

Not yet..

chiragmajithia avatar Nov 07 '16 18:11 chiragmajithia

The issue is caused by a conflict between versions 4 and 5 of Qt. I fixed it by following this instructions. I did not uninstall Qt 5 nor did I manually compiled libQGLViewer. I just removed the symlinks to libQGLviewer.so.2.6.3 and created new ones that point to libQGLViewer-qt4.so.2.6.3.

martinarroyo avatar Nov 27 '16 12:11 martinarroyo

I also followed this as @martinarroyo except that i didn't setup the soft symlinks:

  1. sudo apt-get purge --auto-remove qt5-default
  2. qglviewer, decompress and cd into the folder, then qmake & make & sudo make install
  3. rebuild lsd_slam

blindnote avatar Nov 28 '16 05:11 blindnote

@blindnote your solution works for compilation, but when launching the viewer it is not working, nothing is shown on the window.

mrmouss avatar Dec 14 '16 13:12 mrmouss

@mbennehar is your issue the same with this?

blindnote avatar Dec 26 '16 06:12 blindnote

@blindnote yes it is the same error. I fixed it by removing some wait returns in one cpp file (sorry but I don't remember which one or which lines). This only fixed the pointcloud viewer. The window showing depth pixels never showed up. It should be noted that I'm using a catkin version of this package on Ubuntu 16.04 on ROS kinetic. On a virtual machine running Ubuntu 14.04 and ROS indigo, everything worked just fine.

mrmouss avatar Dec 26 '16 21:12 mrmouss

Same issue here... Qt 5.8.0 under Ubuntu 16.04.1

Any solutions?

Cheers Pei

jiapei100 avatar Jan 28 '17 10:01 jiapei100

@jiapei100
I installed ros-indigo to ubuntu 16.04 from src, and installed lsd_slam under ros-indigo workspace. I seems working well. (I have encountered a issue https://github.com/tum-vision/lsd_slam/issues/237 when compiling ros-indigo )

tsuyony avatar Feb 20 '17 02:02 tsuyony

I experienced the same issue (on a 16.04 LTS with kinetic) and solved it by following something similar to @martinarroyo .

sudo apt remove libqglviewer-dev sudo apt install libqglviewer-dev-qt4 cd /usr/lib/x86_64-linux-gnu sudo ln -s libQGLViewer-qt4.so libQGLViewer.so

cd catkin_ws catkin clean catkin build lsd_slam_viewer

rosrun lsd_slam_viewer viewer

jeremyfix avatar Mar 11 '17 14:03 jeremyfix

someone solved this mistake: QObject::startTimer: Timers cannot be started from another thread ^CQObject::~QObject: Timers cannot be stopped from another thread

EduardoTayupanta avatar Sep 12 '17 15:09 EduardoTayupanta

@jeremyfix @mbennehar Hi, friends. so desperate! rosmake LSD-slam, I had to change couple of lines in /lsd_slam_viewer/src/PointCloudViewer.cpp: 326 and /lsd_slam_viewer/src/PointCloudViewer.h:135

326:from float x,y,z to double x,y,z camera()->frame()->getPosition(x,y,z);

135:from float x,y,z to double x,y,z After this, rosmake again. some error occurs!! may u give me some advice? thank u very much! 2018-01-20 14-34-44

jsYangCode avatar Jan 20 '18 06:01 jsYangCode

Maybe the Eigen3 version leads to this question, I have replaced my Eigen3.3 with Eigen3.2.9, after compile, its fixed.

johnchars avatar Mar 27 '19 01:03 johnchars

I also followed this as @martinarroyo except that i didn't setup the soft symlinks:

  1. sudo apt-get purge --auto-remove qt5-default
  2. qglviewer, decompress and cd into the folder, then qmake & make & sudo make install
  3. rebuild lsd_slam

thanks for ur advice. However, when I input the first demand, bash says Package 'qt5-default' is not installed, so not removed. but I do find qt5 in PC.

Cielyuy avatar Dec 23 '19 11:12 Cielyuy