ResizeNode subscribes and publishes camera info on the same topic
Seems like a dumb question, but I can't find the answer.
I see that image_proc::ResizeNode subscribes to /camera_info, and then generates a new CameraInfo message with the scaled intrinsics. But it publishes this scaled camera info on the the same topic. The messages are identical except for fx, fy, cx and cy. How can a downstream node tell them apart? How does this work with image_transport?
Thanks.
That doesn't sound like what should be happening.
it would not be able to. Or at least not in any scalable way.
Could you link to the code (as in: specific lines)? I'm assuming you're looking at the default implementation, which is hosted in a Github repository.
ROS2 version uses an image_transport::CameraPublisher and an image_transport::CameraSubscriber:
https://github.com/ros-perception/ima...
Both of these call image_transport::getCameraInfoTopic:
CameraSubscriber: https://github.com/ros-perception/ima...
CameraPublisher: https://github.com/ros-perception/ima...
image_transport::getCameraInfoTopic basically always returns "/camera_info":
https://github.com/ros-perception/ima...
This looks like a bug to me. It seems funny that this hasn't been noticed before, though.
ROS1 is different... it uses a private node handle for pub and node handle for sub. It's been a while since I've used ROS1, perhaps it's possible to distinguish between them through remapping?
https://github.com/ros-perception/ima...
Looks like a bug has already been reported: https://github.com/ros-perception/ima...