-
Notifications
You must be signed in to change notification settings - Fork 55
cmake: Add example of custom bindings using drake + pydrake #98
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
cmake: Add example of custom bindings using drake + pydrake #98
Conversation
c9c4bf2
to
92996c6
Compare
+@jamiesnape for feature review, please Review status: 0 of 6 files reviewed at latest revision, all discussions resolved. Comments from Reviewable |
92996c6
to
a32e780
Compare
Nice! This is going to be very useful for me. thanks! Reviewed 6 of 6 files at r1. Comments from Reviewable |
Review status: all files reviewed at latest revision, 3 unresolved discussions, some commit checks broke. drake_cmake_external/CMakeLists.txt, line 36 at r1 (raw file):
Remove. Does not add anything and quite possibly confuses things. drake_cmake_installed/CMakeLists.txt, line 46 at r1 (raw file):
This is exactly why you should not be throwing unnecessary dependencies into drake_cmake_installed/src/simple_bindings/CMakeLists.txt, line 8 at r1 (raw file):
Remove. You are misunderstanding how Comments from Reviewable |
Review status: all files reviewed at latest revision, 4 unresolved discussions, some commit checks broke. drake_cmake_installed/src/simple_bindings/CMakeLists.txt, line 2 at r1 (raw file):
Remove. This is already included by the Comments from Reviewable |
Reviewed 6 of 6 files at r1. drake_cmake_installed/src/simple_bindings/test_example_module.py, line 1 at r1 (raw file):
Name the file Comments from Reviewable |
Review status: all files reviewed at latest revision, 7 unresolved discussions, some commit checks broke. drake_cmake_installed/src/simple_bindings/CMakeLists.txt, line 1 at r1 (raw file):
Add the copyright and license header. drake_cmake_installed/src/simple_bindings/example_module.cc, line 1 at r1 (raw file):
Add the copyright and license header. drake_cmake_installed/src/simple_bindings/test_example_module.py, line 1 at r1 (raw file): Previously, jamiesnape (Jamie Snape) wrote…
Also add the copyright and license header. Comments from Reviewable |
Review status: all files reviewed at latest revision, 8 unresolved discussions, some commit checks broke. drake_cmake_installed/src/simple_bindings/example_module.cc, line 19 at r1 (raw file):
Comments from Reviewable |
624e2de
to
c675a82
Compare
Review status: 2 of 5 files reviewed at latest revision, 8 unresolved discussions. drake_cmake_external/CMakeLists.txt, line 36 at r1 (raw file): Previously, jamiesnape (Jamie Snape) wrote…
I personally found the subproject structure confusing, and had to root around to figure out why we had this way. Is there a link that I can point to, in this case? Or a better wording? drake_cmake_installed/src/simple_bindings/CMakeLists.txt, line 8 at r1 (raw file): Previously, jamiesnape (Jamie Snape) wrote…
Done. Reworded, as it was unexpected to me that drake_cmake_installed/src/simple_bindings/example_module.cc, line 1 at r1 (raw file): Previously, jamiesnape (Jamie Snape) wrote…
Done. drake_cmake_installed/src/simple_bindings/example_module.cc, line 19 at r1 (raw file): Previously, jamiesnape (Jamie Snape) wrote…
Done. drake_cmake_installed/CMakeLists.txt, line 46 at r1 (raw file): Previously, jamiesnape (Jamie Snape) wrote…
Done. drake_cmake_installed/src/simple_bindings/test_example_module.py, line 1 at r1 (raw file): Previously, jamiesnape (Jamie Snape) wrote…
Done. Comments from Reviewable |
c675a82
to
83fca1a
Compare
83fca1a
to
b6a2301
Compare
Review status: 2 of 7 files reviewed at latest revision, 8 unresolved discussions. drake_cmake_installed/src/simple_bindings/CMakeLists.txt, line 1 at r1 (raw file): Previously, jamiesnape (Jamie Snape) wrote…
Done. drake_cmake_installed/src/simple_bindings/CMakeLists.txt, line 2 at r1 (raw file): Previously, jamiesnape (Jamie Snape) wrote…
Done. Comments from Reviewable |
b6a2301
to
c1cba81
Compare
Reviewed 7 of 7 files at r2. drake_cmake_external/CMakeLists.txt, line 36 at r1 (raw file): Previously, EricCousineau-TRI (Eric Cousineau) wrote…
I don't think so. The CMake documentation is sufficient and easy to find (if you think it is neither of these, please open an issue upstream and we will try to fix) and we do not annotate every CMake call with a link to its documentation. drake_cmake_installed/src/simple_bindings/CMakeLists.txt, line 8 at r1 (raw file): Previously, EricCousineau-TRI (Eric Cousineau) wrote…
Even if drake_cmake_installed/src/simple_bindings/CMakeLists.txt, line 4 at r2 (raw file):
Probably drake_cmake_installed/src/simple_bindings/CMakeLists.txt, line 41 at r2 (raw file):
Comments from Reviewable |
drake_cmake_external/CMakeLists.txt, line 36 at r1 (raw file): Previously, jamiesnape (Jamie Snape) wrote…
Is there a better way to search for this as a non-expert? What is the best way to find an authoritative source on this exact structure? My quick searches provide next to nil on finding a consistent mention of this; from what I see in the CMake docs for Comments from Reviewable |
08e11be
to
3e62716
Compare
Review status: 4 of 7 files reviewed at latest revision, 4 unresolved discussions, some commit checks broke. drake_cmake_installed/src/simple_bindings/CMakeLists.txt, line 8 at r1 (raw file): Previously, jamiesnape (Jamie Snape) wrote…
Trying to follow the I can use the interface library setup, but I don't like it as it's more verbose and deviates even further from drake_cmake_installed/src/simple_bindings/CMakeLists.txt, line 4 at r2 (raw file): Previously, jamiesnape (Jamie Snape) wrote…
Done. drake_cmake_installed/src/simple_bindings/CMakeLists.txt, line 41 at r2 (raw file): Previously, jamiesnape (Jamie Snape) wrote…
Done. Comments from Reviewable |
Review status: 4 of 7 files reviewed at latest revision, 3 unresolved discussions, some commit checks broke. drake_cmake_installed/src/simple_bindings/CMakeLists.txt, line 8 at r1 (raw file): Previously, EricCousineau-TRI (Eric Cousineau) wrote…
The Comments from Reviewable |
Reviewed 3 of 3 files at r3. drake_cmake_installed/src/simple_bindings/CMakeLists.txt, line 8 at r1 (raw file): Previously, jamiesnape (Jamie Snape) wrote…
Their docs are fine: https://github.com/pybind/pybind11/blob/master/docs/compiling.rst#advanced-interface-library-target Comments from Reviewable |
Review status: all files reviewed at latest revision, 2 unresolved discussions, some commit checks broke. drake_cmake_installed/src/simple_bindings/CMakeLists.txt, line 8 at r1 (raw file): Previously, jamiesnape (Jamie Snape) wrote…
What is different? Comments from Reviewable |
4aed655
to
d880f6f
Compare
a discussion (no related file): Previously, EricCousineau-TRI (Eric Cousineau) wrote…
Confirmed that this does not fail when the same code is run in Comments from Reviewable |
May wait until #105 progresses, and then use the same code in this PR. Per @fbudin69500's suggestion, may be due to not linking to the correct library? |
@RussTedrake Will you need this to be updated for future course teachings? |
It would be helpful for sure.
… On Aug 15, 2018, at 7:29 PM, Eric Cousineau ***@***.***> wrote:
@RussTedrake Will you need this to be updated for your course this fall?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Pinging @jamiesnape |
+@m-chaturvedi is going to look into the outstanding issues. |
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.
Reviewable status: 2 unresolved discussions, LGTM missing from assignee m-chaturvedi, LGTM missing from assignee jamiesnape, platform LGTM missing
a discussion (no related file):
Previously, EricCousineau-TRI (Eric Cousineau) wrote…
Confirmed that this does not fail when the same code is run in
drake
Bazel land:
EricCousineau-TRI/drake@8f242ca
Using @m-chaturvedi's build script (uses packaged Drake), and my mod to it (using bazel run //:install
from Drake), the segfaults seem to have disappeared. Marking this as resolved.
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.
Reviewed 3 of 3 files at r5.
Reviewable status: 1 unresolved discussion, LGTM missing from assignee m-chaturvedi, LGTM missing from assignee jamiesnape, platform LGTM missing
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.
Reviewable status: 1 unresolved discussion, LGTM missing from assignee m-chaturvedi, LGTM missing from assignee jamiesnape, platform LGTM missing
drake_cmake_external/CMakeLists.txt, line 36 at r1 (raw file):
Previously, EricCousineau-TRI (Eric Cousineau) wrote…
Is there a better way to search for this as a non-expert? What is the best way to find an authoritative source on this exact structure?
My quick searches provide next to nil on finding a consistent mention of this; from what I see in the CMake docs for
ExternalProject_Add
, it shows the usage of the method, but does not appear to provide explicit / easily discoverable advice on how to structure your project which shows this structure.
Just to follow up, is there a link that I can point to here? Or should I just leave it as-is?
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.
Reviewable status: 1 unresolved discussion, LGTM missing from assignee m-chaturvedi, LGTM missing from assignee jamiesnape, platform LGTM missing
drake_cmake_external/CMakeLists.txt, line 36 at r1 (raw file):
Previously, EricCousineau-TRI (Eric Cousineau) wrote…
Just to follow up, is there a link that I can point to here? Or should I just leave it as-is?
Per vcon, I will make a GitHub issue on CMake; link to blog and/or issue:
https://gitlab.kitware.com/cmake/cmake/issues
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.
Reviewable status: 1 unresolved discussion, LGTM missing from assignee m-chaturvedi, LGTM missing from assignee jamiesnape, platform LGTM missing
drake_cmake_external/CMakeLists.txt, line 36 at r1 (raw file):
Previously, EricCousineau-TRI (Eric Cousineau) wrote…
Per vcon, I will make a GitHub issue on CMake; link to blog and/or issue:
https://gitlab.kitware.com/cmake/cmake/issues
Sorry for the delay, submitted:
https://gitlab.kitware.com/cmake/cmake/issues/18336
Will link to this issue.
d880f6f
to
25764f7
Compare
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.
Reviewable status: 1 unresolved discussion, LGTM missing from assignee m-chaturvedi, LGTM missing from assignee jamiesnape, platform LGTM missing
drake_cmake_external/CMakeLists.txt, line 36 at r1 (raw file):
Previously, EricCousineau-TRI (Eric Cousineau) wrote…
Sorry for the delay, submitted:
https://gitlab.kitware.com/cmake/cmake/issues/18336
Will link to this issue.
Done.
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.
Reviewed 2 of 2 files at r6.
Reviewable status: all discussions resolved, LGTM missing from assignee m-chaturvedi, LGTM missing from assignee jamiesnape, platform LGTM missing
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.
Reviewable status: all discussions resolved, LGTM missing from assignee m-chaturvedi, platform LGTM from [jamiesnape]
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.
Reviewable status:
complete! all discussions resolved, platform LGTM from [jamiesnape]
Requires:
Supersedes #95
Relates:
pybind/pybind11#1373
pybind/pybind11#1367
This change is