-
Notifications
You must be signed in to change notification settings - Fork 118
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
Image publish subscribe very slow on default ROS2 Humble steup. #757
Comments
There are likely 2 things going on here; slowness in rclpy for publishing, and slowness of For the first one, you can try running with Python optimizations enabled:
(this has been fixed in newer versions of ROS 2 automatically) For the second one, I would try measuring the rate using another tool for now, preferably one written in C++. Also, it might be helpful to try the whole thing in C++, as it is far more performant than Python at the moment. |
@clalancette given that by using cyclone with the specified settings, this issue goes away. I highly doubt that this is related to python. But for completeness I will try this with cpp too. |
FYI @MiguelCompany and @EduPonz. |
If setting the socket buffer sizes solves the issue with Cyclone DDS, I would try the same thing with Fast DDS. You could also set the requested buffer sizes in the XML configuration of Fast DDS as explained here |
@clalancette @MiguelCompany here are something things I have tested:
|
I am experiencing the same issue on Ubuntu 24 + Jazzy. Raw images from usb cam are received (by, e.g., |
Bug report
Required Info:
Steps to reproduce issue
I noticed the issue when using the official Intel Realsense ROS drivers, but it can be reproduced with this simple minimal example.
Test with:
Expected behavior
The subscriber should receive images at 15hz.
Actual behavior
As seen above the images start at 4hz and drop down to almost 1hz on my 13th Gen Intel i7 laptop.
With Cyclone DDS I see a similar issue out of the box, but I can fix it by setting:
sudo sysctl -w net.core.rmem_max=2147483647
None of the suggested settings from https://docs.ros.org/en/humble/How-To-Guides/DDS-tuning.html helped address this.
Additional information
A simple thing like image publishing should work out of the box. Am I missing something?
The text was updated successfully, but these errors were encountered: