ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Slam toolbox and Rviz2 slowing down my computer

asked 2023-06-22 18:46:09 -0500

Timothée gravatar image

To describe my problem more accurately, my pc become near unusable when I run slam toolbox and rviz2, with at least 10 seconds between a click and its response (it's really painful)

The robot that I use is a real one, I connect through wifi to it and ssh to launch the node on it but slam and rviz2 run on my computer.

With a simple node to control the robot, they are the only node running and there are no other program that could have a significant impact on the performance

I am running ROS2 foxy on a virtual machine with Kubuntu 20.04

Spec of my PC :

System : Windows 10
Processor           12th Gen Intel(R) Core(TM) i5-1250P   1.70 GHz
Installed RAM   16,0 GB (15,2 GB usable)
System type      64-bit operating system, x64-based processor

Spec of the virtual machine :

12/24 proc core (100 % of the core allocated each)
9110 MB of RAM
128 Mo of video memory

Is it a problem with my computer ? or is the virtual machine reducing too much my performance ?

I can of course do any other manipulation you want, just tell me and I will do it as soon as possible

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2023-07-27 10:29:22 -0500

Timothée gravatar image

I think I resolved most of my performance problems so I will post here how I managed to gain performance :


Virtual Machine specific :

Reducing the number of core, video memory and RAM really improved my performance and I think a good rule of thumb is to not give more than a quarter of your available ressources to the VM. I am currently using 6 cores, 32 Mo and 6 GB of RAM and it work a lot better than before. Check also for any power restriction made by the host on either global performance or your WiFi adapter.


System wide changes :

I discovered online that wifi power saver can be very detrimental to ROS2 performance over WIFI, and I recommend strongly to deactivate it on both end of the ROS2 communication. To do so :

sudo -i gedit /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

Then if you see wifi.powersave = 3, change the 3 to a 2 (it disable powersave), save the file, close gedit and restart your machine.

Check also for any power restriction on either global performance or your WiFi adapter.


ROS2 specfic :

Switching to CycloneDDS seems to work better over WiFi, you can find it here. Limiting the info that was transiting through Wifi can help too, but it can't be done in every scenario.

Now I run all the algorithms on the bot, and only use my pc as a visualization / command sender and I can affirm it work really better.

Hope this will help others who struggle with performances !

edit flag offensive delete link more

Comments

+1 for circling back and answering

billy gravatar image billy  ( 2023-07-27 16:10:01 -0500 )edit

Question Tools

3 followers

Stats

Asked: 2023-06-22 18:46:09 -0500

Seen: 373 times

Last updated: Jul 27 '23