Replace log()
with toDouble()
This commit is contained in:
@ -291,12 +291,12 @@ public final class MecanumDrive {
|
||||
|
||||
p.put("x", pose.position.x);
|
||||
p.put("y", pose.position.y);
|
||||
p.put("heading (deg)", Math.toDegrees(pose.heading.log()));
|
||||
p.put("heading (deg)", Math.toDegrees(pose.heading.toDouble()));
|
||||
|
||||
Pose2d error = txWorldTarget.value().minusExp(pose);
|
||||
p.put("xError", error.position.x);
|
||||
p.put("yError", error.position.y);
|
||||
p.put("headingError (deg)", Math.toDegrees(error.heading.log()));
|
||||
p.put("headingError (deg)", Math.toDegrees(error.heading.toDouble()));
|
||||
|
||||
// only draw when active; only one drive action should be active at a time
|
||||
Canvas c = p.fieldOverlay();
|
||||
|
@ -304,12 +304,12 @@ public final class TankDrive {
|
||||
|
||||
p.put("x", pose.position.x);
|
||||
p.put("y", pose.position.y);
|
||||
p.put("heading (deg)", Math.toDegrees(pose.heading.log()));
|
||||
p.put("heading (deg)", Math.toDegrees(pose.heading.toDouble()));
|
||||
|
||||
Pose2d error = txWorldTarget.value().minusExp(pose);
|
||||
p.put("xError", error.position.x);
|
||||
p.put("yError", error.position.y);
|
||||
p.put("headingError (deg)", Math.toDegrees(error.heading.log()));
|
||||
p.put("headingError (deg)", Math.toDegrees(error.heading.toDouble()));
|
||||
|
||||
targetPoseWriter.write(new PoseMessage(txWorldTarget.value()));
|
||||
|
||||
|
@ -12,7 +12,7 @@ public final class PoseMessage {
|
||||
this.timestamp = System.nanoTime();
|
||||
this.x = pose.position.x;
|
||||
this.y = pose.position.y;
|
||||
this.heading = pose.heading.log();
|
||||
this.heading = pose.heading.toDouble();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ public class LocalizationTest extends LinearOpMode {
|
||||
|
||||
telemetry.addData("x", drive.pose.position.x);
|
||||
telemetry.addData("y", drive.pose.position.y);
|
||||
telemetry.addData("heading (deg)", Math.toDegrees(drive.pose.heading.log()));
|
||||
telemetry.addData("heading (deg)", Math.toDegrees(drive.pose.heading.toDouble()));
|
||||
telemetry.update();
|
||||
}
|
||||
} else if (TuningOpModes.DRIVE_CLASS.equals(TankDrive.class)) {
|
||||
@ -51,7 +51,7 @@ public class LocalizationTest extends LinearOpMode {
|
||||
|
||||
telemetry.addData("x", drive.pose.position.x);
|
||||
telemetry.addData("y", drive.pose.position.y);
|
||||
telemetry.addData("heading (deg)", Math.toDegrees(drive.pose.heading.log()));
|
||||
telemetry.addData("heading (deg)", Math.toDegrees(drive.pose.heading.toDouble()));
|
||||
telemetry.update();
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user