New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pushes Xodr S continuity check to builder #185
base: main
Are you sure you want to change the base?
Pushes Xodr S continuity check to builder #185
Conversation
3d6f002
to
5408322
Compare
@@ -389,11 +389,6 @@ std::unique_ptr<const maliput::api::RoadGeometry> RoadGeometryBuilder::operator( | |||
i, rg_config_.linear_tolerance, rg_config_.angular_tolerance, rg_config_.scale_length, e.what()); | |||
} | |||
Reset(linear_tolerances[i + 1], angular_tolerances[i + 1], scale_lengths[i + 1]); | |||
// @{ TODO(#12): It goes against dependency injection. Should use a provider instead. | |||
maliput::log()->trace("Rebuilding the DBManager"); | |||
manager_ = xodr::LoadDataBaseFromFile(rg_config_.opendrive_file, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This lane can't be removed because when the DoBuild()
method is called, the manager_
instance is moved to RoadGeometry
and in the next iteration the manager_
pointer is invalid.
I will downgrade the PR to draft as I need to take a deeper look in order to avoid re-parsing the xodr in each iteration and the solution doesn't seem to be trivial. |
Addresses #183
Summary
The verification of the xodr s continuity was located at a parser level. Consecuences:
RoadGeometryBuilder
class is dependency-injected with a DBManager instance, however, in order to be able to include this verification the builder is overriding the DBManager in each iteration which goes against the pattern. See.This PR moves the verification from the parser to the builder.
Comments for the reviewers
Reviewing the PR commit by commit is recommended.