Skip to content
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

Very slow hd image publihser (not image transport) for hd image using rclpy #856

Open
HasanFaragRob opened this issue Dec 2, 2021 · 1 comment
Labels
more-information-needed Further information is required

Comments

@HasanFaragRob
Copy link

HasanFaragRob commented Dec 2, 2021

I am writing a ROS2 driver for Basler cameras in rclpy . I have 37 fps hd (1280*720) color stream from pypylon SDK and wanted to publish that data on topic. I observed, it is way slower, after measuring times in python ,we found out that publish times as below

[INFO] [1638433002.797805612] [basler_camera_controller]: 48.58187501667999 ms
[INFO] [1638433002.870013551] [basler_camera_controller]: 54.1074660141021 ms

I see that you use pybind on rcl for rclpy. Maybe the bottleneck there. I did simple check on pybind in general and it is way slower than original implementation. Please guide me if there is a way to have higher publish rate?

Bug report

Required Info:

  • Operating System:
    • Ubuntu 20.04
  • Installation type:
    • binary
  • Version or commit hash:
    • foxy
  • DDS implementation:
    • cyclonedds
  • Client library (if applicable):
    • rclpy

Steps to reproduce issue

publish HD image on rclpy and measure timing on publish

@aprotyas
Copy link
Member

aprotyas commented Dec 2, 2021

Hello, I noticed that you're using the Foxy distribution. Note that ros2/rosidl_python#129 will almost definitely help your case (check ros2/rosidl_python#129 (comment) for some primitive results), but it hasn't been backported to Foxy yet. That effort is underway in ros2/rosidl_python#146 and should land soon!

A couple of other threads that may be relevant at best and only insightful at worst:

Lastly, it may be helpful if you could profile the code and share where the bottlenecks are? Or alternatively, if you could provide an MVP that someone else could use for profiling!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more-information-needed Further information is required
Projects
None yet
Development

No branches or pull requests

3 participants