Ask Your Question
1

Does ROS optimize around unheard messages?

asked 2012-01-03 08:02:23 -0500

luckyeights gravatar image

I'm running ROS on a system with low resources.

If I have a publisher streaming messages to a ROS topic (here, a topic which carries sonar readings), but the topic has no listeners, does ROS handle that data? Or is it moved to temporary storage? What extra load, if any, does the publishing of message introduce to the system?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2012-01-03 10:09:48 -0500

dornhege gravatar image

updated 2012-01-03 10:10:18 -0500

The main overhead is you filling/creating the message + marshalling. If you want to avoid your work: You can check for the getNumSubscribers property in a publisher to prevent doing any work (This is done, for example, in the kinect driver).

Messages should not be stored temporarily unless the topic is latched.

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: 2012-01-03 08:02:23 -0500

Seen: 196 times

Last updated: Jan 03 '12