ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
Ask Your Question
0

is rospy.Publisher.publish() thread safe?

asked 2017-03-17 02:40:38 -0600

dyan gravatar image

Want to publish() in main and also in child thread on one rospy.Publisher(),is this safe?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2017-03-17 03:23:24 -0600

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

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-03-17 02:40:38 -0600

Seen: 1,224 times

Last updated: Mar 17 '17