high CPU usage when using ros_ign_bridge

asked 2022-05-05 19:11:04 -0500

raefsel gravatar image

I am looking into using gazebo ignition on a new ROS2 project and am building up an example that is a basic differential drive robot with a lidar on top. The lidar is putting out a laserscan message with only 100 samples. Because this is a ROS2 project, I need to get that data over to my (currently non-existent) ROS2 nodes so I am using ros_ign_bridge to transfer the data. This seems to work fine with cmd_vel messages coming from ROS2 but the lidarscan messages are causing my computer to go nuts with all 16 cores using about 80% of their available CPU cycles if I have a bridge for that topic.

Here is how I am setting up the node in my launch file:


Here is my 'lidar', which is located within my chassis link. It is basically a copy-paste from something I found on the web:

<sensor name='gpu_lidar' type='gpu_lidar'>"
                <pose relative_to='lidar_frame'>0 0 0 0 0 0</pose>

If I just comment out the ros_ign_bridge node in my launch file then the CPU usage is maybe 10%. Is there anything that I can do to make it not consume almost everything my computer has to offer?

I'm pretty sure that I am using the Fortress version of ignition. I'm not sure how to check. Gazebo is saying ignition gazebo 6.9.0

edit retag flag offensive close merge delete