Is there a way I can find only one component (one axis, side to side) of the velocity of our swerve robot? I’m not sure how to do this programmatically.
find the velocity of the wheels using an encoder, then find their angle as well, then take all of their velocity vectors add them together and average for 4 motors, then you can just take the sin or cos of that angle and velocity vector to find the velocity in the wanted direction
you could also integrate the acceleration using a gyro and average over a period of time
1 Like
Or put a “follower” non-driven omni wheel under the middle of your robot with an encoder.
Is that in response to some of the solutions mentioned in this thread? @mods
Consider reading up on the WPI tools to convert swerve drive module angles / speeds to chassis speeds
2 Likes
See other thread mentioned.