ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I understand that inscribed_radius of a robot is calculated solely based on the robot footprint.

You are absolutly right the inscribed_radius is calculated in the function calculateMinAndMaxDistances that you linked. The part about the inscribed_radius initialized at 0.1 is correct too but it's just in order to have a default value in case you don't call calculateMinAndMaxDistances.

then inscribed_radius will be minimum of itself and the footprint calculation

You've missed something in the function , the first instruction is :

min_dist = std::numeric_limits<double>::max();

So the inscribed_radius isn't equal to 0.1 anymore (std::numeric_limits<double>::max() returns DBL_MAX which is the maximum possible value for a double : 1.79769e+308, check here for more details). It's set to this value in order to make sure that when you call :

min_dist = std::min(min_dist, std::min(vertex_dist, edge_dist));

min_dist can only be equal to std::min(vertex_dist, edge_dist) (or DBL_MAX), since vertex_dist and edge_dist are calculated from the footprint the inscribed_radius changes according to the footprint.

This is consistent with what I have seen in my testing as well

You might not have changed the footprint (or just a little bit) when testing this, I tried with a circular footprint and I got these results :

robot_radius = 0.14 >> inscribed_radius = 0.13731
robot_radius = 1.14 >> inscribed_radius = 1.1181