Robotics StackExchange | Archived questions

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

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.)

Asked by abhishek47 on 2021-04-25 09:00:47 UTC

Comments

Answers