[ros-users] Filtering messages at the source

Patrick Mihelich mihelich at willowgarage.com
Wed Sep 15 21:10:35 UTC 2010


For the specific case of images, we have the polled camera ROS API (
http://www.ros.org/wiki/polled_camera) that allows subscribers to request
images individually. It's offered by the Prosilica camera driver, the main
place we've actually needed it so far. Granted, this is not quite what
you're asking for.

With that being said, my question remains:
> Is it possible to filter the messages before they are actually sent?
> And if so, where do I have to modify ros?
>

Nodelets <http://www.ros.org/wiki/nodelet> might be a reasonable solution.
Basically you rewrite node "A" as a nodelet, which you launch through a
nodelet manager. You also write all of your filters as nodelets, so that you
can instantiate the filters through the same nodelet manager. The filters
are running in the same process as nodelet "A", so there is no serialization
or message copying between them, just passing pointers. In your example,
you'd need a nodelet version of "drop".

Cheers,
Patrick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20100915/c0002139/attachment-0003.html>


More information about the ros-users mailing list