[ros-users] How to get copy of message using MessageEvent callback?

Patrick Bouffard bouffard at eecs.berkeley.edu
Mon Oct 25 17:32:08 UTC 2010


Thanks Josh. I did try a lot of versions of the callback declaration
and the getMessage line, taking away that const for instance but still
could not get it to work. What still puzzles me is that my code is
basically copy & paste from the documentation page that I cited, the
only difference being the message type is control_mode_status (my own
message type) and not std_msgs::String as in the example in the docs.

Pat

On Mon, Oct 25, 2010 at 10:23 AM, Josh Faust <jfaust at willowgarage.com> wrote:
>
> On Mon, Oct 25, 2010 at 10:17 AM, Patrick Bouffard
> <bouffard at eecs.berkeley.edu> wrote:
>>
>> Also a related question: if the MessageEvent style callback is used,
>> does (or can) this defer deserialization until getMessage is called,
>> or skip it altogether (by never calling getMessage)? If not is there a
>> way to keep a subscriber active, and a callback called when messages
>> are received, but to not deserialize them? It seems like, e.g.,
>> ShapeShifter from topic_tools might do the trick--however it doesn't
>> appear to be documented, is the API stable?
>>
>
> MessageEvent does not, something like ShapeShifter is the way to go at this
> point.  I don't know if ShapeShifter itself is considered public API at this
> point.
> Josh
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
>



More information about the ros-users mailing list