Skip to content

Commit

Permalink
add basic slip-angle compensated exit offset
Browse files Browse the repository at this point in the history
  • Loading branch information
micromouseonline committed Jan 7, 2023
1 parent 06d0664 commit c5ec265
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,12 @@ def show_summary(self):
max_alpha = self.path.get_max_alpha()
wheel_acc = self.robot.radius * math.radians(max_alpha)
end_x = self.path.trajectory.x_ideal[-1]
end_y = self.path.trajectory.x_ideal[-1]
end_y = self.path.trajectory.y_ideal[-1]
end_theta = self.path.trajectory.theta_ideal[-1]
end_time = self.path.trajectory.time[-1]
distance = self.path.trajectory.distance[-1]
slip_comp_x = self.path.trajectory.x_actual[-1] - self.path.trajectory.x_ideal[-1]
slip_comp_y = self.path.trajectory.y_actual[-1] - self.path.trajectory.y_ideal[-1]
self.ui.textEdit.clear()
self.ui.textEdit.append(f" Min. Radius: {self.ui.radiusSpinBox.value():5.0f} mm")
self.ui.textEdit.append(f" Turn Speed: {self.ui.turnSpeedSpinBox.value():5.0f} mm/s")
Expand All @@ -339,6 +341,8 @@ def show_summary(self):
self.ui.textEdit.append(f" Max omega: {self.path.get_max_omega():5.0f} deg/s")
self.ui.textEdit.append(f" Exit X: {end_x:5.1f} mm")
self.ui.textEdit.append(f" Exit Y: {end_y:5.1f} mm")
self.ui.textEdit.append(f" Overshoot X: {slip_comp_x:5.1f} mm")
self.ui.textEdit.append(f" Undershoot Y: {slip_comp_y:5.1f} mm")
self.ui.textEdit.append(f" Exit Speed: {self.path.trajectory.speed:5.0f} mm/s")
self.ui.textEdit.append(f" Exit Angle: {end_theta:5.1f} deg")
self.ui.textEdit.append(f" Distance: {distance:5.0f} mm")
Expand Down

0 comments on commit c5ec265

Please sign in to comment.