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 | ros @ Robotics Stack Exchange |
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...
Asked: 2017-03-17 02:40:38 -0500
Seen: 1,359 times
Last updated: Mar 17 '17
Accessing previous estimated joint states of a robot
message is published delayed (inconsistent)
Reading data from a service via python
Implement shared memory data publishing between nodelets [closed]
Error when packaging a binary .deb file with bloom: file changed as we read it
Using spinOnce inside Services
About Subscriber Structure and “latch” on Publisher
Don't block on rospy.init_node