Re: [ros-users] callback function on one topic with differen…

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
Delete this message
Reply to this message
Author: Josh Faust
Date:  
To: Radu Bogdan Rusu, ros-users
Subject: Re: [ros-users] callback function on one topic with different message types
On Tue, Mar 23, 2010 at 8:49 AM, Radu Bogdan Rusu <>wrote:

> Though _not_ recommended, and if you really _cannot_ define multiple
> message types and multiple topics, _and_ if you
> only get one of the two types of messages for the entire duration while
> your node is up, you can get rid of the flag,
> and just subscribe to the same topic twice using different callbacks and
> different message types. The callback that
> answers first should invalidate the other. You can see an example of this
> working in point_cloud_converter.
>
>

If this works it's only by accident, and is not guaranteed to work in the
future. I strongly recommend you don't rely on it (including in
point_cloud_converter).

Actually, a quick test shows that it does not work (first subscription wins)
so relying on it is definitely a bad idea.

Josh