Skip to content

Document how to add kS to simulation #1775

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
virtuald opened this issue Mar 28, 2022 · 1 comment
Open

Document how to add kS to simulation #1775

virtuald opened this issue Mar 28, 2022 · 1 comment

Comments

@virtuald
Copy link
Member

The section on sysid details kS, kV, and kA... but the differential drive simulator only deals with kV and kA and completely ignores kS. I found that the behavior in simulation was close, but still noticably different from Real Life until I accounted for kS.

The dumb-simple way I integrated kS (linear only) was with the following:

kS = self.kS_linear
if l_voltage > kS:
    l_voltage -= kS
elif l_voltage < -kS:
    l_voltage += kS
else:
    l_voltage = 0

if r_voltage > kS:
    r_voltage -= kS
elif r_voltage < -kS:
    r_voltage += kS
else:
    r_voltage = 0

Once I added that.. the robot movement was much closer to what I expected. I suspect it's not quite right though.

It's possible that one result of this documentation request might end up as an addition to the simulation classes in addition to the documentation.

@calcmogul
Copy link
Member

I haven't done anything rigorous yet like I did for the drivetrain K_v/K_a sysid model, but the threshold is probably some kind of weighted average between K_s,linear if V_l = V_r and K_s,angular if V_l = -V_r.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants