Skip to content

Fix TF frame id in camera_info of second infrared camera - #3506

Open
exo-core wants to merge 1 commit into
realsenseai:ros2-developmentfrom
exo-core:fix-infra2-camera-info-frame
Open

Fix TF frame id in camera_info of second infrared camera#3506
exo-core wants to merge 1 commit into
realsenseai:ros2-developmentfrom
exo-core:fix-infra2-camera-info-frame

Conversation

@exo-core

@exo-core exo-core commented Apr 1, 2026

Copy link
Copy Markdown

I just noticed that the camera_info topic published for the infra2 camera holds the frame_id of infra1:

$ ros2 topic echo /realsense_forward/infra2/camera_info
header:
  stamp:
    sec: 1775037085
    nanosec: 737094482
  frame_id: realsense_forward_infra1_optical_frame
height: 480

@MartyG-RealSense

Copy link
Copy Markdown

Hi @exo-core This question about the infra1 and infra2 frame_id was previously raised in 2020 in regards to the ROS1 wrapper. My understanding is that the RealSense team member responsible for developing the ROS wrapper at the time opted to remove the infra2 frame_id and have both infras use the same frame_id - please see #1242

I am not part of the current ROS2 wrapper development team though, so do not personally know if this same ID for both infras approach is still used. A member of the ROS dev team will be able to offer advice on this PR.

@exo-core

exo-core commented Apr 1, 2026

Copy link
Copy Markdown
Author

Thanks for pointing this out, @MartyG-RealSense. I wasn't aware that stereo_image_proc expects frame_id to be the target frame after applying stereo rectification. From the documentation of camera_info I expected it to be the source frame:

# Header frame_id should be optical frame of camera

In my case, I was only using the intrinsic calibration and was kinda surprised that TF provided me an identity matrix when querying the transformation between the cameras.
But yeah, it also makes sense to tell where that projection takes your data, when you already have the source frame in your image header...

@Nir-Az
Nir-Az changed the base branch from ros2-master to ros2-development April 5, 2026 19:00
@Nir-Az
Nir-Az requested a review from Gilaadb April 5, 2026 19:00
@Nir-Az

Nir-Az commented Apr 5, 2026

Copy link
Copy Markdown
Collaborator

@exo-core thanks for the PR, can you please make sure you are based on ros2-developemnt branch?
@Gilaadb can you help in reviewing this? I think we touched it lately, right?

@exo-core
exo-core force-pushed the fix-infra2-camera-info-frame branch from 101dfb9 to 4f52b9b Compare April 8, 2026 13:08
@exo-core

exo-core commented Apr 8, 2026

Copy link
Copy Markdown
Author

@exo-core thanks for the PR, can you please make sure you are based on ros2-developemnt branch?

Done. After reading through the threads @MartyG-RealSense linked, I am unsure whether this is still a desired change though...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants