Message type between publisher and subscriber

asked 2019-02-13 20:44:41 -0500

studennis gravatar image

updated 2019-02-13 23:26:15 -0500

jayess gravatar image

Hi, all! I have a question about the message type between publisher and subscriber with the same topic.

What is the mechanism when publishing a normal type message (std_msg::String) and we can subscribe the message with normal type (std_msg::String) so as the shared_ptr version of it (std_msg::StringConstPtr)?

For example : in the publisher and subscriber tutorial

The publisher publish the normal type while the subscriber subscribe the shared_ptr type.

Thanks!

edit retag flag offensive close merge delete