Recieve last Message on topic after subscription
Hey guys,
i am developing a Plugin for rviz, and I want to have the last message that was sent on a topic when i subscribe to this topic.
The idea is, that I am in rosbag replay and i want to evaluate the values of my sensors when the replay is stopped.
The way to achieve this is - in my eyes - to request the last message that has been sent on the topic.
Is there any way to do that? BTW, i am using c++
Happy Coding,
Johannes