Skip to content
Snippets Groups Projects
Commit 88409535 authored by Nicolas Mansard's avatar Nicolas Mansard
Browse files

Uses fast forward to correct the history

parent 06b9db7d
No related branches found
No related tags found
No related merge requests found
...@@ -71,6 +71,6 @@ class Calendar: ...@@ -71,6 +71,6 @@ class Calendar:
return calendarDeco return calendarDeco
def fastForward(self,t): def fastForward(self,t):
for i in range(t): self.run(i) for i in range(t+1): self.run(i)
attime=Calendar() attime=Calendar()
...@@ -23,7 +23,10 @@ class History: ...@@ -23,7 +23,10 @@ class History:
t= int(t/self.freq) t= int(t/self.freq)
print "robot.set(",self.q[t],")" print "robot.set(",self.q[t],")"
print "robot.setVelocity(",self.qdot[t],")" print "robot.setVelocity(",self.qdot[t],")"
print "robot.state.time = ",t print "T0 = ",t
print "robot.state.time = T0"
print "[ t.feature.position.recompute(T0) for t in taskrh,tasklh]"
print "attime.fastForward(T0)"
def dumpToOpenHRP(self,baseName = "dyninv",sample = 1): def dumpToOpenHRP(self,baseName = "dyninv",sample = 1):
filePos = open(baseName+'.pos','w') filePos = open(baseName+'.pos','w')
fileRPY = open(baseName+'.hip','w') fileRPY = open(baseName+'.hip','w')
......
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