The project opens up a connection with 1 or multiple Flir Chameleon3 cameras. The feed from the camera is transported using image_transport on the ROS2 network. The transport handles the creation of the required topics and publishes, raw feed, compressed feed and information from the camera.
During a test, we see that the ROS2 implementation of the Chameleon Cameras takes about 180% of the CPU usage on AUV8. This is doubled compared to the ROS1 implementation (about 90%).
What was observed using ROS2:
A single camera contributes about 50%
Setting the ROS refresh rate to anything above about 60 does not change anything.
We suspect that the loss of resource optimization results from a bad implementation of the Spinnaker SDK.
The goal of this task is to go over the cam_port_manager and to improve the performance.
The objectif is to go over the implementation of cam_port_manager in ROS2 and to improve performance:
The used chameleon3 camera uses BayerRB8 pixel format as native output for these reasons:
The resource problem in the cam_port_manager comes from the conversion from BayerRB8 to BGR8. The Spinnaker SDK can convert the feed to BGR8, which is the pixel format used accros other systems treating the feed and for image visualization. However the conversion adds about 30-35% resource consummation to cpu compared to usage of about 15-20% when there is no conversion.
The increased resource consumption caused by converting BayerRG8 to BGR8 has been evaluated and is currently within acceptable limits for the system. While this does not present an immediate issue, the added overhead should be kept in mind. Depending on future performance requirements, alternative approaches--such as other conversion methods or upgrading hardware—may be explored.