ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
If you want to cache messages, use a message_filters::Cache.
However, this seems overkill for only storing one message. Also I'm not sure why you need a ring buffer and numpy arrays for that.
Just do last_message_a = msg
in the respective callbacks and store those somewhere globally.