Skip to content

Document how to add kS to simulation #1775

Open
@virtuald

Description

@virtuald

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions