Open
Description
Maybe there is an explanation, but for me the coeff. for the PID gain is a little bit weird :
def dxl_to_pid(value, model):
return (value[0] * 0.004,
value[1] * 0.48828125,
value[2] * 0.125)
def pid_to_dxl(value, model):
truncate = lambda x: int(max(0, min(x, 254)))
return [truncate(x * y) for x, y in zip(value, (250, 2.048, 8.0))]
Because PID are all beetween 0 and 254 means that when you set in pypot range of :
P (value[2]) is between 0 and 31,75
I (value[1]) is between 0 and 124,0234375
D (value[0]) is between 0 and 1,016
A good PID in pypot could be (8.0, 15.625, 0.064), I find this not really "readable"