Hi,
Right now our team has a 28 x 28 frame for our swerve drive system. We already calculated offsets and are wondering if we changed the frame to 28 x 29, would that affect the offsets? Thanks.
Hi,
Right now our team has a 28 x 28 frame for our swerve drive system. We already calculated offsets and are wondering if we changed the frame to 28 x 29, would that affect the offsets? Thanks.
What angle the wheel points to isn’t effected by the robot geometry (regardless of your frame size forward is forward and 47° is 47°). What would be effected is the angle the wheels need to be at to spin in place.
or to rotate at all
As stated above, changing the frame doesn’t affect individual positions. However when you change the frame, you have to alter the swerve code a little bit.
If the swerve code is done correctly, you should be able to change your wheelBase
and trackWidth
. Now if the positions of the swerve modules didn’t change (unlikely if you change your frame), you should still be ok.
Just to reiterate: what matters is the wheel base. If the distance between your modules changed, then code needs to be updated.
To give a hint, to rotate in place, the wheels need to be perpendicular to the diagonal of the wheel base. For a perfect square, this will be a multiple of 45 degrees for each wheel. As you widen the wheel base, these angles will skew towards forward/back, and as you get narrower, they skew more towards left/right. Exactly what angle depends on the dimensions of your wheel base. Again, the wheel base is what’s important here; measure your length and width between the centers of your wheels for calculating this, not the edges of your frame.
As hinted by the post above, the most robust way to code a swerve for changes like these is to simply define these easily measured parameters and let the program calculate the rest.