I've been following along in this thread and have been able to achieve decent functionality with a similar setup (THCAD-300 instead of -10). However, I think I'm running into corner lock issues. After looking into THC_PID.comp, I'm a little stumped by this line:
Code:
float min_velocity = requested_vel -(requested_vel*(1/velocity_tol));
where velocity_tol is a number between 0.1 and 1 (as per JT's shared config).
Code:
<spinbox>
<width>"5"</width>
<halpin>"vel-tol"</halpin>
<min_>.01</min_>
<max_>1</max_>
<resolution>0.01</resolution>
<initval>0.2</initval>
<format>"1.2f"</format>
<font>("Arial",10)</font>
</spinbox>
Taking requested_vel as say, 1.0, min_velocity works out to be [1.0 - (1.0*(1/0.2))] = -4. This forces min_velocity to always be less than current_vel, and
Code:
if(current_vel > 0 && current_vel >= min_velocity){vel_status = 1;}
else {vel_status = 0;}
always having vel_status = 1. Therefore, correction is always performed even while going into corners. Am I incorrect here?
I looked at the original THC.comp and the above line was a little different:
Code:
float min_velocity = requested_vel -(requested_vel*(velocity_tol*0.01));
I am guessing that the velocity_tol in this one assumed a number between 1 and 100?