-
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
Add initial pydrake bindings for maliput #8091
Conversation
+@EricCousineau-TRI for feature review, please. Review status: 0 of 5 files reviewed at latest revision, all discussions resolved. Comments from Reviewable |
b94f347
to
995bec1
Compare
Reviewed 5 of 5 files at r1. bindings/pydrake/maliput/init.py, line 1 at r1 (raw file):
BTW @sherm1 We have other modules that are inconsistent with bindings/pydrake/maliput/api_py.cc, line 21 at r1 (raw file):
BTW Can you add bindings/pydrake/maliput/BUILD.bazel, line 42 at r1 (raw file):
Same as below. bindings/pydrake/maliput/BUILD.bazel, line 55 at r1 (raw file):
bindings/pydrake/maliput/dragway_py.cc, line 20 at r1 (raw file):
BTW Same as above - can you name these arguments? bindings/pydrake/maliput/dragway_py.cc, line 36 at r1 (raw file):
BTW Can this be changed to a bindings/pydrake/maliput/dragway_py.cc, line 40 at r1 (raw file):
Extra bindings/pydrake/maliput/test/maliput_test.py, line 1 at r1 (raw file):
BTW Shebang not necessary. bindings/pydrake/maliput/test/maliput_test.py, line 23 at r1 (raw file):
BTW When you add the names, could you test that constructor flavor? bindings/pydrake/maliput/test/maliput_test.py, line 29 at r1 (raw file):
Rather than this, you can use bindings/pydrake/maliput/test/maliput_test.py, line 53 at r1 (raw file):
BTW Same as above, using bindings/pydrake/maliput/test/maliput_test.py, line 63 at r1 (raw file):
BTW Same as above, using bindings/pydrake/maliput/test/maliput_test.py, line 67 at r1 (raw file):
BTW This shouldn't be in the loop? Comments from Reviewable |
Reviewed 1 of 1 files at r2. Comments from Reviewable |
995bec1
to
ce3c7d2
Compare
Review status: 1 of 6 files reviewed at latest revision, 11 unresolved discussions. bindings/pydrake/maliput/api_py.cc, line 21 at r1 (raw file): Previously, EricCousineau-TRI wrote…
Done. bindings/pydrake/maliput/BUILD.bazel, line 42 at r1 (raw file): Previously, EricCousineau-TRI wrote…
Done. bindings/pydrake/maliput/BUILD.bazel, line 55 at r1 (raw file): Previously, EricCousineau-TRI wrote…
Done. bindings/pydrake/maliput/dragway_py.cc, line 20 at r1 (raw file): Previously, EricCousineau-TRI wrote…
Done. bindings/pydrake/maliput/dragway_py.cc, line 36 at r1 (raw file): Previously, EricCousineau-TRI wrote…
Done. bindings/pydrake/maliput/dragway_py.cc, line 40 at r1 (raw file): Previously, EricCousineau-TRI wrote…
Done. bindings/pydrake/maliput/test/maliput_test.py, line 1 at r1 (raw file): Previously, EricCousineau-TRI wrote…
Done. bindings/pydrake/maliput/test/maliput_test.py, line 23 at r1 (raw file): Previously, EricCousineau-TRI wrote…
Done. bindings/pydrake/maliput/test/maliput_test.py, line 29 at r1 (raw file): Previously, EricCousineau-TRI wrote…
Done. bindings/pydrake/maliput/test/maliput_test.py, line 53 at r1 (raw file): Previously, EricCousineau-TRI wrote…
Done. bindings/pydrake/maliput/test/maliput_test.py, line 63 at r1 (raw file): Previously, EricCousineau-TRI wrote…
Done. bindings/pydrake/maliput/test/maliput_test.py, line 67 at r1 (raw file): Previously, EricCousineau-TRI wrote…
Done. Comments from Reviewable |
+@sherm1 platform review, please. Review status: 1 of 6 files reviewed at latest revision, 7 unresolved discussions. Comments from Reviewable |
Apologies, but I don't think I can adequately platform review this because I am too unfamiliar with Python wrapping and with our Python conventions in general. @EricCousineau-TRI, your review looked like a solid platform review to me. Do you think it was also an adequate feature review? If not, maybe this needs a feature review from @jadecastro's team. -@sherm1 Reviewed 1 of 5 files at r1, 5 of 5 files at r3. Comments from Reviewable |
ce3c7d2
to
f2d56cc
Compare
No problem, @sherm1, and I agree about @EricCousineau-TRI for platform. Review status: 5 of 6 files reviewed at latest revision, 7 unresolved discussions. Comments from Reviewable |
f2d56cc
to
dc5c97e
Compare
bindings/pydrake/maliput/dragway_py.cc, line 30 at r4 (raw file):
FYI: They should be API bindings. In fact, it is kind of odd that Comments from Reviewable |
dc5c97e
to
c4399b7
Compare
-@liangfok Review status: 2 of 6 files reviewed at latest revision, 8 unresolved discussions. bindings/pydrake/maliput/dragway_py.cc, line 30 at r4 (raw file): Previously, maddog-tri (Matt Marjanović) wrote…
Nice. Yeah, the Comments from Reviewable |
Reviewed 1 of 2 files at r4, 3 of 3 files at r5. Comments from Reviewable |
Reviewed 1 of 5 files at r3. Comments from Reviewable |
Review status: all files reviewed at latest revision, 2 unresolved discussions. bindings/pydrake/maliput/api_py.cc, line 36 at r5 (raw file):
Can you just use Comments from Reviewable |
c4399b7
to
979a686
Compare
Review status: 5 of 6 files reviewed at latest revision, 3 unresolved discussions. bindings/pydrake/maliput/api_py.cc, line 36 at r5 (raw file): Previously, EricCousineau-TRI wrote…
Done. Comments from Reviewable |
Review status: 5 of 6 files reviewed at latest revision, 4 unresolved discussions. bindings/pydrake/maliput/api_py.cc, line 26 at r6 (raw file):
For this accessor (and the similar, LanePosition::srh()), as I (am starting to) understand pydrake/pybind11, these will return numpy-wrapped copies of the original Eigen vectors. The C++ accessors return const-references (i.e., view semantics) --- so perhaps it would be better if the pydrake wrappers did the same? I think adding Opinions, @EricCousineau-TRI ? Comments from Reviewable |
Reviewed 1 of 1 files at r6. bindings/pydrake/maliput/api_py.cc, line 26 at r6 (raw file): Previously, maddog-tri (Matt Marjanović) wrote…
Yes, I believe I'd say it doesn't matter if there's no explicit use case for referencing, and would be relatively easy to change if needed. One additional word of caution is that I need to resolve (with Kitware's help) whether we can maintain reference semantics with AutoDiff / Symbolic: Comments from Reviewable |
979a686
to
bbaf6c7
Compare
e07e32d
to
3bcdd9d
Compare
Review status: 4 of 6 files reviewed at latest revision, 2 unresolved discussions. bindings/pydrake/maliput/api_py.cc, line 26 at r6 (raw file): Previously, EricCousineau-TRI wrote…
Done. Comments from Reviewable |
Pass complete; PTAL. Reviewed 1 of 5 files at r1, 1 of 5 files at r3, 1 of 2 files at r4, 2 of 3 files at r5, 1 of 1 files at r6, 2 of 2 files at r7. bindings/pydrake/maliput/api_py.cc, line 18 at r6 (raw file):
Probably a good idea to add a TODO indicating that these bindings are a work-in-progress, and referencing #7918 as tracking the progress (kind of). bindings/pydrake/maliput/api_py.cc, line 21 at r6 (raw file):
The Comments from Reviewable |
Review status: all files reviewed at latest revision, 4 unresolved discussions. bindings/pydrake/maliput/api_py.cc, line 26 at r6 (raw file): Previously, jadecastro (Jonathan DeCastro) wrote…
BTW You may need to ensure this returns Comments from Reviewable |
bindings/pydrake/maliput/api_py.cc, line 26 at r6 (raw file): Previously, EricCousineau-TRI wrote…
BTW After checking the code, I was wrong, you shouldn't actually need Comments from Reviewable |
3bcdd9d
to
804b72e
Compare
Review status: 4 of 6 files reviewed at latest revision, 3 unresolved discussions. bindings/pydrake/maliput/api_py.cc, line 18 at r6 (raw file): Previously, maddog-tri (Matt Marjanović) wrote…
Done. bindings/pydrake/maliput/api_py.cc, line 21 at r6 (raw file): Previously, maddog-tri (Matt Marjanović) wrote…
Done. (unit test added also) Comments from Reviewable |
Reviewed 2 of 2 files at r8. Comments from Reviewable |
* Add bindings for a small subset of maliput api and dragway backend
Add just enough to get up and running with an IDM/MOBIL system.
/cc @maddog-tri
This change is