My team has a design that is based around a tri point swerve chassis. However, we’re unsure if the software component of this design might be too much to handle for our small code team. Are there any examples of code for a tribot swerve? Im trying to adapt our normal swerve code based on YAGSL for this and I got rid of one of the jsons for a module and the code still builds which tells me YAGSL could theoretically be used for a tripoint.
Thank you in advance
In theory yes, in practice I have absolutely no clue.
246 made a working three-wheel swerve in 2015, if comparing the code calculations to a normal four-module swerve is helpful I’ll link it here.
Disclaimer that I was definitely not on the team then, so I am not familiar with that year’s code; it is also quite a bit out of date in comparison to “modern” swerve code.
theoretically the kinematics should still work if you only use 3 swerve modules, provided the module locations are accurate. i don’t think the implementation should be any different? could totally b wrong tho
The SwerveDriveKinematics
constructor allows for swerve modules to be in any arbitrary position relative to the origin in any amount greater than or equal to two swerve modules. The code would not change all that much. A triangular robot would make finding the encoder offsets more difficult than a rectangular one, though.
Fun fact: a drivetrain with two swerve modules and a caster is kinematically fully actuated (there’s two DOFs per module, so 4 DOFs is enough to actuate x velocity, y velocity, and angular velocity independently of each other).
I mean there is arguably a far more famous 3 module 9 sided robot from 148…
But any FRC swerve not a true holonomic drivetrain (unless you introduced some caster angle).
Go to 2:17 in the 148 video.
my bad, forgot about that in the video
Not necessarily. You can align each module to a frame rail then add/subtract a known amount to get to all pointing straight ahead.