Get message published before subscriber start
Hello,
I have a publisher node set to publish only once a message right after it started. I have a subscriber node that subscribes to this topic but that is sometimes started a little time after the publisher (so its message is published before the subscriber has started)
How can the subscriber retrieve this message published before it started ?
I feel this may be done with QoS policies. I created the subscription with a QoS History depth of 10 (according to the documentation), but this message is not retrieved (but QoS policies are at least compatible since if a republish regularly the message after the subscriber started I receive it):
m_subMap = this->create_subscription<nav_msgs::msg::OccupancyGrid>("/map", 10, std::bind(&MapDataCallback, this, _1));