Skip to content
Snippets Groups Projects
Commit 9b23f4f0 authored by Francesco Morsillo's avatar Francesco Morsillo
Browse files

Fixed bug in setGain() and added reference input type in MetaTaskDynPosture.gotoq()

parent b0aba963
No related branches found
No related tags found
No related merge requests found
...@@ -10,7 +10,7 @@ def setGain(gain,val): ...@@ -10,7 +10,7 @@ def setGain(gain,val):
if val!=None: if val!=None:
if isinstance(val,int) or isinstance(val,float): if isinstance(val,int) or isinstance(val,float):
gain.setConstant(val) gain.setConstant(val)
if len(val)==1: elif len(val)==1:
gain.setConstant(val[0]) gain.setConstant(val[0])
elif len(val)==3: gain.set( val[0],val[1],val[2]) elif len(val)==3: gain.set( val[0],val[1],val[2])
elif len(val)==4: gain.setByPoint( val[0],val[1],val[2],val[3]) elif len(val)==4: gain.setByPoint( val[0],val[1],val[2],val[3])
...@@ -109,6 +109,7 @@ class MetaTaskDynPosture(object): ...@@ -109,6 +109,7 @@ class MetaTaskDynPosture(object):
r = self.postureRange[n] r = self.postureRange[n]
act += r act += r
if isinstance(v,matrix): qdes[r,0] = vectorToTuple(v) if isinstance(v,matrix): qdes[r,0] = vectorToTuple(v)
if isinstance(v,ndarray): qdes[r,0] = vectorToTuple(v)
else: qdes[r,0] = v else: qdes[r,0] = v
self.ref = vectorToTuple(qdes) self.ref = vectorToTuple(qdes)
self.feature.selec.value = toFlags(act) self.feature.selec.value = toFlags(act)
......
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