Motors Will Not Move During Autonomous

We are trying to get autonomous to work with our robot, but we’ve not gotten the motors to move at all. They work during teleop so there’s not a question of mechanical or electrical. I haven’t been able to find any example auto code for what we use, which is command-based. I’m not sure if this is related but whenever we disable the robot a wheel spins for a moment then stops.

See the getAutonomousCommand() function in RobotContainer. This should return a command (or command group) for the robot to run when Autonomous is initialized.

I’ve updated the code and moved the code from ExampleSubsystem to TalonFXTestSubsystem because the testTalon was being declared twice, which might have been the issue.

We were able to get the autonomous code working as a part of our latest version of code here:

I’m not sure what the difference between the functional code above is and the original code of this thread. If someone wanted to look through and figure out what the difference is that’d be great but I don’t need anything else to make the code work.

Now I was able to get the autonomous working, the issue is that when I enable the robot in teleop the wheels won’t stop spinning. They don’t change direction when I move the joystick, which makes me think it’s not an issue with deadzones. I’m not sure what could be causing this so any tips for things to try would be appreciated.

Thank you, I changed 0.5 to speed. I haven’t had a chance to test it, but I imagine it will work when I do.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.