Ask Your Question
3

is ros client c++ code thread safe?

asked 2011-03-14 09:23:27 -0500

SeanPayne gravatar image

updated 2014-01-28 17:09:21 -0500

ngrennan gravatar image

Can I initialize and run the ros C++ client code in it's own thread?

I'm thinking of creating a thread, and in the thread initializing ROS, then having my main loop run there.

I can't see why not, but I thought I'd ask before venturing there. If there is any general guidance on using threads and ros, that would be appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
4

answered 2011-03-14 10:03:29 -0500

tfoote gravatar image

roscpp is threadsafe. There is a summary of the threading model in the roscpp overview on the Callbacks and Spinning page.

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

Stats

Asked: 2011-03-14 09:23:27 -0500

Seen: 2,856 times

Last updated: Mar 14 '11