Skip to content
Snippets Groups Projects
Commit 5881a552 authored by olivier stasse's avatar olivier stasse Committed by GitHub
Browse files

Merge pull request #25 from proyan/master

[python] DynamicPinocchio is the new (plugin/module name) being generated
parents 1a7ef61b 64474532
No related branches found
No related tags found
No related merge requests found
from dynamic import Dynamic as DynamicOld
from dynamic import DynamicPinocchio as DynamicCpp
from angle_estimator import AngleEstimator
from zmp_from_forces import ZmpFromForces
import numpy as np
......@@ -6,9 +6,9 @@ from numpy import arctan2, arcsin, sin, cos, sqrt
#DynamicOld = Dynamic
class Dynamic (DynamicOld):
class DynamicPinocchio (DynamicCpp):
def __init__(self, name):
DynamicOld.__init__(self, name)
DynamicCpp.__init__(self, name)
self.model = None
self.data = None
......
......@@ -376,7 +376,7 @@ class AbstractHumanoidRobot (object):
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)
from dynamic_graph.sot.dynamics import Dynamic
from dynamic_graph.sot.dynamics_pinocchio import DynamicPinocchio
class HumanoidRobot(AbstractHumanoidRobot):
def __init__(self, name, pinocchio_model, pinocchio_data, initialConfig, OperationalPointsMap = None, tracer = None):
AbstractHumanoidRobot.__init__(self, name, tracer)
......@@ -385,7 +385,7 @@ class HumanoidRobot(AbstractHumanoidRobot):
self.OperationalPoints.append('chest')
self.OperationalPointsMap = OperationalPointsMap
self.dynamic = Dynamic(self.name + "_dynamic")
self.dynamic = DynamicPinocchio(self.name + "_dynamic")
self.dynamic.setModel(pinocchio_model)
self.dynamic.setData(pinocchio_data)
self.dimension = self.dynamic.getDimension()
......
......@@ -7,7 +7,7 @@
#
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
class Parser (object):
......@@ -56,7 +56,7 @@ class Parser (object):
robotTag = "HPP_HUMANOID_ROBOT"
def __init__(self, entityName, filename):
self.entity = Dynamic(entityName)
self.entity = DynamicPinocchio(entityName)
self.filename = filename
def parse (self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment