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

AngularRampLogger broken due to a problem with 10.0 FTC SDK #405

Closed
anpark1234 opened this issue Sep 19, 2024 · 1 comment
Closed

AngularRampLogger broken due to a problem with 10.0 FTC SDK #405

anpark1234 opened this issue Sep 19, 2024 · 1 comment

Comments

@anpark1234
Copy link

RR FTC Version

0.1.13

Observed Behavior

AngularRampLogger is producing weird results with the new 10.0 FTC SDK. With 10.0, the graph doesn't follow a straight line, the angular velocity is really high, and the resulting track width calculated is way too low. I've attached the plots from the same code and robot using SDK 9.2 vs. 10.0.

It appears there is a problem with imu.getRobotAngularVelocity(AngleUnit.RADIANS) returning strange values. See the issue filed here.

I downloaded the road-runner-ftc project so I could modify AngularRampLogger in Tuning.kt, and I implemented a workaround in my local version which appears to resolve the problem:

val av = view.imu.get().getRobotAngularVelocity(AngleUnit.**DEGREES**)
val time = t.addSplit()

data.angVels[0].times.add(time)
data.angVels[1].times.add(time)
data.angVels[2].times.add(time)

data.angVels[0].values.add(**Math.toRadians(**av.xRotationRate.toDouble()**)**)
data.angVels[1].values.add(**Math.toRadians(**av.yRotationRate.toDouble()**)**)
data.angVels[2].values.add(**Math.toRadians(**av.zRotationRate.toDouble()**)**)

Do we need to wait for a fix in the SDK or can you check and implement this workaround in RR?

TrackWidthRegression_v9_2
TrackWidthRegression_v10_0

Tuning Files

No response

Robot Logs

No response

@ArushYadlapati
Copy link

I am also having this issue with 3 Dead Wheel Odometry. In the near future when I try tuning RR v.1.0 with OTOS, I will see if this also happens with AngularRampLogger, as you only need trackWidthTicks.

@rbrott rbrott closed this as completed in a05fae8 Sep 19, 2024
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

2 participants