Hello, I am here to figure out how to run autonomous drive commands on the SwerveDriveSpecialties template. All I am looking for is to be able to run the motors for a few seconds to get over the line, but I do not know how create the function and call it with preset parameters. This is my current build where I tried to duct tape some stuff together to make it work but in the Auto command, it won’t let me put the drivetrain subsystem in the autodrive parameters, so I am just lost.
I will be swapping over to the 0 to Autonomous setup, but our first competition is in a couple days and I want to have something working for my team, so I doubt i’ll have time to swap everything over properly. Anyway, If you know how to do this, any help is greatly appreciated. Thank you in advance.
I’m not too experienced with this so bear with me. Do you have any autonomous code currently written? I looked at your code and noticed that you had no example command. I personally know no other way to use autonomous other than use the example command. We call all of our normal drive train methods in the example command and it works for autonomous. (This is built into wiplib code.)
The Auto and AutoDrive commands are not really working, but the AutoShoot works and is the entirety of my autonomous right now. Within the RobotContainer file there is the getAutnomousCommand function at the very bottom and I call the AutoShoot from there. It works when I select the autonomous from driver station and enable.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.