Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong frame_id in /camera/camera/infra2/camera_info #3172

Open
vinaym815 opened this issue Jul 30, 2024 · 6 comments
Open

Wrong frame_id in /camera/camera/infra2/camera_info #3172

vinaym815 opened this issue Jul 30, 2024 · 6 comments

Comments

@vinaym815
Copy link

| Camera Model D415
| ROS Distro Humble

Issue Description

The frame_id on topic /camera/camera/infra2/camera_info is wrongly published as
camera_infra1_optical_frame

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Jul 30, 2024

Hi @vinaym815 In #1242 Doronhi the RealSense ROS1 wrapper creator discusses reasons for having the right camera frame_id for infra2 be equal to that of the left camera (infra1) as this was required by some ROS packages such as StereoCameraModel

@vinaym815
Copy link
Author

vinaym815 commented Jul 30, 2024

Hello @MartyG-RealSense
If we launch the camera using
ros2 launch realsense2_camera rs_launch.py enable_infra1:=true enable_infra2:=true
and echo the topic
ros2 topic echo /camera/camera/infra2/camera_info
we get

header:
  stamp:
    sec: 1722328243
    nanosec: 768045898
  frame_id: camera_infra1_optical_frame
...

The frame id should be camera_infra2_optical_frame

@MartyG-RealSense
Copy link
Collaborator

I recall once seeing a line in the source code of the ROS wrapper that basically said infra2_optical_frame = infra1_optical_frame, hence why the infra1 value was displayed for infra2.

The following method was suggested to get the coordinate transform from right camera to left camera.

ros2 run tf tf_echo camera_infra2_optical_frame camera_infra1_optical_frame

@vinaym815
Copy link
Author

vinaym815 commented Jul 30, 2024

I have a generalized checkerboard detector package which uses CameraInfo topic and Image topic to publish the relevant transform. Wrong frame_id requires making exception case and I want to avoid it.

Also when only enabling the infra2, the published frame_id is correct, i.e. 'camera_infra2_optical_frame'. So I think it is a small bug somewhere.
ros2 launch realsense2_camera rs_launch.py enable_infra1:=false enable_infra2:=true

@MartyG-RealSense
Copy link
Collaborator

I will discuss your question with my Intel RealSense colleagues on the ROS wrapper team. Thanks very much for your patience!

@MartyG-RealSense
Copy link
Collaborator

Hi @vinaym815 My Intel RealSense colleagues on the ROS wrapper team said that they would look at this issue. Thanks very much for your patience!

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

No branches or pull requests

2 participants