-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finished all the cases in which there are two points traveling in the…
… same direction and the first point has a custom max velocity. About to change the code and probably break a whole bunch of cases to get the cases working where the second point has a custom max velocity
- Loading branch information
Showing
59 changed files
with
884 additions
and
980 deletions.
There are no files selected for viewing
Binary file modified
BIN
+0 Bytes
(100%)
eclipse-workspace/MotionProfiling/bin/KinematicsTester$InvalidAccelerationException.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
eclipse-workspace/MotionProfiling/bin/KinematicsTester$InvalidFinalPosition.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...kspace/MotionProfiling/bin/KinematicsTester$InvalidNextVelocityFromLastAcceleration.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
eclipse-workspace/MotionProfiling/bin/KinematicsTester$InvalidTrajectoryLogic.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
eclipse-workspace/MotionProfiling/bin/KinematicsTester$InvalidVelocityException.class
Binary file not shown.
Binary file modified
BIN
-4.84 KB
(83%)
eclipse-workspace/MotionProfiling/bin/KinematicsTester.class
Binary file not shown.
Binary file modified
BIN
+537 Bytes
(100%)
eclipse-workspace/MotionProfiling/bin/kinematics/KinematicsSimpler.class
Binary file not shown.
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
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
94 changes: 94 additions & 0 deletions
94
...ce/MotionProfiling/bin/org/usfirst/frc4905/MotionProfiling/commands/RunWheelsAndLog.java~
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
// RobotBuilder Version: 2.0 | ||
// | ||
// This file was generated by RobotBuilder. It contains sections of | ||
// code that are automatically generated and assigned by robotbuilder. | ||
// These sections will be updated in the future when you export to | ||
// Java from RobotBuilder. Do not put any code or make any change in | ||
// the blocks indicating autogenerated code or it will be lost on an | ||
// update. Deleting the comments indicating the section will prevent | ||
// it from being updated in the future. | ||
|
||
package org.usfirst.frc4905.MotionProfiling.commands; | ||
|
||
import edu.wpi.first.wpilibj.Timer; | ||
import edu.wpi.first.wpilibj.command.Command; | ||
|
||
import java.util.Vector; | ||
|
||
import org.usfirst.frc4905.MotionProfiling.Robot; | ||
|
||
import Utilities.Trace; | ||
|
||
/** | ||
* | ||
*/ | ||
public class RunWheelsAndLog extends Command { | ||
Vector<String> m_header = new Vector<String>(); | ||
double m_initialTimeStamp = 0.0; | ||
double m_previousVelocity = 0.0; | ||
double m_previousTimeStamp = 0.0; | ||
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_DECLARATIONS | ||
|
||
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_DECLARATIONS | ||
|
||
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTOR | ||
public RunWheelsAndLog() { | ||
|
||
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTOR | ||
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_SETTING | ||
|
||
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_SETTING | ||
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=REQUIRES | ||
requires(Robot.driveTrain); | ||
|
||
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=REQUIRES | ||
} | ||
|
||
// Called just before this Command runs the first time | ||
protected void initialize() { | ||
Vector<String> header = new Vector<String>(); | ||
header.add(new String("Velocities")); | ||
header.add(new String("Acceleration")); | ||
header.addElement(new String("Time Between Runs")); | ||
Trace.getInstance().addTrace("Motion Profiling Data", header); | ||
m_header = header; | ||
m_initialTimeStamp = Timer.getFPGATimestamp(); | ||
} | ||
|
||
// Called repeatedly when this Command is scheduled to run | ||
protected void execute() { | ||
Robot.driveTrain.setAllDriveControllers(1.0); | ||
|
||
Vector<Double> entry = new Vector<Double>(); | ||
double currentTimeStamp = Timer.getFPGATimestamp(); | ||
double currentDeltaTimeStampFromStart = currentTimeStamp - m_initialTimeStamp; | ||
double deltaTimeFromLastExecute = currentTimeStamp - m_previousTimeStamp; | ||
|
||
double currentPosition = Robot.driveTrain.getAllEncoderPosition(); | ||
double currentVelocity = currentPosition / currentDeltaTimeStampFromStart; | ||
double currentAcceleration = currentVelocity - m_previousVelocity; | ||
|
||
entry.add(currentVelocity); | ||
entry.add(currentAcceleration); | ||
entry.add(deltaTimeFromLastExecute); | ||
|
||
Trace.getInstance().addEntry("Motion Profiling Data", entry); | ||
|
||
m_previousTimeStamp = currentTimeStamp; | ||
m_previousVelocity = currentVelocity; | ||
} | ||
|
||
// Make this return true when this Command no longer needs to run execute() | ||
protected boolean isFinished() { | ||
return false; | ||
} | ||
|
||
// Called once after isFinished returns true | ||
protected void end() { | ||
} | ||
|
||
// Called when another command which requires one or more of the same | ||
// subsystems is scheduled to run | ||
protected void interrupted() { | ||
} | ||
} |
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
Binary file removed
BIN
-450 Bytes
...space/MotionProfiling/bin/org/usfirst/frc4905/MotionProfiling/subsystems/Kinematics.class
Binary file not shown.
Binary file added
BIN
+658 Bytes
eclipse-workspace/MotionProfiling/build/KinematicsTester$InvalidAccelerationException.class
Binary file not shown.
Binary file added
BIN
+634 Bytes
eclipse-workspace/MotionProfiling/build/KinematicsTester$InvalidFinalPosition.class
Binary file not shown.
Binary file added
BIN
+691 Bytes
...pace/MotionProfiling/build/KinematicsTester$InvalidNextVelocityFromLastAcceleration.class
Binary file not shown.
Binary file added
BIN
+640 Bytes
eclipse-workspace/MotionProfiling/build/KinematicsTester$InvalidTrajectoryLogic.class
Binary file not shown.
Binary file added
BIN
+646 Bytes
eclipse-workspace/MotionProfiling/build/KinematicsTester$InvalidVelocityException.class
Binary file not shown.
Binary file modified
BIN
+20.8 KB
(1100%)
eclipse-workspace/MotionProfiling/build/KinematicsTester.class
Binary file not shown.
Binary file added
BIN
+1.39 KB
eclipse-workspace/MotionProfiling/build/Utilities/MultipleOutputStream.class
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+942 Bytes
eclipse-workspace/MotionProfiling/build/Utilities/SideOfField.class
Binary file not shown.
Binary file added
BIN
+790 Bytes
eclipse-workspace/MotionProfiling/build/Utilities/Trace$TraceEntry.class
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+599 Bytes
eclipse-workspace/MotionProfiling/build/Utilities/TurnDirection$1.class
Binary file not shown.
Binary file added
BIN
+1.25 KB
eclipse-workspace/MotionProfiling/build/Utilities/TurnDirection.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+109 Bytes
(110%)
eclipse-workspace/MotionProfiling/build/kinematics/Kinematics$Point.class
Binary file not shown.
Binary file modified
BIN
+3.32 KB
(130%)
eclipse-workspace/MotionProfiling/build/kinematics/Kinematics.class
Binary file not shown.
Binary file added
BIN
+221 Bytes
eclipse-workspace/MotionProfiling/build/kinematics/KinematicsSimpler$1.class
Binary file not shown.
Binary file added
BIN
+707 Bytes
...kspace/MotionProfiling/build/kinematics/KinematicsSimpler$InvalidDimentionException.class
Binary file not shown.
Binary file added
BIN
+1.37 KB
eclipse-workspace/MotionProfiling/build/kinematics/KinematicsSimpler$Path.class
Binary file not shown.
Binary file added
BIN
+1.68 KB
eclipse-workspace/MotionProfiling/build/kinematics/KinematicsSimpler$Point.class
Binary file not shown.
Binary file added
BIN
+1.42 KB
eclipse-workspace/MotionProfiling/build/kinematics/KinematicsSimpler$TrajectoryPaths.class
Binary file not shown.
Binary file added
BIN
+941 Bytes
eclipse-workspace/MotionProfiling/build/kinematics/KinematicsSimpler$TrajectoryPoint.class
Binary file not shown.
Binary file added
BIN
+13.3 KB
eclipse-workspace/MotionProfiling/build/kinematics/KinematicsSimpler.class
Binary file not shown.
Binary file added
BIN
+116 Bytes
eclipse-workspace/MotionProfiling/build/kinematics/package-info.class
Binary file not shown.
Binary file modified
BIN
+108 Bytes
(110%)
eclipse-workspace/MotionProfiling/build/org/usfirst/frc4905/MotionProfiling/OI.class
Binary file not shown.
Binary file modified
BIN
+21 Bytes
(100%)
eclipse-workspace/MotionProfiling/build/org/usfirst/frc4905/MotionProfiling/Robot.class
Binary file not shown.
Binary file modified
BIN
+582 Bytes
(260%)
eclipse-workspace/MotionProfiling/build/org/usfirst/frc4905/MotionProfiling/RobotMap.class
Binary file not shown.
Binary file modified
BIN
+357 Bytes
(130%)
...Profiling/build/org/usfirst/frc4905/MotionProfiling/commands/MotionProfilingTesting.class
Binary file not shown.
Binary file added
BIN
+2.81 KB
.../MotionProfiling/build/org/usfirst/frc4905/MotionProfiling/commands/MoveWithEncoder.class
Binary file not shown.
Binary file added
BIN
+2.44 KB
.../MotionProfiling/build/org/usfirst/frc4905/MotionProfiling/commands/RunWheelsAndLog.class
Binary file not shown.
Binary file modified
BIN
-54 Bytes
(97%)
...filing/build/org/usfirst/frc4905/MotionProfiling/subsystems/DriveTrain$EncoderPIDin.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...iling/build/org/usfirst/frc4905/MotionProfiling/subsystems/DriveTrain$EncoderPIDout.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...ild/org/usfirst/frc4905/MotionProfiling/subsystems/DriveTrain$ResetEncoderPositions.class
Binary file not shown.
Binary file modified
BIN
+325 Bytes
(110%)
...ace/MotionProfiling/build/org/usfirst/frc4905/MotionProfiling/subsystems/DriveTrain.class
Binary file not shown.
Binary file not shown.
Oops, something went wrong.