Open francocipollone opened 3 years ago
The issue appears when building with a linear tolerance that is larger than the lane but less than the road. For example: Linear tolerance = 11.0
It isn't expected to use linear tolerances as high as 11.0
.
So if the XODR forces you to use this value of linear tolerance in order to build the RoadNetwork probably there must be another issue in the XODR, like a jump in some elevation description that is preferable to be fixed in order to improve the XODR description and of course, lower down the tolerance
Probably to improve awareness we could log a warning message when a Lane is smaller than the linear tolerance as it is happening in this case. And that condition isn't necessarily leading to an error. (The case described in this issue is even rarer given that road's length > linear tolerance > lane's length
because of the curvature of the road)
When loading a xodr such as:
Click to see XODR
```xmlRoad's length:
13.944560355298691
Lane -3's length is:2.83998
The issue appears when building with a linear tolerance that is larger than the lane but less than the road. For example: Linear tolerance = 11.0
Error comes from building lane stage.
https://github.com/ToyotaResearchInstitute/maliput_malidrive/blob/0e0b9059d0c3d625b317efbe384d44a4f551b276/maliput_malidrive/src/maliput_malidrive/base/lane.cc#L47-L61
Here we are creating an
OpenRangeValidator
instance using an epsilon oflinear_tolerance / 2.
and of course it throws because of the verification the OpenRangeValidator's constructor does:epsilon = 5.5 = linear_tolerance/2
(min_ + epsilon_) = 5.5
max = 2.83998
--> somin_ + epsilon_
>max
(Throws)