ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If I understand you and the code snippet correctly, you are essentially looking for a way to process messages that arrive at different frequencies in a synchronised way. The Orocos code snippet shows a major difference between ROS and Orocos: ROS is purely callback based and there is no real support for something like polled topics, which is essentially what read(..) is giving you in Orocos (see REP-106 for a proposal for this functionality that didn't make it).

Without knowing more about your use case (and thus constraints), an alternative to your manual implementation might be to use the message_filters package. Perhaps the Policy-Based Synchronizers could be used. That should result in a single callback for each synchronised <LowRate, HighRate> msg pair.

The inverse (ie: re-publish LowRate at HighRate frequency), would be what you already have in Node::Update(..), but without checking for the delta T.