I'm using composition to leverage IPC to convert ZED Cameras depth maps into virtual laser scans with the depthimage_to_laserscan
package.
The problem is that the defauls QoS of the depthimage_to_laserscan::DepthImageToLaserScanROS
component
are not correctly set and I get this exception when starting the node:
component_container-3] [ERROR] [1701705850.520313066] [zed.zed_depth_to_laserscan]: Component constructor threw an exception: intraprocess communication is not allowed with a zero qos history depth value
[ERROR] [launch_ros.actions.load_composable_nodes]: Failed to load node 'depthimage_to_laserscan' of type 'depthimage_to_laserscan::DepthImageToLaserScanROS' in container '/zed/zed_depth_to_laserscan': Component constructor threw an exception: intraprocess communication is not allowed with a zero qos history depth value
Do you know any workaround to solve this problem?
This is the part of my launch file that generates the problem:
# ZED Wrapper component
zed_wrapper_component = ComposableNode(
package='zed_components',
namespace=camera_name_val,
plugin='stereolabs::ZedCamera',
name=zed_node_name,
parameters=[
# YAML files
config_common_path, # Common parameters
config_camera_path, # Camera related parameters
# Overriding
{
'general.camera_name': camera_name_val,
'general.camera_model': camera_model_val,
'general.svo_file': svo_path,
'general.serial_number': serial_number
}
],
extra_arguments=[{'use_intra_process_comms': True}]
)
# Depth to Laser scan component
zed_cvt_component = ComposableNode(
package='depthimage_to_laserscan',
namespace=camera_name_val,
plugin='depthimage_to_laserscan::DepthImageToLaserScanROS',
name='depthimage_to_laserscan',
parameters=[
config_path_cvt,
# Overriding
{
'output_frame': camera_depth_frame
}],
remappings=[
('depth', zed_node_name_val + '/depth/depth_registered'),
('depth_camera_info', zed_node_name_val + '/depth/camera_info')
],
extra_arguments=[
{
'use_intra_process_comms': True
}
]
)
# ROS 2 Component Container
container = ComposableNodeContainer(
name='zed_depth_to_laserscan',
namespace=camera_name_val,
package='rclcpp_components',
executable='component_container',
composable_node_descriptions=[
zed_wrapper_component,
zed_cvt_component
],
output='screen',
)
```