![]() Please find more detailed information below in the section "Choosing a good queue_size" This is the size of the outgoing message queue used for asynchronous publishing. Add additional key-value-pairs to headers for future connections.The message is not copied! If you change the message object after publishing, the change message will be sent to future subscribers. This is useful for slow-changing or static data like a map. When a connection is latched, a reference to the last message published is saved and sent to any future subscribers that connect. ![]() This results in lower latency publishing at the cost of efficiency.Įnable 'latching' on the connection. Receive callbacks via a rospy.SubscribeListener instance when new subscribers connect and disconnect.Įnable TCP_NODELAY on publisher’s socket, which disables Nagle algorithm on TCPROS connections. Subscriber_listener=rospy.SubscribeListener There are additional advanced options that allow you to configure the Publisher: pub = rospy.Publisher('topic_name', std_, queue_size=10) Note: queue_size is only available in Hydro and newer. The only required arguments to create a rospy.Publisher are the topic name, the Message class, and the queue_size. Rospy.Publisher(topic_name, msg_class, queue_size) You can then call publish() on that handle to publish a message, e.g.: pub = rospy.Publisher('topic_name', std_, queue_size=10) The most common usage for this is to provide the name of the topic and the message class/type of the topic. You can create a handle to publish messages to a topic using the rospy.Publisher class. queue_size: publish() behavior and queuing.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |