AprilRobotics / apriltag_ros

A ROS wrapper of the AprilTag 3 visual fiducial detector
Other
373 stars 339 forks source link

ROS Service Enhancement for the Single Image Detector Node #86

Open swiz23 opened 3 years ago

swiz23 commented 3 years ago

Could there be another type of Service where instead of pointing to a picture file, you put the actual picture in the Service message as a sensor_msgs/Image type?

For my application, all images are coming from a ROS topic that my node subscribes too. It seems more intuitive to just stick the latest image into the Service message than to save the image to a file and pass the file location to the single image detector node. I'd rather not use the continuous detector node since I don't want the overhead, and my application only needs to get a single shot of the AR tag.

Thanks

christian-rauch commented 3 years ago

I agree that the implementation of the single image detector is weird and its usage is cumbersome. For analysing a single image file, using a standalone executable (with ROS etc.) that reads the image file from disk and writes the result to stdout would be more appropriate.

I would suggest removing the ROS service for analysing images from files and just provide an executable or python script in the apriltag repo for this task.

@swiz23 A workaround is to send single non-continuous images via a different topic. This way you avoid the continuous detection but can keep the service call behaviour. You just have to synchronise the request and the response by the timestamp in the headers.