5 import pinocchio
as pin
9 from os.path import dirname, join, abspath
14 if tuple(map(int, fcl.__version__.split(
"."))) >= (3, 0, 0):
15 with_octomap = fcl.WITH_OCTOMAP
20 "This example is skiped as HPP-FCL has not been compiled with octomap support."
24 collision_model = pin.GeometryModel()
26 octree = fcl.makeOctree(np.random.rand(1000, 3), 0.01)
27 octree_object = pin.GeometryObject(
"octree", 0, pin.SE3.Identity(), octree)
28 octree_object.meshColor[0] = 1.0
29 collision_model.addGeometryObject(octree_object)
31 visual_model = collision_model
41 viz.initViewer(open=
True)
42 except ImportError
as err:
44 "Error while initializing the viewer. It seems you should install Python meshcat"
50 viz.clearDefaultLights()