0
$\begingroup$

Rosanswers logo

I m trying to simulate Intel Realsense camera on Asus Tuf A15 with 1650ti GPU and 16GB ram. Whenever I enable pointcloud2 in rviz fps drops to 2-3fps. I guess rviz is not using my GPU. Is there any way to enable the GPU acceleration? I could not find any support.


Originally posted by Saurabh Rahatekar on ROS Answers with karma: 45 on 2022-06-24

Post score: 1


Original comments

Comment by Petros ADLATUS on 2022-06-24:
did you searched it in the web?

https://discourse.ros.org/t/challenges-of-gpu-acceleration-in-ros/19297

Comment by shonigmann on 2022-06-27:
I'm not aware of any ways to force rviz to use a GPU (though they may exist). There is a way to force it to not use a gpu, per http://wiki.ros.org/rviz/Troubleshooting so you could make sure that LIBGL_ALWAYS_SOFTWARE isn't set to true... A few things to check..

  • if you are using Gazebo to simulate the sensor, check that you are using the gazebo_ros_gpu_laser.so plugin and not the default "cpu" variant (gazebo_ros_laser.so)

  • if you start rviz by itself, what is the output related to the graphics drivers? Do you see something like this that indicates that your Nvidia driver is being used?

    [/rviz_1637200062035959003.RenderSystem::detectGlVersion]: OpenGL device: NVIDIA GeForce RTX 3080/PCIe/SSE2 [/rviz_1637200062035959003.RenderSystem::detectGlVersion]: OpenGl version: 4.6 (GLSL 4.6).

  • if not, maybe run nvidia-smi to check that your driver is running

Comment by Saurabh Rahatekar on 2022-07-07:
Thank you so much. I tried reinstalling the Nvidia drivers and it worked.

Comment by shonigmann on 2022-07-07:
Glad that worked out! Just moving my comment to the answers below so this question can be closed.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Update: in this case, the issue was a faulty NVIDIA driver

I'm not aware of any ways to force rviz to use a GPU (though they may exist). There is a way to force it to not use a gpu, per http://wiki.ros.org/rviz/Troubleshooting so you could make sure that LIBGL_ALWAYS_SOFTWARE isn't set to true... A few things to check..

if you are using Gazebo to simulate the sensor, check that you are using the gazebo_ros_gpu_laser.so plugin and not the default "cpu" variant (gazebo_ros_laser.so) if you start rviz by itself, what is the output related to the graphics drivers? Do you see something like this that indicates that your Nvidia driver is being used?

[/rviz_1637200062035959003.RenderSystem::detectGlVersion]: OpenGL device: NVIDIA GeForce RTX 3080/PCIe/SSE2 [/rviz_1637200062035959003.RenderSystem::detectGlVersion]: OpenGl version: 4.6 (GLSL 4.6).

if not, maybe run nvidia-smi to check that your driver is running


Originally posted by shonigmann with karma: 1567 on 2022-07-07

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Saurabh Rahatekar on 2022-07-08:
Yes... Initially, I was checking it using nvidia-smi. I could only see the gazebo using the GPU. After reinstalling the driver RViz finally started using the GPU. Thank you for the coomment.

Comment by ThomasL624 on 2022-11-21:
@Saurabh Rahatekar could you elaborate more which driver you have reinstalled? I am also facing the same issue, when enable pointlcoud2 topic, the fps drops to 1-5fps, I have checked the nvidia-smi is running and cuda 11.6 with cudnn8 is installed. The driver version would be 515. My GPU card is a RTX3090.

How do you know which application is using GPU from Nvidia-smi?

Comment by Saurabh Rahatekar on 2022-11-21:
Open your terminal with dedicated graphics. And then launch the RViz. It will solve ypur problem. Nvidia-smi shows the processes which are using gpu.

Comment by ThomasL624 on 2022-11-21:
What do you mean by that? normally i start up the terminal with default hot keys… Nvidia-smi command can be used in normal terminal.

Comment by Saurabh Rahatekar on 2022-11-21:
Right click on the terminal icon and you will see the dedicated graphics option. Then launch the RViz from that terminal, RViz will start using the GPU.

Comment by ThomasL624 on 2022-11-23:
I only got 3 options (New windows, preference, remove from favorite). I am running on a Ubuntu 20.04 pc

Comment by Saurabh Rahatekar on 2022-11-23:
Yes I m running the same ubuntu version. Try reinstalling the gpu drivers or google your issue. I hope you find the solution.

Comment by ThomasL624 on 2022-11-24:
I will try reinstall the cuda driver on host and see the result

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.