-
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.
- Loading branch information
Showing
6 changed files
with
100 additions
and
98 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,31 @@ | ||
package team3647.lib; | ||
|
||
import edu.wpi.first.math.estimator.PoseEstimator; | ||
import edu.wpi.first.math.geometry.Pose2d; | ||
|
||
public class PoseUtils { | ||
|
||
/** | ||
* | ||
* @param radius In meters | ||
* @return if the pose is within the radius given | ||
*/ | ||
public static boolean boundingRadius(Pose2d measure, Pose2d target, double radius){ | ||
public static boolean boundingRadius(Pose2d measure, Pose2d target, double radius) { | ||
return Math.abs(measure.getX() - target.getX()) < radius | ||
&& Math.abs(measure.getY() - target.getY()) < radius; | ||
&& Math.abs(measure.getY() - target.getY()) < radius; | ||
} | ||
|
||
public static boolean boundingTriangle(Pose2d measure, Pose2d one, Pose2d two, Pose2d three){ | ||
public static boolean boundingTriangle(Pose2d measure, Pose2d one, Pose2d two, Pose2d three) { | ||
return false; | ||
} | ||
|
||
/** | ||
* |----+y+y| | ||
* | x | | ||
* |--------| --- | ||
/** | ||
* |----+y+y| | x | |--------| --- | ||
* | ||
* @param measure | ||
* @param x | ||
* @param y | ||
* @return | ||
*/ | ||
public static boolean boundingBox(Pose2d measure, Pose2d target, double x, double y){ | ||
public static boolean boundingBox(Pose2d measure, Pose2d target, double x, double y) { | ||
return false; | ||
} | ||
} |