-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 Spline lane implementation #6349
RNDF Spline lane implementation #6349
Conversation
be42332
to
0cd8876
Compare
+@liangfok for feature review please. |
Checkpoint. Reviewed 5 of 10 files at r1. drake/automotive/maliput/rndf/segment.h, line 36 at r1 (raw file):
"is a" should be "A". drake/automotive/maliput/rndf/spline_lane.h, line 48 at r1 (raw file):
Delete "of the". drake/automotive/maliput/rndf/spline_lane.h, line 59 at r1 (raw file):
Doxygen requires that either all or none of the parameters are documented. Partial documentation results in a Doxygen warning like the following:
After generating the Doxygen website, the warnings are stored in drake/automotive/maliput/rndf/spline_lane.h, line 61 at r1 (raw file):
"the knot tangent value" should be "their tangents" drake/automotive/maliput/rndf/spline_lane.h, line 61 at r1 (raw file):
"are a" should be "A" since this section is rendered as a table. drake/automotive/maliput/rndf/spline_lane.h, line 78 at r1 (raw file):
"It computes" should be "Computes". drake/automotive/maliput/rndf/spline_lane.h, line 81 at r1 (raw file):
"are a" should be "A". drake/automotive/maliput/rndf/spline_lane.h, line 82 at r1 (raw file):
"They must be at least two." should be "There must be at least two control points." drake/automotive/maliput/rndf/spline_lane.h, line 82 at r1 (raw file):
BTW, consider documenting what happens if less than two control points are provided. Is an exception thrown? Does the program abort? drake/automotive/maliput/rndf/spline_lane.h, line 86 at r1 (raw file):
"points" should be "control_points" to match the Doxygen comment. drake/automotive/maliput/rndf/spline_lane.h, line 89 at r1 (raw file):
The phrase "measure of the curvature" indicates to me that this is a value that is determined based on the properties of a particular spline instance. However, the returned value is a constant. Should "desired" be inserted before "curvature"? drake/automotive/maliput/rndf/spline_lane.h, line 94 at r1 (raw file):
"arc" should be "path". drake/automotive/maliput/rndf/spline_lane.h, line 96 at r1 (raw file):
BTW, consider replacing "s,r,h frame" with "api::LanePosition" since that'll be more specific. drake/automotive/maliput/rndf/spline_lane.h, line 101 at r1 (raw file):
BTW, consider adding a TODO comment indicating that this method needs to be implemented. drake/automotive/maliput/rndf/spline_lane.h, line 106 at r1 (raw file):
BTW, consider replacing "given" with "at". drake/automotive/maliput/rndf/spline_lane.h, line 113 at r1 (raw file):
BTW, typo: "th". drake/automotive/maliput/rndf/spline_lane.h, line 114 at r1 (raw file):
Add "The" before "s coordinate". drake/automotive/maliput/rndf/spline_lane.h, line 115 at r1 (raw file):
Delete "processed". drake/automotive/maliput/rndf/spline_lane.h, line 120 at r1 (raw file):
I'm not sure what "scale through the chain rule" means in this context. How does this impact the returned value's accuracy? drake/automotive/maliput/rndf/spline_lane.h, line 125 at r1 (raw file):
"It will provide" should be "Provides". (Same comment below.) drake/automotive/maliput/rndf/spline_lane.h, line 126 at r1 (raw file):
"will provide" should be "provides" (Same comment below.) drake/automotive/maliput/rndf/spline_lane.h, line 127 at r1 (raw file):
"a" should be "an". (Same comment below.) drake/automotive/maliput/rndf/spline_lane.h, line 127 at r1 (raw file):
"arc" should be "path". (Same comment below.) drake/automotive/maliput/rndf/spline_lane.h, line 139 at r1 (raw file):
Delete "evaluates at". drake/automotive/maliput/rndf/spline_lane.h, line 174 at r1 (raw file):
"results" should be "result". drake/automotive/maliput/rndf/spline_lane.h, line 186 at r1 (raw file):
This comment can be deleted since the code appears to be self documenting. Comments from Reviewable |
eb207ce
to
efab030
Compare
Review status: 3 of 10 files reviewed at latest revision, 26 unresolved discussions. drake/automotive/maliput/rndf/segment.h, line 36 at r1 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 48 at r1 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 59 at r1 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 61 at r1 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 61 at r1 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 78 at r1 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 81 at r1 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 82 at r1 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 82 at r1 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. Added also the throw to the class constructor. drake/automotive/maliput/rndf/spline_lane.h, line 86 at r1 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. Copied the comment from the class constructor as it's the same. drake/automotive/maliput/rndf/spline_lane.h, line 89 at r1 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. Thanks for the suggestion. drake/automotive/maliput/rndf/spline_lane.h, line 94 at r1 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 96 at r1 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 101 at r1 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 106 at r1 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 113 at r1 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 114 at r1 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 115 at r1 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 120 at r1 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
I wanted to emphasize that api::LanePosition is depicted as non-isotropic in the Maliput design document, however on the current implementation it is and no scale change should be done to the velocity. drake/automotive/maliput/rndf/spline_lane.h, line 125 at r1 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 126 at r1 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 127 at r1 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 127 at r1 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 139 at r1 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 174 at r1 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 186 at r1 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. Comments from Reviewable |
Checkpoint. Reviewed 1 of 10 files at r1, 1 of 6 files at r2, 1 of 1 files at r3. drake/automotive/maliput/rndf/segment.h, line 28 at r3 (raw file):
"to name this segment" should be "This segment's ID." drake/automotive/maliput/rndf/segment.h, line 29 at r3 (raw file):
should be:
drake/automotive/maliput/rndf/segment.h, line 35 at r3 (raw file):
should be:
drake/automotive/maliput/rndf/segment.h, line 39 at r3 (raw file):
"is the" should be "The". drake/automotive/maliput/rndf/segment.h, line 40 at r3 (raw file):
What is "the default assigned value by this code"? drake/automotive/maliput/rndf/segment.h, line 43 at r3 (raw file):
BTW, consider adding "that was added to this Segment" after "SplineLane". drake/automotive/maliput/rndf/segment.h, line 44 at r3 (raw file):
Missing the exception type after "@throws". https://www.stack.nl/~dimitri/doxygen/manual/commands.html#cmdthrows drake/automotive/maliput/rndf/spline_lane.h, line 120 at r1 (raw file):
drake/automotive/maliput/rndf/spline_lane.h, line 59 at r3 (raw file):
drake/automotive/maliput/rndf/spline_lane.h, line 60 at r3 (raw file):
BTW, consider deleting "value of the". drake/automotive/maliput/rndf/spline_lane.h, line 65 at r3 (raw file):
Can the order of the parameters in this section be made to match the order of the parameters in the method's signature? drake/automotive/maliput/rndf/spline_lane.h, line 84 at r3 (raw file):
drake/automotive/maliput/rndf/spline_lane.h, line 90 at r3 (raw file):
drake/automotive/maliput/rndf/spline_lane.h, line 149 at r3 (raw file):
BTW, consider deleting "distance" since it's implied by "path length". Comments from Reviewable |
Checkpoint. Reviewed 2 of 6 files at r2. drake/automotive/maliput/rndf/spline_lane.cc, line 13 at r3 (raw file):
BTW, consider replacing "is set to provide" with "specifies". drake/automotive/maliput/rndf/spline_lane.cc, line 13 at r3 (raw file):
BTW, consider deleting "the" before "ArcLengthParamterizedSpline". drake/automotive/maliput/rndf/spline_lane.cc, line 14 at r3 (raw file):
should be:
drake/automotive/maliput/rndf/spline_lane.cc, line 15 at r3 (raw file):
BTW, "the spline's parameter" may be confusing. Consider explicitly stating which parameters. drake/automotive/maliput/rndf/spline_lane.cc, line 17 at r3 (raw file):
What are "the general dimensions involved"? drake/automotive/maliput/rndf/spline_lane.cc, line 17 at r3 (raw file):
delete "as". drake/automotive/maliput/rndf/spline_lane.cc, line 27 at r3 (raw file):
BTW, consider replacing "It first creates" with "Creates". drake/automotive/maliput/rndf/spline_lane.cc, line 27 at r3 (raw file):
"its" should be "their". drake/automotive/maliput/rndf/spline_lane.cc, line 28 at r3 (raw file):
BTW, "std::unique_ptrignition::math::Spline" can be replaced by "auto" since the type is clear. https://google.github.io/styleguide/cppguide.html#auto drake/automotive/maliput/rndf/spline_lane.cc, line 37 at r3 (raw file):
drake/automotive/maliput/rndf/spline_lane.cc, line 128 at r3 (raw file):
https://google.github.io/styleguide/cppguide.html#Access_Control drake/automotive/maliput/rndf/lane.h contains several additional protected member variables that should be private. drake/automotive/maliput/rndf/spline_lane.cc, line 135 at r3 (raw file):
Missing period at end of sentence. drake/automotive/maliput/rndf/test/segment_test.cc, line 3 at r3 (raw file):
BTW, unused? drake/automotive/maliput/rndf/test/spline_helpers_test.cc, line 11 at r3 (raw file):
https://google.github.io/styleguide/cppguide.html#Names_and_Order_of_Includes Comments from Reviewable |
efab030
to
cda3638
Compare
Checkpoint. Reviewed 3 of 9 files at r4. drake/automotive/maliput/rndf/spline_lane.cc, line 150 at r3 (raw file):
"This" should be "Computes". drake/automotive/maliput/rndf/spline_lane.cc, line 150 at r3 (raw file):
"for a" should be "at". drake/automotive/maliput/rndf/spline_lane.cc, line 151 at r3 (raw file):
https://google.github.io/styleguide/cppguide.html#General_Naming_Rules (Same for the other similarly-named variables below like drake/automotive/maliput/rndf/spline_lane.cc, line 154 at r3 (raw file):
Consider deleting "After continue working out the expression". drake/automotive/maliput/rndf/spline_lane.cc, line 161 at r3 (raw file):
BTW, consider documenting that (1) a right-handed coordinate frame is used and (2) this is a 90 degree rotation about the +Z axis. drake/automotive/maliput/rndf/spline_lane.cc, line 163 at r3 (raw file):
BTW, consider replacing "Here we get" with "Gets". drake/automotive/maliput/rndf/spline_lane.cc, line 163 at r3 (raw file):
BTW, consider replacing "compute" with "computes". drake/automotive/maliput/rndf/spline_lane.cc, line 165 at r3 (raw file):
BTW, consider adding:
drake/automotive/maliput/rndf/spline_lane.cc, line 170 at r3 (raw file):
drake/automotive/maliput/rndf/spline_lane.cc, line 179 at r3 (raw file):
BTW, consider replacing "We get here" with "Computes". drake/automotive/maliput/rndf/spline_lane.cc, line 180 at r3 (raw file):
Missing period. drake/automotive/maliput/rndf/spline_lane.cc, line 182 at r3 (raw file):
BTW, for my own enlightenment, does the following post describe the math that's implemented here? https://stackoverflow.com/a/565282 drake/automotive/maliput/rndf/spline_lane.cc, line 187 at r3 (raw file):
For consistency, "points" should be "control_points". drake/automotive/maliput/rndf/spline_lane.h, line 190 at r3 (raw file):
BTW, consider replacing "s coordinate" with "@p s". drake/automotive/maliput/rndf/spline_lane.h, line 191 at r3 (raw file):
"to" should be "by". drake/automotive/maliput/rndf/spline_lane.h, line 191 at r3 (raw file):
Consider documenting the fact that this method supports drake/automotive/maliput/rndf/spline_lane.h, line 191 at r3 (raw file):
Consider adding "the lane with ID @p" after "function of". drake/automotive/maliput/rndf/spline_lane.h, line 192 at r3 (raw file):
BTW, this approximation may have high error if the lane with ID externals/bullet, line 1 at r4 (raw file):
BTW, why this change? (I briefly searched and couldn't immediately find why this is necessary.) Comments from Reviewable |
drake/automotive/maliput/rndf/spline_lane.cc, line 182 at r3 (raw file):
Comments from Reviewable |
Review status: 7 of 13 files reviewed at latest revision, 47 unresolved discussions, some commit checks failed. drake/automotive/maliput/rndf/spline_lane.cc, line 182 at r3 (raw file): Previously, agalbachicar (Agustin Alba Chicar) wrote…
Yes, thanks, because when I first encountered this code, its correctness wasn't immediately obvious to me. Having a citation to the derivation helps. Alternatively, is there a standard name for this method for determining where two line segments intersect? Comments from Reviewable |
9d8dd7a
to
ffd7174
Compare
Comments have been addressed. PTAL. Review status: 5 of 12 files reviewed at latest revision, 47 unresolved discussions. drake/automotive/maliput/rndf/segment.h, line 28 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/segment.h, line 29 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/segment.h, line 35 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/segment.h, line 39 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/segment.h, line 40 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. Yes, it is wrong. RNDF specification allows to have lanes without a specification of the width of the road, so the parser or who uses it should assign a default value to it if necessary. The builder code (not pull requested yet) does so. I wrote the docs having that in mind. drake/automotive/maliput/rndf/segment.h, line 43 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/segment.h, line 44 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 13 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 13 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 14 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 15 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. I've added "t" parameter as it is the only path (non-isotropic) parameter that ignition spline provides. drake/automotive/maliput/rndf/spline_lane.cc, line 17 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. Sorry for this, but tension parameter was recently removed as it is no longer necessary (future PR do not longer use it). So it's no sense keeping that constant. BTW, that comment referred to the roads in a city, as they should avoid having cusps and / or loops, having a value of tension near to 1.0 is needed. drake/automotive/maliput/rndf/spline_lane.cc, line 17 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 27 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 27 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 28 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 37 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 128 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. No problem. Good to know it. drake/automotive/maliput/rndf/spline_lane.cc, line 135 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 150 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 150 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 151 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 154 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 161 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 163 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 163 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 165 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 170 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 179 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 180 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 182 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. AFAIK it's just line intersection in 3-D space. However as I do not support all the cases because it has no sense to do it for collinear and coincident cases and math should serve the purpose I'm not creating a specific math method for it. If you consider this should be done please let me know. drake/automotive/maliput/rndf/spline_lane.cc, line 187 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 120 at r1 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 59 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 60 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 65 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 84 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 90 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 149 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 190 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 191 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 191 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 191 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 192 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Yes, it may have a high error. The builder (not pull requested yet) has code to create interpolated waypoints over the segment's lanes and improve the sampling over the lanes. This will reduce the error and couple lanes by having paired waypoints. Here you have something similar to a pair of U-shaped lanes, as you can see there are several arrows at the curved parts of the lanes. This is because of waypoint interpolation from one lane to the other based on the map information. As you can see, error is decreased by doing so. drake/automotive/maliput/rndf/test/segment_test.cc, line 3 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/test/spline_helpers_test.cc, line 11 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. externals/bullet, line 1 at r4 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. There was an issue on our side with gitsubmodules. Sorry for it. Comments from Reviewable |
ffd7174
to
688badc
Compare
The linux-xenial-clang-bazel-experimental-debug error is surprising:
@drake-jenkins-bot linux-xenial-clang-bazel-experimental-debug please. |
Thanks @liangfok for the trigger. Removed CMakelists files to avoid conflicts with PR #6445. PTAL. Review status: 4 of 11 files reviewed at latest revision, 9 unresolved discussions. Comments from Reviewable |
Checkpoint. Reviewed 3 of 9 files at r4, 2 of 5 files at r5, 2 of 3 files at r6. a discussion (no related file): drake/automotive/maliput/rndf/segment.h, line 28 at r6 (raw file):
Missing "id" after "@param". drake/automotive/maliput/rndf/segment.h, line 29 at r6 (raw file):
Missing "junction" after "@param". drake/automotive/maliput/rndf/segment.h, line 30 at r6 (raw file):
Let's change "class" to "object". drake/automotive/maliput/rndf/segment.h, line 36 at r6 (raw file):
Missing "id" after "@param". drake/automotive/maliput/rndf/spline_lane.cc, line 182 at r3 (raw file): Previously, agalbachicar (Agustin Alba Chicar) wrote…
Thanks. I'm satisfied with the latest revision. drake/automotive/maliput/rndf/spline_lane.cc, line 126 at r5 (raw file):
http://drake.mit.edu/code_style_guide.html#clarifications drake/automotive/maliput/rndf/spline_lane.cc, line 174 at r5 (raw file):
Missing "the" before "lines". drake/automotive/maliput/rndf/spline_lane.h, line 192 at r3 (raw file): Previously, agalbachicar (Agustin Alba Chicar) wrote…
Thanks for the explanation. I'm marking myself satisfied. drake/automotive/maliput/rndf/spline_lane.h, line 63 at r5 (raw file):
Use:
drake/automotive/maliput/rndf/spline_lane.h, line 87 at r5 (raw file):
This sentence can be deleted since the information is contained in the description of parameter drake/automotive/maliput/rndf/spline_lane.h, line 196 at r5 (raw file):
Missing "if" after "Aborts". drake/automotive/maliput/rndf/spline_lane.h, line 196 at r5 (raw file):
Should "this lane" be "this lane's normal at @p s"? drake/automotive/maliput/rndf/spline_lane.h, line 197 at r5 (raw file):
"it is" should be "the two lines are" Comments from Reviewable |
Completed first pass. Reviewed 1 of 9 files at r4, 1 of 5 files at r5. drake/automotive/maliput/rndf/spline_lane.cc, line 63 at r5 (raw file):
This comment mentions "p", which doesn't match the variable name below. drake/automotive/maliput/rndf/spline_lane.cc, line 64 at r5 (raw file):
https://google.github.io/styleguide/cppguide.html#Variable_Names Consider simplifying as follows:
drake/automotive/maliput/rndf/spline_lane.cc, line 74 at r5 (raw file):
to be:
drake/automotive/maliput/rndf/spline_lane.cc, line 75 at r5 (raw file):
Missing "the" after "discard". drake/automotive/maliput/rndf/spline_lane.cc, line 82 at r5 (raw file):
Consider replacing "We get here" with "Computes". drake/automotive/maliput/rndf/spline_lane.cc, line 91 at r5 (raw file):
"it's" should be "is". drake/automotive/maliput/rndf/spline_lane.cc, line 91 at r5 (raw file):
Consider replacing "is a function like" with "takes the form" drake/automotive/maliput/rndf/spline_lane.cc, line 92 at r5 (raw file):
Should "like" be "by"? drake/automotive/maliput/rndf/spline_lane.cc, line 93 at r5 (raw file):
be:
? drake/automotive/maliput/rndf/spline_lane.cc, line 99 at r5 (raw file):
Consider replacing "got it" with "get its derivative by" drake/automotive/maliput/rndf/spline_lane.cc, line 103 at r5 (raw file):
"As" should be "Since". drake/automotive/maliput/rndf/spline_lane.cc, line 103 at r5 (raw file):
"and" should be "are". drake/automotive/maliput/rndf/test/spline_lane_test.cc, line 38 at r6 (raw file):
Should "position of the point" be "knot point" for consistency with drake/automotive/maliput/rndf/test/spline_lane_test.cc, line 52 at r6 (raw file):
BTW, consider replacing "Makes" with "Performs". drake/automotive/maliput/rndf/test/spline_lane_test.cc, line 52 at r6 (raw file):
BTW, consider deleting "line". drake/automotive/maliput/rndf/test/spline_lane_test.cc, line 54 at r6 (raw file):
This variable should be called https://google.github.io/styleguide/cppguide.html#Constant_Names drake/automotive/maliput/rndf/test/spline_lane_test.cc, line 66 at r6 (raw file):
Missing period at end of sentence. (Same comment below.) drake/automotive/maliput/rndf/test/spline_lane_test.cc, line 117 at r6 (raw file):
BTW, consider replacing "Makes" with "Performs". drake/automotive/maliput/rndf/test/spline_lane_test.cc, line 117 at r6 (raw file):
BTW, consider replacing "spline" with "lane". drake/automotive/maliput/rndf/test/spline_lane_test.cc, line 119 at r6 (raw file):
This variable should be called https://google.github.io/styleguide/cppguide.html#Constant_Names Comments from Reviewable |
1af69e0
to
df113f0
Compare
Addressed comments. PTAL. Review status: 7 of 11 files reviewed at latest revision, 32 unresolved discussions. a discussion (no related file): Previously, liangfok (Chien-Liang Fok) wrote…
I have followed Monolane's implementation as a guide. I have thought that in case new functions are used to induce a geometry from RNDF's waypoints, having a separate class to handle all non-geometric stuff will facilitate the integration. drake/automotive/maliput/rndf/segment.h, line 28 at r6 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/segment.h, line 29 at r6 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/segment.h, line 30 at r6 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/segment.h, line 36 at r6 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 182 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 63 at r5 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 64 at r5 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 74 at r5 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 75 at r5 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 82 at r5 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 91 at r5 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 91 at r5 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 92 at r5 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 93 at r5 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 99 at r5 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 103 at r5 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 103 at r5 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 126 at r5 (raw file):
drake/automotive/maliput/rndf/spline_lane.cc, line 174 at r5 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 192 at r3 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 63 at r5 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 87 at r5 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 196 at r5 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 196 at r5 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. You're right. drake/automotive/maliput/rndf/spline_lane.h, line 197 at r5 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/test/spline_lane_test.cc, line 38 at r6 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. Copied variable name and comments from header file. drake/automotive/maliput/rndf/test/spline_lane_test.cc, line 52 at r6 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/test/spline_lane_test.cc, line 52 at r6 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/test/spline_lane_test.cc, line 54 at r6 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/test/spline_lane_test.cc, line 66 at r6 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/test/spline_lane_test.cc, line 117 at r6 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/test/spline_lane_test.cc, line 117 at r6 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/test/spline_lane_test.cc, line 119 at r6 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. Comments from Reviewable |
Reviewed 4 of 4 files at r7. a discussion (no related file): Previously, agalbachicar (Agustin Alba Chicar) wrote…
I see. OK I'll mark myself satisfied. drake/automotive/maliput/rndf/spline_lane.cc, line 126 at r5 (raw file): Previously, agalbachicar (Agustin Alba Chicar) wrote…
Oops! Sorry I forgot this was overriding an drake/automotive/maliput/rndf/spline_lane.cc, line 82 at r7 (raw file):
BTW, missing "the" after "Computes". drake/automotive/maliput/rndf/test/spline_lane_test.cc, line 37 at r7 (raw file):
BTW, "tuple" should be "vector of tuples" drake/automotive/maliput/rndf/test/spline_lane_test.cc, line 37 at r7 (raw file):
BTW, consider adding "objects" after "ignition::math::Vector3d". Comments from Reviewable |
df113f0
to
b7c865c
Compare
Review status: 9 of 11 files reviewed at latest revision, 3 unresolved discussions. drake/automotive/maliput/rndf/spline_lane.cc, line 126 at r5 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 82 at r7 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/test/spline_lane_test.cc, line 37 at r7 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/test/spline_lane_test.cc, line 37 at r7 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. Comments from Reviewable |
+@soonho-tri for platform-review please. |
Reviewed 3 of 10 files at r1, 3 of 9 files at r4, 1 of 5 files at r5, 2 of 4 files at r7, 2 of 2 files at r8. drake/automotive/maliput/rndf/spline_lane.h, line 45 at r8 (raw file):
This is copypasta from monolane. Factor for reuse. (Neither of them should have this class, but should rather prefer to use pre-existing representations for this. But for now, having them share a single copy of a bad abstraction is better than having two copies of a bad abstraction.) drake/automotive/maliput/rndf/test/rndf_test_utils.h, line 1 at r8 (raw file):
(1) Most of this file is copypasta from monolane. Those helpers should be reused, instead of duplicated. (2) BTW This is not how googletest is supposed to work. Ideally we would use one of the googletest-idiomatic ways of expressing how to compare two GetPosition etc are to be compared for (in)equality. drake/automotive/maliput/rndf/test/spline_lane_test.cc, line 19 at r8 (raw file):
I think this is the "related header" and thus should appear atop the file? Comments from Reviewable |
Review status: all files reviewed at latest revision, 3 unresolved discussions. drake/automotive/maliput/rndf/spline_lane.h, line 45 at r8 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Shall I leave it for a subsequent PR? I can promote common Monolane and RNDF code to Maliput interface if needed. If you agree I would keep it in different PRs. drake/automotive/maliput/rndf/test/rndf_test_utils.h, line 1 at r8 (raw file):
Comments from Reviewable |
There is no reason to hurry on this PR, right? If you want to do the factoring in a separate PR that's fine, but then that PR needs to merge first and this one rebase atop it. |
drake/automotive/maliput/rndf/test/rndf_test_utils.h, line 1 at r8 (raw file): Previously, agalbachicar (Agustin Alba Chicar) wrote…
Clarifying: for (2) its OK to fix separately (or never). Only (1) is the defect for this PR. Comments from Reviewable |
I've just remembered this comment from @maddog-tri . I would like to bring him and his advice on Maliput code promotion from specific implementations just to do the right thing. |
Reviewed 2 of 2 files at r8. drake/automotive/maliput/rndf/spline_lane.cc, line 80 at r8 (raw file):
BTW, consider adding a blank line after this closing curly brace for consistency with the rest of this file. drake/automotive/maliput/rndf/spline_lane.cc, line 87 at r8 (raw file):
BTW, consider adding a blank line after this closing curly brace for consistency with the rest of this file. Comments from Reviewable |
3b3f318
to
54b4c58
Compare
Reviewed 3 of 3 files at r9. Comments from Reviewable |
Reviewed 3 of 3 files at r9. Comments from Reviewable |
6f1432e
to
a8d4c7f
Compare
Reviewed 2 of 4 files at r10. drake/automotive/maliput/rndf/BUILD, line 72 at r10 (raw file):
FYI This is the default, and not usually written out. Comments from Reviewable |
a8d4c7f
to
3114a3f
Compare
Reviewed 2 of 4 files at r10, 1 of 1 files at r11. Comments from Reviewable |
I this this is +(status: ready to merge) after Jenkins passes. Review status: all files reviewed at latest revision, all discussions resolved, some commit checks pending. Comments from Reviewable |
Review status: all files reviewed at latest revision, 5 unresolved discussions, all commit checks successful. drake/automotive/maliput/rndf/BUILD, line 72 at r10 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 80 at r8 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.cc, line 87 at r8 (raw file): Previously, liangfok (Chien-Liang Fok) wrote…
Done. drake/automotive/maliput/rndf/spline_lane.h, line 45 at r8 (raw file):
drake/automotive/maliput/rndf/test/spline_lane_test.cc, line 19 at r8 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Done. drake/automotive/maliput/rndf/test/rndf_test_utils.h, line 1 at r8 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Done. With PR #6506 we have Google Test idiomatic functions to compare both Maliput and Ignition types. Comments from Reviewable |
Comments addressed. Thanks for the reviews. Review status: all files reviewed at latest revision, 1 unresolved discussion. Comments from Reviewable |
This PR removes the stub implementation of
drake::maliput::rndf::SplineLane
and provides a meaningful one. It includes also a set of unit tests to validate the API.This PR concludes the implementation of the Maliput API for RNDF.
This change is