ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
 Ask Your Question

Inscribed_radius is not updated by footprint?

As a continuation of this question, I understand that inscribed_radius of a robot is calculated solely based on the robot footprint. Also, my understanding is that inscribed_radius is initialized here.

If my understanding is correct, then inscribed_radius will be minimum of itself and the footprint calculation. See here

Since the inscribed_radius has been initialized as 0.1, then if the footprint inscribed radius is larger than that, inscribed_radius will always remain 0.1. This is consistent with what I have seen in my testing as well.

Thanks, Rico

edit retag close merge delete

1 Answer

Sort by » oldest newest most voted

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

more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Stats

Asked: 2020-08-26 20:09:44 -0600

Seen: 116 times

Last updated: Aug 27 '20