@@ -32,7 +32,7 @@ class RoadRunnerBotEntity(
32
32
override var zIndex: Int = 0
33
33
34
34
private var driveTrainType = DriveTrainType .MECANUM
35
- var drive = DriveShim (driveTrainType, constraints)
35
+ var drive = DriveShim (driveTrainType, constraints, pose )
36
36
37
37
var currentTrajectorySequence: TrajectorySequence ? = null
38
38
@@ -101,6 +101,8 @@ class RoadRunnerBotEntity(
101
101
else -> currentTrajectorySequence!! .end
102
102
}
103
103
104
+ drive.poseEstimate = pose;
105
+
104
106
trajectorySequenceEntity!! .markerEntityList.forEach { if (trajectorySequenceElapsedTime >= it.time) it.passed() }
105
107
106
108
progressSlider.progress = (trajectorySequenceElapsedTime / currentTrajectorySequence!! .duration)
@@ -152,13 +154,13 @@ class RoadRunnerBotEntity(
152
154
fun setConstraints (constraints : Constraints ) {
153
155
this .constraints = constraints
154
156
155
- drive = DriveShim (driveTrainType, constraints)
157
+ drive = DriveShim (driveTrainType, constraints, pose )
156
158
}
157
159
158
160
fun setDriveTrainType (driveTrainType : DriveTrainType ) {
159
161
this .driveTrainType = driveTrainType
160
162
161
- drive = DriveShim (driveTrainType, constraints)
163
+ drive = DriveShim (driveTrainType, constraints, pose )
162
164
}
163
165
164
166
override fun switchScheme (scheme : ColorScheme ) {
0 commit comments