0
$\begingroup$

Rosanswers logo

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


Originally posted by RicoJ on ROS Answers with karma: 41 on 2020-08-26

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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

Originally posted by Delb with karma: 3907 on 2020-08-27

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.