Skip to content
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

SysId routines log has wrong units. Also use appropriate units/scaling when running SysID tool. #15

Open
brettle opened this issue Mar 5, 2024 · 1 comment
Assignees

Comments

@brettle
Copy link
Member

brettle commented Mar 5, 2024

.angularVelocity(velocity.mut_replace(
armMasterEncoder.getVelocity() / 60,
RotationsPerSecond))
.angularPosition(distance.mut_replace(
armMasterEncoder.getPosition(),
Rotations));

Since the constructor sets the conversion factors for the encoder, the returned values will be rads and rads/s, not rots and rots/s.

Separately, no matter what units you actually log with, wpilib's sysid logging code will convert your measurements to rots and rots/sec and that's what the sysid tool will assume is in the log. As a result, to get the sysid tool to produce constants that use rads instead of rots you'll need to make the following changes in the Data Seletor pane before clicking "Load": 1) change the units in the Data Selector pane to radians, and 2) set both the Velocity scaling and Position scaling to 2*pi.

@stwiggy stwiggy closed this as completed Mar 6, 2024
@brettle
Copy link
Member Author

brettle commented Mar 6, 2024

Value passed for velocity is wrong.

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

No branches or pull requests

4 participants