0

I've tried to run tutorial example of kuka robot from website https://drake.guzhaoyuan.com/ but it failed while reading .obj files.

command: ./bazel-bin/manipulation/util/geometry_inspector ./manipulation/models/iiwa_description/sdf/iiwa14_no_collision.sdf

error: ERROR: In /vtk/IO/Import/vtkOBJImporter.cxx, line 495 vtkOBJPolyDataProcessor (0x5620bd39e440): Error reading 'v' at line 3

Things I've tried so far:

  • Open .obj files with Mashlab and save with character "v" (3 floats / 6 floats)
  • Open .obj files with Mashlab and save with character "vn" (3 floats)

Software:

  • Ubuntu 18.04.4 LTS
  • VTK version 7.1.1
yacotaco
  • 1
  • 1

1 Answers1

0

The "VTK version 7.1.1" is a red flag for me. Drake explicitly uses version 8.2. So, the error may simply come down to the fact that you're connecting to an archaic vtk.

Try:

strace -o trace_output.txt python ./bazel-bin/manipulation/util/geometry_inspector  ./manipulation/models/iiwa_description/sdf/iiwa14_no_collision.sdf

And then search te file trace_output.txt for libvtkIOGeometry. My results include:

stat("/home/seancurtis/code/drake/bazel-bin/manipulation/util/geometry_inspector.runfiles/drake/bindings/pydrake/../../_solib_k8/_U@vtk_S_S_CvtkIOGeometry___Ulib/haswell", 0x7ffd1a5cb790) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/seancurtis/code/drake/bazel-bin/manipulation/util/geometry_inspector.runfiles/drake/bindings/pydrake/../../_solib_k8/_U@vtk_S_S_CvtkIOGeometry___Ulib/x86_64/libvtkIOGeometry-8.2.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/home/seancurtis/code/drake/bazel-bin/manipulation/util/geometry_inspector.runfiles/drake/bindings/pydrake/../../_solib_k8/_U@vtk_S_S_CvtkIOGeometry___Ulib/x86_64", 0x7ffd1a5cb790) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/seancurtis/code/drake/bazel-bin/manipulation/util/geometry_inspector.runfiles/drake/bindings/pydrake/../../_solib_k8/_U@vtk_S_S_CvtkIOGeometry___Ulib/libvtkIOGeometry-8.2.so.1", O_RDONLY|O_CLOEXEC) = 3

I've only included two lines: THere are multiple instances that finish with = -1 ENOENT (No such file or directory) and one that ends in = 3. In all cases, the library its looking for is: libvtkIOGeometry-8.2.so.1.

What does your show? I suspect the wrong one. If it does, we'll have to drag one of the build experts in to figure out why you're getting the wrong vtk. But we can prime that with the answers to the following question:

How do you have drake on your machine? Install? Build from source?

Sean Curtis
  • 1,425
  • 7
  • 8
  • I've made "Source installation (macOS, Ubuntu)" https://drake.mit.edu/from_source.html I've updated VTK to 8.2 and made new build of drake. – yacotaco Aug 27 '21 at 17:09
  • Result of strace: `stat("/home/dev/Dokumenty/dev/drake/bazel-bin/manipulation/util/geometry_inspector.runfiles/drake/bindings/pydrake/../../_solib_k8/_U@vtk_S_S_CvtkIOLegacy___Ulib/x86_64", 0x7ffd53183d20) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/home/dev/Dokumenty/dev/drake/bazel-bin/manipulation/util/geometry_inspector.runfiles/drake/bindings/pydrake/../../_solib_k8/_U@vtk_S_S_CvtkIOLegacy___Ulib/libvtkIOLegacy-8.2.so.1", O_RDONLY|O_CLOEXEC) = 3` – yacotaco Aug 27 '21 at 17:10
  • I've tried version 0.20.0 (tutorial is based on this release) but I am unable to run it due to import error `ModuleNotFoundError: No module named 'vtkRenderingOSPRayPython'`. I've also tried build this version with bazel but it failed on fetching "sphinx" `ERROR: An error occurred during the fetch of repository 'sphinx'` – yacotaco Aug 28 '21 at 09:35
  • The strace result shows `libvtkIOLegacy` but not `libvtkIOGeometry` Why is that? Also, "I've updated vtk to 8.2" is also a bit worrying. I still suspect that you must be getting fighting between your own install of vtk and the one drake brings along. Finally, I'd recommend using the newest version in master. It's better to use the current supported version (and we can update tutorials as necessary). But mixing and matching will cause problems. But I suspect we're making progress. – Sean Curtis Aug 28 '21 at 22:17
  • Result of strace: `stat("/home/dev/Dokumenty/dev/drake/bazel-bin/manipulation/util/geometry_inspector.runfiles/drake/bindings/pydrake/../../_solib_k8/_U@vtk_S_S_CvtkIOGeometry___Ulib/x86_64", 0x7ffc45e55ab0) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/home/dev/Dokumenty/dev/drake/bazel-bin/manipulation/util/geometry_inspector.runfiles/drake/bindings/pydrake/../../_solib_k8/_U@vtk_S_S_CvtkIOGeometry___Ulib/libvtkIOGeometry-8.2.so.1", O_RDONLY|O_CLOEXEC) = 3` – yacotaco Aug 29 '21 at 07:03
  • I've deleted all files (drake clone from github, drake install, vtk install). This time I made build described in `geometry_inspector.py` (with meshcat). Drake still has a problem with opening .obj but meshcat works fine. So for now I'll experiment with drake/meshcat blend. – yacotaco Aug 29 '21 at 09:13
  • The only thing which runs in drake visualizer is acrobot but it does not need .obj files. I wonder if converting .obj files and replacing `vtkOBJImporter.cxx` with importer for other format will do the trick. – yacotaco Aug 29 '21 at 09:51
  • I'm out of suggestions -- we'll have to get someone who is better acquainted with the intricacies of the build system. – Sean Curtis Aug 30 '21 at 12:45