Verified Commit 7b2918a4 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

example: add plot ofa convex object

parent db2ee654
......@@ -45,6 +45,17 @@ viz.display(q0)
viz.displayCollisions(True)
viz.displayVisuals(False)
mesh = visual_model.geometryObjects[0].geometry
mesh.buildConvexRepresentation(True)
convex = mesh.convex
if convex is not None:
placement = pin.SE3.Identity()
placement.translation[0] = 2.
geometry = pin.GeometryObject("convex",0,convex,placement)
geometry.meshColor = np.ones((4))
visual_model.addGeometryObject(geometry)
# Display another robot.
viz2 = MeshcatVisualizer(model, collision_model, visual_model)
viz2.initViewer(viz.viewer)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment