Commit 64474532 authored by Rohan Budhiraja's avatar Rohan Budhiraja
Browse files

[python] DynamicPinocchio is the new (plugin/module name) being generated

parent 1a7ef61b
from dynamic import Dynamic as DynamicOld from dynamic import DynamicPinocchio as DynamicCpp
from angle_estimator import AngleEstimator from angle_estimator import AngleEstimator
from zmp_from_forces import ZmpFromForces from zmp_from_forces import ZmpFromForces
import numpy as np import numpy as np
...@@ -6,9 +6,9 @@ from numpy import arctan2, arcsin, sin, cos, sqrt ...@@ -6,9 +6,9 @@ from numpy import arctan2, arcsin, sin, cos, sqrt
#DynamicOld = Dynamic #DynamicOld = Dynamic
class Dynamic (DynamicOld): class DynamicPinocchio (DynamicCpp):
def __init__(self, name): def __init__(self, name):
DynamicOld.__init__(self, name) DynamicCpp.__init__(self, name)
self.model = None self.model = None
self.data = None self.data = None
......
...@@ -376,7 +376,7 @@ class AbstractHumanoidRobot (object): ...@@ -376,7 +376,7 @@ class AbstractHumanoidRobot (object):
self.dynamic.signal(self.OperationalPointsMap[op]).recompute(self.device.state.time+1) self.dynamic.signal(self.OperationalPointsMap[op]).recompute(self.device.state.time+1)
self.dynamic.signal('J'+self.OperationalPointsMap[op]).recompute(self.device.state.time+1) self.dynamic.signal('J'+self.OperationalPointsMap[op]).recompute(self.device.state.time+1)
from dynamic_graph.sot.dynamics import Dynamic from dynamic_graph.sot.dynamics_pinocchio import DynamicPinocchio
class HumanoidRobot(AbstractHumanoidRobot): class HumanoidRobot(AbstractHumanoidRobot):
def __init__(self, name, pinocchio_model, pinocchio_data, initialConfig, OperationalPointsMap = None, tracer = None): def __init__(self, name, pinocchio_model, pinocchio_data, initialConfig, OperationalPointsMap = None, tracer = None):
AbstractHumanoidRobot.__init__(self, name, tracer) AbstractHumanoidRobot.__init__(self, name, tracer)
...@@ -385,7 +385,7 @@ class HumanoidRobot(AbstractHumanoidRobot): ...@@ -385,7 +385,7 @@ class HumanoidRobot(AbstractHumanoidRobot):
self.OperationalPoints.append('chest') self.OperationalPoints.append('chest')
self.OperationalPointsMap = OperationalPointsMap self.OperationalPointsMap = OperationalPointsMap
self.dynamic = Dynamic(self.name + "_dynamic") self.dynamic = DynamicPinocchio(self.name + "_dynamic")
self.dynamic.setModel(pinocchio_model) self.dynamic.setModel(pinocchio_model)
self.dynamic.setData(pinocchio_data) self.dynamic.setData(pinocchio_data)
self.dimension = self.dynamic.getDimension() self.dimension = self.dynamic.getDimension()
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
import xml.dom.minidom as dom import xml.dom.minidom as dom
from dynamic_graph.sot.dynamics_pinocchio.dynamic import Dynamic from dynamic_graph.sot.dynamics_pinocchio.dynamic import DynamicPinocchio
from dynamic_graph.sot.tools.se3 import SE3, R3, SO3 from dynamic_graph.sot.tools.se3 import SE3, R3, SO3
class Parser (object): class Parser (object):
...@@ -56,7 +56,7 @@ class Parser (object): ...@@ -56,7 +56,7 @@ class Parser (object):
robotTag = "HPP_HUMANOID_ROBOT" robotTag = "HPP_HUMANOID_ROBOT"
def __init__(self, entityName, filename): def __init__(self, entityName, filename):
self.entity = Dynamic(entityName) self.entity = DynamicPinocchio(entityName)
self.filename = filename self.filename = filename
def parse (self): def parse (self):
......
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