Commit b0314014 by Anders Blomdell

### Plot time difference from robot to nominal time

parent 0bbc83a8
 ... @@ -15,6 +15,7 @@ if __name__ == '__main__': ... @@ -15,6 +15,7 @@ if __name__ == '__main__': t_tot = data[-1,2] - data[0,2] t_tot = data[-1,2] - data[0,2] t_robot = (data[...,1] - data[0,1]) / (data[-1,1] - data[0,1]) * t_tot 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_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] kp = data[...,4:18] d_kp = kp[1:,1::2]-kp[0:-1,1::2] d_kp = kp[1:,1::2]-kp[0:-1,1::2] ... @@ -32,7 +33,9 @@ if __name__ == '__main__': ... @@ -32,7 +33,9 @@ if __name__ == '__main__': axarr[2].set_title(r'Torque [Nm]') axarr[2].set_title(r'Torque [Nm]') axarr[2].plot(seq[cut],torque[...,i][cut]) axarr[2].plot(seq[cut],torque[...,i][cut]) axarr[3].set_title(r'\$t_{robot} - t_{sensor}\$') 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])) f.savefig('axis_%d_%s.jpg' % (i + 1, sys.argv[1])) plt.show() plt.show() ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!