stack-of-tasks / pinocchio

A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
http://stack-of-tasks.github.io/pinocchio/
BSD 2-Clause "Simplified" License
1.92k stars 395 forks source link

Problem using meshcat #1371

Closed jviereck closed 3 years ago

jviereck commented 3 years ago

I try to run the visualization demo for solo12 using meshcat 1. For me this results in the following UserWarning:

/usr/local/Cellar/python@3.9/3.9.0_4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py:127: RuntimeWarning: 'meshcat.servers.zmqserver' found in sys.modules after import of package 'meshcat.servers', but prior to execution of 'meshcat.servers.zmqserver'; this may result in unpredictable behaviour
  warn(RuntimeWarning(msg))
You can open the visualizer by visiting the following URL:
http://127.0.0.1:7000/static/
/usr/local/Cellar/pinocchio/2.5.2/lib/python3.9/site-packages/pinocchio/visualize/meshcat_visualizer.py:147: UserWarning: Error while loading geometry object: base_link_0
Error message:
No to_python (by-value) converter found for C++ type: boost::shared_ptr<hpp::fcl::CollisionGeometry>
  self.loadViewerGeometryObject(visual,pin.GeometryType.VISUAL,color)

This is on macOS where I installed pinocchio using homebrew.

Any idea how this could be fixed?

jcarpent commented 3 years ago

You did not install Pinocchio with the hpp-fcl support ;)

jcarpent commented 3 years ago

OK. If it is related to homebrew, I will have a look.

jcarpent commented 3 years ago

In between, you can also rely on conda.

jviereck commented 3 years ago

Thanks a lot, the pointer to hpp-fcl helped!

It looks like hpp-fcl was installed but not linked. So after running

jviereck@rams:demos$ brew install hpp-fcl
Warning: gepetto/gepetto/hpp-fcl 1.6.0 is already installed, it's just not linked
You can use `brew link hpp-fcl` to link this version.
jviereck@rams:demos$ brew link hpp-fcl

things are working fine now for me. Thanks a lot!