Commit 2c8caa12 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

[Python] switch to numpy arrays

parent 556fee15
Pipeline #7002 failed with stage
in 4 minutes
......@@ -2,9 +2,12 @@ import sys
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())
......
Markdown is supported
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