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

RNDF SplineLane::GetPositionToLane fix #6690

Conversation

agalbachicar
Copy link
Contributor

@agalbachicar agalbachicar commented Jul 27, 2017

A bug was introduced as part of #6349. SplineLane::GetPositionToLane is a private method and it's used by SplineLane::do_driveable_bounds().

When the Lane belongs to a Segment with multiple Lanes, we should compute the projected GeoPosition of the Lane over the Lanes at the lateral extents of the segment. This projection is done using the curvature radius. SplineLane::GetPositionToLane is in charge of that computation.

Further test coverage for this bug will be covered in a future PR which includes the Builder.


This change is Reviewable

@agalbachicar
Copy link
Contributor Author

+@liangfok for feature review please.

@liangfok liangfok self-assigned this Jul 28, 2017
@liangfok
Copy link
Contributor

+@liangfok for feature review.


Review status: 0 of 1 files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@liangfok
Copy link
Contributor

:lgtm:


Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@sherm1
Copy link
Member

sherm1 commented Jul 28, 2017

+@sherm1 for platform review


Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@sherm1 sherm1 self-assigned this Jul 28, 2017
@sherm1
Copy link
Member

sherm1 commented Jul 28, 2017

The existence of this bug suggests that there is a missing unit test. Can you add one to this PR to verify that it is working now and to make sure no one messes this up in the future?


Review status: all files reviewed at latest revision, 1 unresolved discussion.


drake/automotive/maliput/rndf/spline_lane.cc, line 162 at r1 (raw file):

  // Gets the beginning and ending of the other lane, and then computes the
  // respective GeoPositions.
  const SplineLane* other_lane = static_cast<const SplineLane*>(

This should be a dynamic_cast to verify that the Lane is actually a SplineLane.


Comments from Reviewable

@agalbachicar agalbachicar force-pushed the Issue/RNDF_SplineLane_Fix_GetPositionToLane branch from 6f2cd57 to e2cc951 Compare July 28, 2017 17:50
@agalbachicar
Copy link
Contributor Author

Review status: 0 of 2 files reviewed at latest revision, 2 unresolved discussions.


drake/automotive/maliput/rndf/spline_lane.cc, line 162 at r1 (raw file):

Previously, sherm1 (Michael Sherman) wrote…

This should be a dynamic_cast to verify that the Lane is actually a SplineLane.

Done.


drake/automotive/maliput/rndf/test/spline_lane_test.cc, line 320 at r2 (raw file):

}

// Performs geometric tests over the bounds of a pair of straight lanes.

The proposed test uses driveable_bounds() since that public call, when two or more lanes belong to the same segment, goes through the affected piece of code.


Comments from Reviewable

@agalbachicar
Copy link
Contributor Author

I have addressed all the comments and added a test. PTAL.


Comments from Reviewable

@sherm1
Copy link
Member

sherm1 commented Jul 28, 2017

Great, thanks Agustin! Platform :lgtm:.


Reviewed 2 of 2 files at r2.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@sherm1 sherm1 merged commit 8180b49 into RobotLocomotion:master Jul 28, 2017
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.

3 participants