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

NavX IMU: Localization is off. #349

Open
SAK-20744 opened this issue Jan 18, 2024 · 2 comments
Open

NavX IMU: Localization is off. #349

SAK-20744 opened this issue Jan 18, 2024 · 2 comments
Labels
old-quickstart old 0.5.x quickstart

Comments

@SAK-20744
Copy link

SAK-20744 commented Jan 18, 2024

getting correct values from the NavX, but the localization is jerky. Not sure if it is because of an incorrect parallel odo pod placement, or navX heading velocity. (Manually calculated, as the NavX does not give heading velocity normally.) In this clip, the robot is just spinning in a circle.

72704586282__8FD582A0-4A63-4336-A03D-925C85F1C012.mov

I believe it has something to do with the way I calculated external heading, but I am not 100% sure.

public Double getExternalHeadingVelocity() {
double velInitial = Math.toRadians(-navx_device.getYaw());
double timeInitial = System.nanoTime();
double velFinal = Math.toRadians(-navx_device.getYaw());
double timeFinal = System.nanoTime();
double deltaV = velFinal - velInitial;
double deltaT = timeFinal - timeInitial;
double headingVel = deltaV/deltaT;
return headingVel;
}

@rbrott rbrott added the old-quickstart old 0.5.x quickstart label Jan 23, 2024
@rbrott
Copy link
Member

rbrott commented Jan 23, 2024

Heading velocity does not affect localization. Looks like your parallel odo pod positions are off.

@SAK-20744
Copy link
Author

thats a relief. Thanks.

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

No branches or pull requests

2 participants