Skip to content

Commit

Permalink
bump lib
Browse files Browse the repository at this point in the history
  • Loading branch information
j5155 committed Nov 18, 2024
1 parent d031549 commit 7e0b287
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion TeamCode/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ dependencies {
implementation "com.acmerobotics.roadrunner:core:1.0.0"
implementation "com.acmerobotics.roadrunner:actions:1.0.0"
implementation "com.acmerobotics.dashboard:dashboard:0.4.16"
implementation "com.github.jdhs-ftc:road-runner-ftc-otos:622d5b95a5"
implementation "com.github.jdhs-ftc:road-runner-ftc-otos:447094304b"
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ public PoseVelocity2d updatePoseEstimate() {
// Potential alternate solution: timestamp the pose set and backtrack it based on speed?
pinpoint.setPosition(pose);
}
pinpoint.bulkUpdate(); // RR LOCALIZER NOTE: this is not ideal for loop times.
pinpoint.updatePoseAndVelocity(); // RR LOCALIZER NOTE: this is not ideal for loop times.
// Driver needs update to be optimized
pose = pinpoint.getPosition();
pose = pinpoint.getPositionRR();
lastPinpointPose = pose;

// RR standard
Expand All @@ -110,7 +110,7 @@ public PoseVelocity2d updatePoseEstimate() {

FlightRecorder.write("ESTIMATED_POSE", new PoseMessage(pose));

return pinpoint.getVelocity();
return pinpoint.getVelocityRR();
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,15 @@ of time each cycle takes and finds the frequency (number of updates per second)
/*
gets the current Position (x & y in inches, and heading in radians) of the robot, and prints it.
*/
Pose2d pos = odo.getPosition();
Pose2d pos = odo.getPositionRR();
String data = String.format(Locale.US, "{X: %.3f, Y: %.3f, H: %.3f}", pos.position.x, pos.position.y, pos.heading.toDouble());
telemetry.addData("Position", data);


/*
gets the current Velocity (x & y in inches/sec and heading in radians/sec) and prints it.
*/
PoseVelocity2d vel = odo.getVelocity();
PoseVelocity2d vel = odo.getVelocityRR();
String velocity = String.format(Locale.US,"{XVel: %.3f, YVel: %.3f, HVel: %.3f}", vel.linearVel.x, vel.linearVel.y, vel.angVel);
telemetry.addData("Velocity", velocity);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public static void register(OpModeManager manager) {

List<Encoder> leftEncs = new ArrayList<>(), rightEncs = new ArrayList<>();
List<Encoder> parEncs = new ArrayList<>(), perpEncs = new ArrayList<>();
parEncs.add(new PinpointEncoder(pd.pinpoint,false, PinpointDrive.PARAMS.xDirection == GoBildaPinpointDriver.EncoderDirection.FORWARD, pd.leftBack));
perpEncs.add(new PinpointEncoder(pd.pinpoint,true,PinpointDrive.PARAMS.yDirection == GoBildaPinpointDriver.EncoderDirection.FORWARD, pd.leftBack));
parEncs.add(new PinpointEncoder(pd.pinpoint,false, pd.leftBack));
perpEncs.add(new PinpointEncoder(pd.pinpoint,true, pd.leftBack));

return new DriveView(
DriveType.MECANUM,
Expand Down

0 comments on commit 7e0b287

Please sign in to comment.