vision_opencv
vision_opencv copied to clipboard
High RAM usage when importing cvBridge on python3
Hi!
I'm currently using cvBridge with ROS2 Foxy and python 3.8.5 on Ubuntu 20.04 / Docker. I installed the cv bridge library using apt-get install ros-foxy-cv-bridge
However importing cvBridge on a Python node increases ~130MB its RAM consumption. To reproduce this issue just open python in a terminal and type from cv_bridge import CvBridge
while monitoring the RAM usage of the process.
after tracing down the increase, I found out that the line from cv_bridge.boost.cv_bridge_boost import getCvType
placed here uses 128MB.
I'm only using the imgmsg_to_cv2
function, so importing the library should not consume this much.
Thanks for your help!