Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I run the RTAB-MAP by GPU? I hope it can run faster on TX2 . #561

Open
weseu opened this issue Jun 8, 2020 · 11 comments
Open

Can I run the RTAB-MAP by GPU? I hope it can run faster on TX2 . #561

weseu opened this issue Jun 8, 2020 · 11 comments

Comments

@weseu
Copy link

weseu commented Jun 8, 2020

Can I run the RTAB-MAP by GPU? I hope it can run faster on TX2 .
Has any way to let the RTAB-MAP CPU code converse into GPU code.

@matlabbe
Copy link
Member

There is no explicit GPU options for RTAB-Map. You may take a look at OpenCV and PCL libraries for optimization options they can provide. Probably now outdated, but there were some opencv optimizations for Tegra available in jetpack, see https://github.com/introlab/rtabmap_ros/#build-from-source-for-nvidia-jetson

Other approach is to use smaller images, depending on the camera you are using.

@weseu
Copy link
Author

weseu commented Jun 29, 2020

So...It didn't have cuda code now?

well.....did you know have any tools can let the code become cuda code...

@tkircher
Copy link
Contributor

tkircher commented Jul 2, 2020

@weseu There is a significant performance difference in RTAB-Map between the entire support chain (Eigen, OpenCV, VTK, and especially the feature detectors) being built with CUDA support versus without. When you make use of a library that uses CUDA, you are using CUDA.

@cannon281
Copy link

Hi @tkircher and @matlabbe ,

I have been working on installing Rtabmap on Xavier NX (with intel realsense D455), following your advice on (#427 (comment)). As I remember I installed Opencv and VTK with CUDA support. However I built PCL without CUDA.

I managed to get rtabmap working correctly, however when running rtabmap I noticed a significant lag while mapping the 3D point cloud, seems like the lag increases with time to the point where it may take 5 seconds for the 3D point cloud to update to new camera position.

Could I know your experience in this case? It would be helpful if there is any suggestion that can help me run rtabmap in real time.

Thanks a lot :)

@tkircher
Copy link
Contributor

@pramodwic1 I recommend running a profiler to figure out where the CPU is spending so much of its time.

@tugbakara
Copy link

Hi, @tkircher I am planning to pass GPU side of rtabmap but in PCL side I didn't find to where to look or how to look of CUDA support for PCL. I am using Nvidia Jetson AGX.

@tkircher
Copy link
Contributor

@tugbakara There's documentation online for this, see the below link. It essentially requires rebuilding most of the basic libraries from source. When I build rtabmap for Xavier NX, I have to essentially wipe the system and start with NVidia's BLAS and LAPACK, and build Eigen and SuiteSparse and FFTW, all the way up, from source. Otherwise it simply won't work as well as it can. I've benchmarked and profiled rtabmap with different combinations of prebuilt system libraries and there just isn't any other way.

https://pointclouds.org/documentation/tutorials/gpu_install.html

@tugbakara
Copy link

You mean I have to build not only PCL and openCV also the libs that you listed have to be installed with CUDA support and then rtapmap run ,right?

@tkircher
Copy link
Contributor

You mean I have to build not only PCL and openCV also the libs that you listed have to be installed with CUDA support and then rtapmap run ,right?

Yes.

@tugbakara
Copy link

@tkircher , thank you so much! :)

@tugbakara
Copy link

tugbakara commented Nov 22, 2022

Hi @tkircher again!
You mentioned libs for example BLAS,LAPAS,SuiteSparse etc... Is there any reference for them? Or just you searched in github for their source codes to build or is there anything special , if there is could you explain which steps and order did you follow ? I am a bit newbie for this task and when I made a search about it actually there wasn't anything clear for me.
Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants