This repository was archived by the owner on Feb 16, 2026. It is now read-only.
Replies: 2 comments 12 replies
|
That makes no sense. Could you send a screencap of it happening and shorten your fix then submit a PR? |
1 reply
|
Looking deeper found this: Now, using getZ() function: for both the original and inverted values, this formula yields -3.0276 which is why the yaw is not changing after inversion |
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I have two robots, both with navX, one is upside down, and works great with yagsl out of the box. The other is right side up and I could not get it to work with invert true or false, so I looked in the code and found that the inversion seemed to be having no effect on getZ() from gyro, so I downloaded the library and changed the code in navXSwerve.java to do the inversion in getRotation3d instead of getRawRotation3d and that seems to work.
The right-side-up navX I set invert to true and now it works with this code change:
public Rotation3d getRotation3d()
{
if (inverted) {
return getRawRotation3d().rotateBy(offset.unaryMinus()).unaryMinus();
}
else {
return getRawRotation3d().rotateBy(offset.unaryMinus());
}
}
Don't know why, maybe I am imagining things...
All reactions