diff --git a/python/example_robot_data/robots_loader.py b/python/example_robot_data/robots_loader.py index 00cdd8a..8d36a81 100644 --- a/python/example_robot_data/robots_loader.py +++ b/python/example_robot_data/robots_loader.py @@ -2,9 +2,12 @@ from os.path import dirname, exists, join import numpy as np + import pinocchio from pinocchio.robot_wrapper import RobotWrapper +pinocchio.switchToNumpyArray() + def getModelPath(subpath, printmsg=False): paths = [ @@ -145,7 +148,7 @@ def loadTalosLegs(): robot.visual_data = pinocchio.GeometryData(g2) # Load SRDF file - robot.q0 = np.matrix(np.resize(robot.q0, robot.model.nq)).T + robot.q0 = np.array(np.resize(robot.q0, robot.model.nq)).T readParamsFromSrdf(robot, modelPath + SRDF_SUBPATH, False) assert ((m2.armature[:6] == 0.).all())