How to use YAGSL?

Hey guys I followed all the steps and now I am stuck on what to do. Can I just use the SwerveDrive object in my code? I checked the java docs and all the methods for SwerveDrive class seems to be void functions, not command functions. I am stuck. Can someone please help me?

Here are the links I have used:

GitHub - BroncBotz3481/YAGSL-Example: Yet Another General Swerve Library Example Project Take a look at the example library.

3 Likes

Thanks! I have one quick question regarding the code. What does
swerveDrive.setHeadingCorrection(false); // Heading correction should only be used while controlling the robot via angle. mean? I searched up heading correction and it seems to ensure the robot maintains a specific orientation or corrects its heading if it deviates from the intended direction. Why is it disabled in this case?

It is very aggressive and if you control the robot via angular rotation it will feel “snappy” or refuse to turn.

Thanks! What does it mean to control the robot via angular rotation? What is the default way of managing turns right now?

Default way is getting the input from your controller to turn your robot. What is means is that the heading correction works best if you are setting your heading to an explicit angle, rather than attempting to correct the rotation you are setting from your joystick.

2 Likes