Hi,
I cannot align depth frames to color when receiving camera’s stream over ros topic.
I’m using the GitHub - IntelRealSense/realsense-ros: Intel(R) RealSense(TM) ROS Wrapper for Depth Camera package, it provides following topics:
/color/camera_info
/color/image_raw
/color/metadata
/depth/camera_info
/depth/image_rect_raw
/depth/metadata
/extrinsics/depth_to_color
/extrinsics/depth_to_infra1
/extrinsics/depth_to_infra2
/imu
/infra1/camera_info
/infra1/image_rect_raw
/infra1/metadata
/infra2/camera_info
/infra2/image_rect_raw
/infra2/metadata
/parameter_events
/rosout
/tf_static
When I use the camera directly this code snippet (simplified) works fine
import pyrealsense2 as rs
pipeline = rs.pipeline()
align_to = rs.stream.color
align = rs.align(align_to)
while True:
# Get frameset of color and depth
frames = pipeline.wait_for_frames()
# Align the depth frame to color frame
aligned_frames = align.process(frames)
# Get aligned frames
aligned_depth_frame = aligned_frames.get_depth_frame()
But when I subscribe to /depth/image_rect_raw and /color/image_raw there is obviously no pipeline and all my attempts to align failed so far.
Could someone suggest how to solve this?
Thanks