DevilBotz2876 / ChargedUp2023

Code for the FRC 2023 Robotics Competition
Other
3 stars 0 forks source link

Fix default commands for subsystems #95

Closed loafdog closed 1 year ago

loafdog commented 1 year ago

Arm default command should do nothing. Change the ArmStop command to stop motor once in initialize instead of all the time in execute. This might be why we could not get arm motor to move when using rev tool to drive motor. The robot code was constantly setting speed to zero.

Add default command for gripper subsystem too. And move all the default setups into one place, outside the configure trigger binding method.

The GripperIdle cmd calls a stop method on the solenoid. I have no idea what this does or if we need it. I did not remove it because I don't know what it does and have no way to test. When testing on the real robot, might want to check to see if this doesn't anything or not?

loafdog commented 1 year ago

There are commands and button assignments to move arm up/down as Adi requested. The arm did not move using those commands probably b/c limit switches were reversed. The PR does not change anything with limit switches. I'll let you decide if you want to change code or limit switch wiring when testing with the real robot. Could be something else entirely too that is broken, did not want to speculate on what to change/fix and make too many changes.

The atX methods are not used to control arm. There are commands(armToX) that use them. There are button assignments to use the commands. But these commands/buttons will not interfere with the arm up/down commands/buttons Adi requested. The intent here is to provide buttons/commands that will move arm to preset positions so driver does not have to manually adjust to these set heights.

I am trying to get arm simulation working, in another branch. Will push that branch to github to share with anyone else that might want to try it or improve it. I don't know how useful arm sim will be at this point tho, wish we had figured it out a week or two ago... oh well.