My team would like to use a swerve drive robot using Falcon 500s. If you could please help me fix some import errors that would be greatly appreciated.
We can try but we need more details. What’s going on?
Also have you ever done swerve before?
This is our first time trying Swerve Drive
We looked at team 2910’s code, but we are stuck on how to modify the import.
Ok. Full disclosure, it’s halfway through the build season. Call me a pessimist but I don’t think this is a good time to try to make swerve work.
With that said, those imports are relative to the 2910 code, not your code. You will need to copy paste those files and anything they depend upon into your own code, or setup your project on their codebase
Ok so do you guys have common installed? What I would do is clone the repo into a folder called common and update your .gradle files accordingly and that should fix it.
EDIT: Here is a link to the common repo: https://github.com/FRCTeam2910/Common
If you’re just cloning the example swerve repo, it should work on its own without doing what I said previously. Have you tried another import within the common package? Does that work or does it still throw an import error?
This is where we are getting our code from.
Try running this command
./gradlew build --refresh-dependencies
This should redownload all the dependencies required by the project. Seems like the common package is imported with jitpack so refreshing the dependencies should fix your issue. If not, try re installing the example code and building again and see if it works in the newly installed one.
Hey thanks for to help so far, I tried your suggestion, and I came across errors for the package imports, for each file.
So errors even with the command and a re install? Thats weird. Can you try cloning the common repo https://github.com/FRCTeam2910/Common and putting it in a folder called common and follow the instructions on the README of that repo on how to install it properly. That should fix the import errors for the common package.
Thank you so much for your help we were able to get rid of all the errors. We greatly appreciate it.
By the way if you could help us change the CANS to TalonSRX, that would be greatly appreciated.
Hey no problem! So what doo you mean exactly changing from CANS to TalonSRX? Those are two relatively different things. CAN (at an extremely vague level) is the way components (mainly motor controllers) communicate. TalonSRX is a type of motor controller. Do you mean changing from CANSparkMax to TalonSRX?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.