RobotLocomotion / director

A robotics interface and visualization framework, with extensive applications for working with http://drake.mit.edu
BSD 3-Clause "New" or "Revised" License
178 stars 86 forks source link

Replace `pydrake.getDrakePath()` with `pydrake.common.FindResourceOrT… #542

Closed fbudin69500 closed 7 years ago

fbudin69500 commented 7 years ago

…hrow(...)`

pydrake.getDrakePath() does not work with the install tree of drake built with bazel. Instead, we can rely on pydrake.common.FindResourceOrThrow(...) once the environment variable DRAKE_RESOURCE_ROOT is defined.

fbudin69500 commented 7 years ago

This requires https://github.com/RobotLocomotion/drake/pull/6766 Merged

fbudin69500 commented 7 years ago

@patmarion @stonier This is the last requirement to be able to build spartan with drake/bazel

patmarion commented 7 years ago

Does this require an environment variable to be defined? Should we add a check for the environment variable to the function _isPyDrakeAvailable() ?

fbudin69500 commented 7 years ago

The current solution does require an environment variable. I have added a check in the function isPyDrakeAvailable() to verify that the environment variable is set.

patmarion commented 7 years ago

Cool thanks!

In general I'm not too happy with the current design pattern of the command line args for this. Basically --iiwa-drake is a shortcut for --director-config=/path/to/drake/examples/kuka_iiwa_arm/director_config.json. Which is annoying because it means the application has to resolve that pathname when the command line args are declared, instead of resolving it only when the flag is actually used.