4 import pinocchio
as pin
5 from os.path import dirname, join, abspath
11 pinocchio_model_dir = join(dirname(dirname(str(abspath(__file__)))),
"models")
13 model_path = join(pinocchio_model_dir,
"example-robot-data/robots")
14 mesh_dir = pinocchio_model_dir
15 urdf_filename =
"talos_reduced.urdf" 16 urdf_model_path = join(join(model_path,
"talos_data/robots"),urdf_filename)
18 model, collision_model, visual_model = pin.buildModelsFromUrdf(urdf_model_path, mesh_dir, pin.JointModelFreeFlyer())
23 viz.loadViewerModel(
"pinocchio")
26 q0 = pin.neutral(model)
31 viz2.initViewer(viz.viewer)
32 viz2.loadViewerModel(rootNodeName =
"pinocchio2")
37 input(
"Press enter to exit...")