My team(Torbotics 2080) has recently gotten swerve drive. As lead programmer I am trying to program this type of drive. I found a few tutorials online, however the one I found was in Java. my team uses C++ I can’t figure out how to convert this bit of code to C++. Anyone that could help would be very appreciated. BTW the website we used as a guide was Part 2. Driving · FRC Swerve Drive Programming
Here’s the link from there: allwpilib/wpilibcExamples/src/main/cpp/examples/SwerveBot at master · wpilibsuite/allwpilib · GitHub. There’s been changes since the 2020.3.2 release that won’t build with 2020.3.2 (namely, splitting units.h into separate headers). If you don’t care about feedforward and slew rate limiting that were recently added, you could use the SwerveBot example that came with 2020.3.2.