Re: [ros-users] Filtering messages at the source

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
+ (text/html)
このメッセージを削除
このメッセージに返信
著者: Patrick Mihelich
日付:  
To: ros-users
題目: Re: [ros-users] Filtering messages at the source
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