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

As lindzey wrote this strongly depends on your needs. Option (1) can result in messages from topic A or B which are not considered for the published topic if they are received faster than your loop sample time.

Option (3) does not really makes sense to me. The results should be the same as Option(2) when you use message B as trigger for publishing a new topic.

An other option would be to use two handlers and publishing a message if either A or B was received. But this would lead to many dublicated messages published. If you receive A and B directly after each other you would first publish with A and the old B and then with A and B.

The best solution depens stronly on your needs!