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