Commit 183bfcd9 authored by Rohan Budhiraja's avatar Rohan Budhiraja
Browse files

[python] Edit Class HRP2 to conform to sot-dynamic API changes

parent 6699b4bd
......@@ -21,7 +21,7 @@ import numpy as np
#Don't change this order
from dynamic_graph.sot.dynamics.humanoid_robot import AbstractHumanoidRobot
from dynamic_graph.ros import RosRobotModel
import pinocchio as se3
from rospkg import RosPack
......@@ -66,8 +66,7 @@ class Hrp2(AbstractHumanoidRobot):
return res
def __init__(self, name, robotnumber,
device = None,
tracer = None):
device = None, tracer = None):
AbstractHumanoidRobot.__init__ (self, name, tracer)
......@@ -97,12 +96,15 @@ class Hrp2(AbstractHumanoidRobot):
self.dynamic = RosRobotModel("{0}_dynamic".format(name))
rospack = RosPack()
self.urdfPath = rospack.get_path('hrp2_{0}_description'.format(robotnumber)) + '/urdf/hrp2_{0}.urdf'.format(robotnumber)
self.pinocchioModel = se3.buildModelFromUrdf(self.urdfPath, se3.JointModelFreeFlyer())
self.pinocchioData = self.pinocchioModel.createData()
self.dimension = self.dynamic.getDimension()
self.plugVelocityFromDevice = True
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