Skip to content

Commit

Permalink
fixed a little bug in game piece simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
catr1xLiu committed Sep 20, 2024
1 parent 33a0d19 commit 4958924
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ public interface HolonomicDriveSubsystem extends Subsystem {
*/
default void addVisionMeasurement(Pose2d visionPose, double timestamp, Matrix<N3, N1> measurementStdDevs) {}

default double getPreviousVisionMeasurementTimeStamp() {return -1;}

/**
* @return the measured(actual) velocities of the chassis, robot-relative
* */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public GamePieceInSimulation(Translation2d initialPosition, Convex shape, double
super();
BodyFixture bodyFixture = super.addFixture(shape);
bodyFixture.setFriction(EDGE_COEFFICIENT_OF_FRICTION);
bodyFixture.setFriction(EDGE_COEFFICIENT_OF_RESTITUTION);
bodyFixture.setRestitution(EDGE_COEFFICIENT_OF_RESTITUTION);
bodyFixture.setDensity(mass / shape.getArea());
super.setMass(MassType.NORMAL);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ public interface HolonomicDriveSubsystem extends Subsystem {
*/
default void addVisionMeasurement(Pose2d visionPose, double timestamp, Matrix<N3, N1> measurementStdDevs) {}

default double getPreviousVisionMeasurementTimeStamp() {return -1;}

/**
* @return the measured(actual) velocities of the chassis, robot-relative
* */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public GamePieceInSimulation(Translation2d initialPosition, Convex shape, double
super();
BodyFixture bodyFixture = super.addFixture(shape);
bodyFixture.setFriction(EDGE_COEFFICIENT_OF_FRICTION);
bodyFixture.setFriction(EDGE_COEFFICIENT_OF_RESTITUTION);
bodyFixture.setRestitution(EDGE_COEFFICIENT_OF_RESTITUTION);
bodyFixture.setDensity(mass / shape.getArea());
super.setMass(MassType.NORMAL);

Expand Down

0 comments on commit 4958924

Please sign in to comment.