is rospy.Publisher.publish() thread safe?
Want to publish() in main and also in child thread on one rospy.Publisher(),is this safe?
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org |
Want to publish() in main and also in child thread on one rospy.Publisher(),is this safe?
Yes, rospy.Publisher() is thread safe.
Before publishing a message it acquires a lock for thread safety and releases it after the message is sent.
You can see the source code here: http://docs.ros.org/api/rospy/html/ro...
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 2017-03-17 02:40:38 -0500
Seen: 1,266 times
Last updated: Mar 17 '17
How can I publish the subscribed and processed msgs in a single node?
How do Publisher/Subscriber Message Queues Work?
Is there a way to control Subscriber callback frequency while using rospy.spin() ?
Loading a file from a python ros node
problem with debug messages in rxconsole
Why does rospy::wait_for_message get stucked even though messages are being published?
TransformListener has unconnected trees
Is there a more elegant way to get the time in seconds in a ROS 2 node?