maliput / maliput_malidrive

Open-source ready OpenDrive backend for Maliput
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

PlanView's xodr S continuity check falling outside the tolerance selection mechanism #183

Open francocipollone opened 2 years ago

francocipollone commented 2 years ago

Summary

When the tolerance selection mechanism is working the RoadGeometryBuilder reset the linear tolerance and try to build the RoadGeometry again.

However, ~there is one check that is falling outside of that reassign of linear tolerances and it happens at a parser level~.(EDITED: See https://github.com/ToyotaResearchInstitute/maliput_malidrive/issues/183#issuecomment-945841189)

https://github.com/ToyotaResearchInstitute/maliput_malidrive/blob/f93c0e4ec4be5d229760cdfda5cb3c4c1255db4d/maliput_malidrive/src/maliput_malidrive/xodr/parser.cc#L774-L778

Given that the DBManager is injected into the RoadGeometryBuilder and the parsing is only made once.

https://github.com/ToyotaResearchInstitute/maliput_malidrive/blob/f93c0e4ec4be5d229760cdfda5cb3c4c1255db4d/maliput_malidrive/src/maliput_malidrive/builder/road_network_builder.cc#L52-L55

Proposal

This verification should be pushed into the RoadGeometryBuilder instead.

francocipollone commented 2 years ago

https://github.com/ToyotaResearchInstitute/maliput_malidrive/blob/f93c0e4ec4be5d229760cdfda5cb3c4c1255db4d/maliput_malidrive/src/maliput_malidrive/builder/road_geometry_builder.cc#L379-L383

This check is actually within the scope of the tolerance selection mechanism. I hadn't realized this because of this reassign that goes against dependency injection.

Pushing this verification from the parser to the building will improve time given that just for that check we are rebuilding the DBmanager(therefore parsing the XML) for each iteration.