We're use the code underneath to register depth images with color images. With this code a registered depth image keeps the time stamp of its original depth image.
However, since the depth image is now registered with the color image, I'd like the registered depth image to adopt the timestamp of the color image as well. Is there a built-in option to do so? Or do we really need to add a second node to make this happen?
register_node = ComposableNodeContainer(
name='container',
namespace='',
package='rclcpp_components',
executable='component_container',
composable_node_descriptions=[
ComposableNode(
package='depth_image_proc',
plugin='depth_image_proc::RegisterNode',
name='register_node',
remappings=[
('depth/image_rect', DEPTH_IMAGE_TOPIC),
('depth/camera_info', DEPTH_CAMERA_INFO_TOPIC),
('rgb/camera_info', COLOR_CAMERA_INFO_TOPIC),
('depth_registered/image_rect', DEPTH_IMAGE_REGISTERED_TOPIC),
('depth_registered/camera_info', DEPTH_CAMERA_INFO_REGISTERED_TOPIC)
],
parameters=[
{'queue_size': 20}
]
),
ComposableNode(
package='depth_image_proc',
plugin='depth_image_proc::PointCloudXyzNode',
name='point_cloud_xyz_node',
remappings=[
('camera_info', DEPTH_CAMERA_INFO_REGISTERED_TOPIC),
('image_rect', DEPTH_IMAGE_REGISTERED_TOPIC),
('points', DEPTH_POINTS_TOPIC)
]
)
],
output='screen',
)