ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 2012-09-07 07:22:15 -0600

joq gravatar image

Practices like this are rather subjective. Tastes vary.

Personally, I prefer to minimize use of global state variables, or at least reduce their scope to smaller parts of the system.

I recommend the latched publisher approach already mentioned by Christian and Dan. That is easy to implement and should scale well. It is also easy to understand.

I don't normally use the parameter server for mutable global data. But, Dan's idea of using it for restarting the latched publisher (if necessary) makes sense.

Practices like this are rather subjective. Tastes vary.

Personally, I prefer to minimize use of global state variables, or at least reduce their scope to smaller parts of the system.

I recommend the latched publisher approach already mentioned by Christian and Dan. That is easy to implement and should scale well. It is also easy to understand.

I don't normally use the parameter server for mutable global data. But, Dan's idea of using it for restarting the latched publisher (if necessary) makes sense.sense. That actually makes it local to the publisher node ("initial state").