Skip to content

CPU usage 4x higher in ROS 2 than ROS 1 #2031

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

Open
Ryanf55 opened this issue Apr 22, 2025 · 2 comments
Open

CPU usage 4x higher in ROS 2 than ROS 1 #2031

Ryanf55 opened this issue Apr 22, 2025 · 2 comments

Comments

@Ryanf55
Copy link

Ryanf55 commented Apr 22, 2025

Description

Hello,

When testing the same MAVROS set of plugins and stream rates, we observe MAVROS on ROS 2 using 4x the CPU usage of ROS1.
Is this expected, or are there any mitigations?

Enabled Plugins:

/mavros/cmd
/mavros/debug_value
/mavros/distance_sensor
/mavros/geofence
/mavros/global_position
/mavros/gps_input
/mavros/gpsstatus
/mavros/guided_target
/mavros/imu
/mavros/local_position
/mavros/mavros
/mavros/mavros_node
/mavros/mavros_router
/mavros/mission
/mavros/nav_controller_output
/mavros/rangefinder
/mavros/rc
/mavros/setpoint_raw
/mavros/sys
/mavros/terrain
/mavros/time
/mavros/transform_listener_impl_aaab0c310108
/mavros/vfr_hud
/mavros/wind

ROS DIstro: Jazzy
Middlware: FastDDS

Best,
Ryan

ROS 1

TBD

ROS 2 top

Image

@vooon
Copy link
Member

vooon commented Apr 25, 2025

Well, ROS2 version is by design have more nodes as of each plugin is a node.
DDS also can have more consumption, don't know. Ideally i'd like to see something OTEL for ROS2.

@Ryanf55
Copy link
Author

Ryanf55 commented Apr 25, 2025

I'll do my best to find a way to reproduce this in SITL, outside of our hardware. We suspect that changing executors may help.

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

2 participants