poseEstimator problems woth gyro

ive got a problem with my wpilib swerve pose estimator ability to keep the robots right angle during enable , my pigeon is working good and always accurate but my pose estimator is showing different results , i assumed it is related o the state kalman filter at the poseEstimator constructor so i tried to make it smaller and smaller but it doesnt help , any ideas

Can you link your code so we can look at it?

I HAVE no way of doing that my code isnt on git

but do you have any possible ideas?

Copy and paste relevant sections? It very well could be worth making a git repo on something like GitHub tho

1 Like

This is gonna sound super basic but are you sure that you are using the right units. These kinds of problems can often come from one side using radians and the other using degrees.

yes im sure

Using GitHub is very useful even just within your team even if you’re the only programmer. It allows you to revert back to a specific version, or try different things on different branches etc.

And of course, makes it easy to share code with others online, you just have to share the link.

3 Likes

Different units is possible, also different coordinate systems, ie the gyro set on driver station color (which could be red) but the pose estimation on always blue origin