stephane-caron / pink

Python inverse kinematics based on Pinocchio
Apache License 2.0
279 stars 16 forks source link

viz bug in example #117

Closed longwoo closed 1 month ago

longwoo commented 1 month ago

In humanoid_draco3.py and humanoid_sigmaban.py , viz should be used as follow

-    viz = pin.visualize.MeshcatVisualizer(
-        robot.model, robot.collision_model, robot.visual_model
-    )
-    robot.setVisualizer(viz, init=False)
-    viz.initViewer(open=True)
-    viz.loadViewerModel()
+    viz = start_meshcat_visualizer(robot)
stephane-caron commented 1 month ago

Thank you for this suggestion. This was not a bug as the example ran, but it is indeed shorter to use the start_meshcat_visualizer utility function, and this was inconsistent with the other examples. As of 56f72ad2d6e359d45d04d2ee86df304856e8b406 all examples now follow the same pattern :+1: