ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
total_min_distance = 100000.0 // some high value
while (node.ok())
{
... // calculate your current mindistance
if (mindistance < total_min_distance)
total_min_distance = mindistance;
}
std::cout << "Minimum distance in whole run: " << total_min_distance << std::endl;
This gives you the minimum distance of the time the node was running when the node is shutting down.