-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update TeleopCommand to work on our two motor robot. #47
Open
a2aaron
wants to merge
24
commits into
master
Choose a base branch
from
feature/teleop-conversion
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… classpath. TODO: Fix the hard coded paths.
Note that wpilib's build files ONLY look in the wpilib folder, this means that any jars not located in this folder will not be compiled. Thus, we must include json.jar, strongback.jar, and any talon libraries in this folder (these are not visible in the commit). Additionally, json.jar was removed from this project as it is not longer needed in this repo.
These build targets did nothing but call another target, so they were removed.
…y URL. Why? Well, wpilib requires ALL user library jars to be placed in wpilib/user/java/lib, which is a folder that this repo does not "own". Additionally, there is no easy or elegant way to move jars into this directory. The simplest solution I can think of is copying jars into the file from this repo, but I really don't want to include too many jar files in this repo. Addionally, the site that was previously downloading WPILib did not include the cpp or tools folders (which might be nessecarry in order to deploy, I'm not sure). Instead, I decided to download the wpilib folder directly from a repo that we "own" (currently it's set to a repo I just made, but we can switch it over to the FRC1076 organization). As a bonus, this means that updating WPILib is easy, you update WPILib on a machine through eclipse, and then you push these changes to GitHub. Then, anyone can pull these updates without having to go through the same troubles. It also means that dependencies are easier to share between projects (and only one person needs to ever download these dependencies).
Override Strongback's incorrect buildpath for test compilation. Why? Strongback assumes that the correct class path is ${classpath}, which does have WPILib.jar and NetworkTables.jar. However, this doesn't include any user libraries (like Strongback itself!). Instead we add the path "classpath.path", which is the correct path that wpilib uses for compilation and includes user libraries. (the ${classpath} property is defined in ${wpilib.dir}/java/current/ant/build.properties.) TestRobot.java has been updated to test these changes.
This commit fixes possible conflicts due to files being imported more than once, as that could cause some overriding properties to not override properly.
This commit also replaces the TeleopCommand with a temporary arcade drive. This drive should be later placed into the current TeleopCommand (or possibly moved into a subsystem instead).
Since the new robot only has two motors (left and right), there is no need to keep FrontBackMotors. All instances of FrontBackMotors have been removed from the codebase. Additionally, DriveLeftRight was removed as that used only FrontBackMotors
Note that, since we no longer have a front or back motor, the radius scaling was removed. Additionally, the left and right speeds are no longer negative, as it is assumed that positive is forward and that all inverting is done prior to this command.
MockGamepad is useful in testing and implements IGamepad. IGamepad should be used instead of Gamepad because it allows for unit tests to pass in a MockGamepad
This was done all at once as converting piecewise tends to cause type errors everywhere. The main differences between WPILib and Strongback commands are not much. Instead of directly starting commands, you instead submit them to Strongback's internal schedular via `Strongback.submit(command)`. `execute()`, `initialize()` and other similar functions are public instead of protected. Additionally, only `execute()` is required, all of the others are optional by default. Finally, requirements are passed by calling the superconstructor with `super()`. A subsystem instead implements Requireable instead of extending Subsystem.
Strongback should be started in robotInit, not autonoumous init.
All SmartDashboard values should be read in disabledInit as this ensures that the value is always updated before teleop or auton
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Blocked by PR #42 and PR #45 and PR #46