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,367 times
Last updated: Mar 17 '17
Is it possible to publish msg in rospy.on_shutdown
How to specify port for topic?
How to shutdown a blocked rospy program
Subscriber in /odom topic from gazebo loses first message
getting robot location members to update all the time.
tf.getYaw() in python? [closed]
Difference between rospy.spin and rospy.sleep
TypeError: Cannot compare to non-Duration
Setting rviz topic (publish <pcl::PointCloud<pcl::PointXYZ> >)