Skip to content
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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

francocipollone
Copy link
Collaborator

@francocipollone francocipollone commented Oct 18, 2021

Addresses #183

Summary

The verification of the xodr s continuity was located at a parser level. Consecuences:

  • When the tolerance selection mechanism is enabled, for each iteration the builder is re-parsing all the XML again.
  • 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.

@francocipollone francocipollone force-pushed the francocipollone/move_geometry_contuinity_check branch from 3d6f002 to 5408322 Compare October 18, 2021 14:31
@francocipollone francocipollone removed the request for review from liangfok October 18, 2021 15:08
@@ -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,
Copy link
Collaborator Author

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.

@francocipollone
Copy link
Collaborator Author

francocipollone commented Oct 18, 2021

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.

@francocipollone francocipollone marked this pull request as draft October 18, 2021 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant