Skip to content
Snippets Groups Projects
Commit d0e0a2ad authored by Sebastian Böttger's avatar Sebastian Böttger
Browse files

Fixing problem with odometrie

parent a311d6cc
No related branches found
No related tags found
1 merge request!1Development
......@@ -78,12 +78,16 @@ class Driving_Analyser:
if w != 0 or v != 0:
theta = self.theta_old + (w * time_delta)
y = self.y_old + (v * (-np.cos(theta) / w))
#y = self.y_old + (v * ((-np.cos(theta) / w) + 1))
if w < 0:
y = self.y_old + (v * (-np.cos(theta) / w - 1))
else:
y = self.y_old + (v * (-np.cos(theta) / w + 1))
x = self.x_old + (v * (np.sin(theta) / w))
self.theta_old = theta
self.y_old = y
self.x_old = x
self.y_old = round(y, 5)
self.x_old = round(x, 5)
return (self.x_old, self.y_old, self.theta_old)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment