christianrauch / apriltag_ros

ROS2 node for AprilTag detection
MIT License
149 stars 92 forks source link

Is Synchronization between camera_info and camera topic necessary #40

Open SamuelHafner opened 1 month ago

SamuelHafner commented 1 month ago

Hi @christianrauch,

thanks very much for your amazing work in different ros2 packages.

I wanted to ask, why is the synchronization necessary? Because the camera info information will not change during runtime and so we only need the camera info information (camera matrix etc.) once.

Thank you

christianrauch commented 4 weeks ago

I wanted to ask, why is the synchronization necessary? Because the camera info information will not change during runtime and so we only need the camera info information (camera matrix etc.) once.

That depends on your camera. E.g. if your camera has an optical zoom that changes at runtime, your intrinsics have to adapt. Cameras also have the option to be recalibrated at runtime after which they will/should publish the new calibrated intrinsics. I haven't used such cameras myself yet and I also think that changing intrinsics at runtime is quite uncommon. But nevertheless, this is how the interface is rightfully defined and the image_transport::CameraPublisher for example provides functions to publish the camera image and the camera info at the same time.