drake-external-examples | Examples of how to use Drake in your own project | Robotics library
kandi X-RAY | drake-external-examples Summary
kandi X-RAY | drake-external-examples Summary
Examples of how to use Drake in your own project:.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of drake-external-examples
drake-external-examples Key Features
drake-external-examples Examples and Code Snippets
Community Discussions
Trending Discussions on drake-external-examples
QUESTION
I'm using drake as an external in another bazel project and it's adding ...runfiles/drake
as well as ...runfiles/drake/bindings
to the PYTHONPATH
. The latter pretty much only includes pydrake
(which is what I want), but the former is including a bunch of other directories as modules including common , examples, tools, and bindings which results in name collisions with my own project. Is this expected behavior? What's the best way to deal with this? I tested the examples in drake-external-examples/drake_bazel_external and I'm seeing the same issue (relevant commit here).
ANSWER
Answered 2020-May-14 at 22:39TL;DR Best way to handle this is to make sure your imports are scoped to your project; e.g. instead of from common import foo
, instead do from drake_bazel_external.common import foo
.
Here's a snippet from a sample Bazel project that does this with Python:
To root cause, here's my attempt to instrument your repro with some more output, pinned to drake@v0.18.0
:
drake_bazel_external/apps/bar.py
(branch)
Here's a preview of the Python paths, which corroborate what you're seeing:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install drake-external-examples
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page