diff --git a/python/dyndebug.py b/python/dyndebug.py index ebe10953f47d5207121dd5f1eb3b8c14c2ea4d32..acb6d49b60fb17355274c23fdba84fac269ff1a8 100644 --- a/python/dyndebug.py +++ b/python/dyndebug.py @@ -6,7 +6,7 @@ from dynamic_graph.sot.dyninv import * import dynamic_graph.script_shortcuts from dynamic_graph.script_shortcuts import optionalparentheses from dynamic_graph.matlab import matlab -from MetaTask6d import MetaTaskDyn6d +from meta_task_dyn_6d import MetaTaskDyn6d from robotSpecific import pkgDataRootDir,modelName,robotDimension,initialConfig,gearRatio,inertiaRotor robotName = 'hrp10small' diff --git a/python/meta_task_dyn_6d.py b/python/meta_task_dyn_6d.py new file mode 100644 index 0000000000000000000000000000000000000000..44e55f58b2079162abac63c83c4408c5c12b7d18 --- /dev/null +++ b/python/meta_task_dyn_6d.py @@ -0,0 +1,20 @@ +from dynamic_graph import plug +from dynamic_graph.sot.core import GainAdaptive +from dynamic_graph.sot.dyninv import TaskDynPD +from dynamic_graph.sot.core.meta_task_6d import MetaTask6d + +class MetaTaskDyn6d(MetaTask6d): + def createTask(self): + self.task = TaskDynPD('task'+self.name) + self.task.dt.value = 1e-3 + def createGain(self): + self.gain = GainAdaptive('gain'+self.name) + self.gain.set(1050,45,125e3) + def plugEverything(self): + self.feature.sdes.value = self.featureDes.name + plug(self.dyn.signal(self.opPoint),self.feature.signal('position')) + plug(self.dyn.signal('J'+self.opPoint),self.feature.signal('Jq')) + self.task.add(self.feature.name) + plug(self.dyn.velocity,self.task.qdot) + plug(self.task.error,self.gain.error) + plug(self.gain.gain,self.task.controlGain)