Closed rdeits closed 6 years ago
Hm... Not sure why this is happening.
@jamiesnape Any ideas on this? Is this related to any pre-packaged drake_visualizer
updates?
I have not actually updated the packages yet, so no.
Alright, I am working on reproducing this locally, will update in this comment once I've finished building off of master
.
EDIT 1: I can import pydrake
if I install from master
(8ee580c
). My steps:
$ cd drake
$ git log -n1 --oneline
8ee580c Merge pull request #7815 from osrf/ign-cosmetic-fixups
$ mkdir build_install
$ bazel run //:install -- ~+/build_install
$ ./build_install/bin/drake-visualizer
# In drake-visualizer, F8 to bring up Console.
>>> import pydrake; pydrake.__file__
'/home/eacousineau/proj/tri/repo/branches/drake/master/drake/build_install/lib/python2.7/site-packages/pydrake/__init__.pyc'
I am on Ubuntu 16.04.
~@rdeits Are you on Mac?~ EDIT 2: Actually, it does not work from Bazel (but it does work from Bazel install).
$ bazel build //tools:drake_visualizer
$ ./bazel-bin/tools/drake_visualizer
>>> import pydrake
Traceback (most recent call last):
File "<console>", line 1, in <module>
ImportError: No module named pydrake
Will see if I can diagnose.
Also fails: bazel run //tools:drake_visualizer
EDIT 3: Ah, just seems like we need a rename in drake_visualizer
. When inspecting paths from import sys; print("\n".join(sys.path))
:
${runfiles}/drake/external/drake_visualizer/lib/python2.7/site-packages
${runfiles}/drake/external/drake_visualizer/lib/python2.7/dist-packages
${runfiles}/drake/drake/bindings
${runfiles}/drake/drake/lcmtypes
${runfiles}/drake/external/drake_visualizer/lib/python2.7/dist-packages
${runfiles}/drake/external/lcmtypes_bot2_core/lcmtypes
${runfiles}/drake/external/lcmtypes_robotlocomotion/lcmtypes
${runfiles}/drake/external/optitrack_driver/lcmtypes
${runfiles}/drake/external/vtk/lib/python2.7/site-packages
${runfiles}/drake/external
...
${runfiles}/drake
Looks like we just need to remove drake
from there.
Will look into submitting a PR; I will see if we can use the py_env_runner.py
hack to avoid needing to do all of this.
@rdeits Just to check, do you still get an error if you use bazel run //:install
, or if you use CMake?
Thanks @EricCousineau-TRI ! I will try with //:install
and report back.
After //:install
, the installed drake-visualizer
does find pydrake
successfully, but then fails to find the valkyrie meshes (even though I am now running from a checkout named "drake"):
failed to resolve filename, unknown package: package://valkyrie/urdf/model/meshes/pelvis/pelvis.dae
warning, cannot find file: package://valkyrie/urdf/model/meshes/pelvis/pelvis.dae
Traceback (most recent call last):
File "/home/rdeits/locomotion/drake/install/lib/python2.7/dist-packages/director/lcmUtils.py", line 119, in handleMessage
callback(msg)
File "/home/rdeits/locomotion/drake/install/lib/python2.7/dist-packages/director/drakevisualizer.py", line 344, in onViewerLoadRobot
self.addLinksFromLCM(msg)
File "/home/rdeits/locomotion/drake/install/lib/python2.7/dist-packages/director/drakevisualizer.py", line 368, in addLinksFromLCM
self.addLink(Link(link), link.robot_num, link.name)
File "/home/rdeits/locomotion/drake/install/lib/python2.7/dist-packages/director/drakevisualizer.py", line 291, in __init__
self.geometry.extend(Geometry.createGeometry(link.name + ' geometry data', g))
File "/home/rdeits/locomotion/drake/install/lib/python2.7/dist-packages/director/drakevisualizer.py", line 264, in createGeometry
polyDataList, visInfo = Geometry.createPolyDataFromFiles(geom)
ValueError: need more than 0 values to unpack
Sorry for your troubles! Is this related to #7855? Or does this seem like another problem?
Unrelated--I've already renamed my checkout to drake
😉
Sorry for the late follow-up, but it seems like the package path issue should be fixed by https://github.com/RobotLocomotion/drake/pull/7774 My assumption is that this may land within the next few business days. Do you have a workaround for this, or is it blocking your work?
(When installed, it looks for
${install}/share/drake/drake/examples/atlas/urdf/atlas_minimal_contact.urdf
, but the file exists at
${install}/share/drake/examples/atlas/urdf/atlas_minimal_contact.urdf
.)
Ok, makes sense, thanks. I can work around it for now.
This should be fixed once the two PRs are merged:
Thank you!
Observed while running the Valkyrie simulation.
drake_visualizer
(installed by Drake) fails with:The result is that the visualizer doesn't find any of the Val meshes and thus can't visualize the robot.
I can reproduce this by building
//...
and runningbazel-bin/tools/drake_visualizer
andbazel-bin/examples/valkyrie/valkyrie_simulation
. Runningdrake_visualizer
withbazel run
does not appear to make a difference.