Skip to content
Snippets Groups Projects
Commit b0314014 authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Plot time difference from robot to nominal time

parent 0bbc83a8
Branches master
No related tags found
No related merge requests found
......@@ -15,6 +15,7 @@ if __name__ == '__main__':
t_tot = data[-1,2] - data[0,2]
t_robot = (data[...,1] - data[0,1]) / (data[-1,1] - data[0,1]) * t_tot
t_sensor = (data[...,2] - data[0,2]) / (data[-1,2] - data[0,2]) * t_tot
t_nom = numpy.linspace(0,1,len(t_sensor)) * t_tot
kp = data[...,4:18]
d_kp = kp[1:,1::2]-kp[0:-1,1::2]
......@@ -32,7 +33,9 @@ if __name__ == '__main__':
axarr[2].set_title(r'Torque [Nm]')
axarr[2].plot(seq[cut],torque[...,i][cut])
axarr[3].set_title(r'$t_{robot} - t_{sensor}$')
axarr[3].plot(seq[cut],(t_robot - t_sensor)[cut])
axarr[3].plot(seq[cut], numpy.stack(((t_robot - t_sensor),
(t_robot - t_nom)),
axis=1)[cut])
f.savefig('axis_%d_%s.jpg' % (i + 1, sys.argv[1]))
plt.show()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment