Example usage of 'headers' argument in rospy.Publisher initialization

asked 2021-04-25 09:00:47 -0500

abhishek47 gravatar image

updated 2021-04-25 09:03:24 -0500

I was checking out the documentation of rospy publisher initialization, more specifically the list of "additional advanced options". How would you use headers and what's a use case for it?

The description says

headers=None (dict)  ==>  Add additional key-value-pairs to headers for future connections.

What does "key-value-pairs to headers" mean? Is it somehow related to Connection Information?

(I was also curious about how to use subscriber_listener and found a good example at Get subscription information. But I couldn't find a similar example for headers.)

edit retag flag offensive close merge delete