Comments (16)
Yup @fulkast usage was the issue... Just did cv::waitKey(30);
and both windows worked like a charm... Thanks a lot for the tip.
DebugWindow Depth result
PointCloud Viewer Result
from lsd_slam.
Are you talking about the grayed out DepthMap window that pops up?
If yes, I haven't gotten that to work either. I have been using the library as a visual odometry source with ROS and it's working as expected.
from lsd_slam.
Thanks for the quick reply!
I was interested in observing the depth map to see if we could use lsd_slam for our project which is set up on kinetic.
Not to worry! I'll see if i can install lsd on indigo just to test it, or use Rviz in some way.
Thanks again
from lsd_slam.
The windows version of that code had no concept of reference frames or a viewport and it looked like a placeholder. I think RViz is your best bet to test the KeyFrames. As far as I can remember, the keyframes and frames (and their clouds) are being processed and transformed from world to camera properly or at least it is easy to handle that with a few calls to ros.tf in ROS
from lsd_slam.
@kevin-george I have gotten the DepthMap to work on my machine. This is a similar issue that has been faced by ORB-SLAM on Ubuntu 16.04 as well.
While I don't know the exact low-level issue, from a higher level, I think this happens because of clashes between different Qt threads. One such thread is the one in charge of displaying the depthMap. I traced the Util::displayImage
method which displays the depthMap and it eventually led to the cv::namedWindow
method. I think that if your OpenCV was compiled with Qt, then calling namedWindow
would generate a Qt thread. This then would clash with some other Qt thread in charge of another SLAM task.
This is my hypothesis. The things I haven't check are the follows:
- Is ros-kinetic-opencv3 built with Qt?
- Which qt threads are active in other LSD-SLAM tasks?
For now this one thing is certain. I have removed my ros-kinetic-opencv3, pulled cv-bridge from github into my catkin_ws and also built and installed OpenCV 3 from source without Qt.
The depthMap display works on my machine Ubuntu 16.04 and I don't get any errors regarding QObject.
from lsd_slam.
@fulkast Thank you for that tip! I'll be trying to fix this without having to re-install opencv. If you find a way to do that, please do let me know :)
from lsd_slam.
@kevin-george Good call! Installing OpenCV from source takes quite some time. I lucked out as I already had a version of OpenCV installed which didn't have Qt.
Are you using OpenCV 3 installed through the ros-kinetic-opencv3
package?
from lsd_slam.
Yeah, ROS ported over to opencv3 and I'm using the default package.
I wonder if we can get away with not installing Qt and use the one installed with ROS instead? Seems like the easiest fix(no code fixes that is)
from lsd_slam.
Has anyone found a way to fix this? I am trying to use lsd slam as a vision based odometry solution (for drone). How did you use the odometry? I keep losing trace after a few seconds of starting lsd slam.
from lsd_slam.
Hello! @kevin-george Did you find any solution for displaying depth map without removing ros-kinetic-opencv3
?
from lsd_slam.
Hello! @kevin-george @fulkast
I have found a solution to DepthMap window greyed out issue. Got a hint of the issue from herehttp://answers.opencv.org/question/174121/v33-imshow-no-response/.
With issue#2 resolved from the pull request#8, i have added cv::waitKey();
here:- void displayThreadLoop() . . } cv::imshow(displayQueue.back().name, displayQueue.back().img); cv::waitKey(); displayQueue.pop_back(); } . . printf("ended image display thread!\n"); }
in file "~/catkin_ws/src/lsd_slam/lsd_slam_core/src/IOWrapper/OpenCV/ImageDisplay_OpenCV.cpp".
And pressing hotkey "d" or "e" while DepthMap window is selected. DepthMap as well as Point Cloud both gets updated.
Now if you can help me out why there is need to press this hotkey for this to work? What can i add to the code so it can run by itself?
Thanks
from lsd_slam.
@abdur4373 if you just added an integer to the cv::waitKey() function , that isn't 0.
That is for example, use:
cv::waitKey(1);
Here's a detailed explanation of the waitKey function: https://stackoverflow.com/questions/5217519/what-does-opencvs-cvwaitkey-function-do
from lsd_slam.
@abdur4373 Didn't work for me :(
Tried with different values but no luck!
I'm on kinetic.
from lsd_slam.
@abdur4373 Didn't work for me :(
Tried with different values but no luck!
I'm on kinetic.
same to yours, have you found the solution? thx
from lsd_slam.
Yup, @fulkast usage was the issue... I just did
cv::waitKey(30);
and both windows worked like a charm... Thanks a lot for the tip.
DebugWindow Depth result
PointCloud Viewer Result
@abdur4373, writing cv::waitKey(30)
there got my depth window working, but it seems like it 'refreshes' only when a key is pressed. How do I get it working automatically? Any leads?
from lsd_slam.
@Kanishk598 that should not be the case, cv::waitKey(30)
will wait for a key for 30 ms. Somehow you are waiting for a key forever, then
from lsd_slam.
Related Issues (17)
- Master/ catkin workspace
- [rosrun] Couldn't find executable named dataset_slam below /home/roshnee/catkin_ws/src/lsd_slam/lsd_slam_core HOT 1
- Omnidirectional Cameras
- SLAM to work with TUM RGB .bag files
- Failing to build g2o_types_sim3 - undefined reference to `g2o::OptimizableGraph::addVertex(g2o::HyperGraph::Vertex*, g2o::HyperGraph::Data*)'
- Linking error HOT 1
- Segmentation fault (core dumped) when running lsdc_slam node HOT 2
- main_on_images is almost 300x slower than main_live_odometry HOT 1
- Nothing is displayed in PointcloudViewer. HOT 10
- Viewer's pointcloud is 2d HOT 1
- Can't build since Qt is unsuitable HOT 1
- Consistently Aborting with memory dump HOT 3
- LSDParamsConfig.h HOT 7
- [rospack] Error: package 'lsd_slam_core' not found
- live_slam window doesnt pup up. Not showing the window with color-coded depth (from live_slam). HOT 2
- make failed in ubuntu 16.04 ros-k with jetson tx2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lsd_slam.