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

Fixing problem with odometrie

parent d0e0a2ad
No related branches found
No related tags found
1 merge request!1Development
...@@ -78,7 +78,6 @@ class Driving_Analyser: ...@@ -78,7 +78,6 @@ class Driving_Analyser:
if w != 0 or v != 0: if w != 0 or v != 0:
theta = self.theta_old + (w * time_delta) theta = self.theta_old + (w * time_delta)
#y = self.y_old + (v * ((-np.cos(theta) / w) + 1))
if w < 0: if w < 0:
y = self.y_old + (v * (-np.cos(theta) / w - 1)) y = self.y_old + (v * (-np.cos(theta) / w - 1))
else: else:
...@@ -97,7 +96,10 @@ class Driving_Analyser: ...@@ -97,7 +96,10 @@ class Driving_Analyser:
""" """
def calculate_odometrie_delta (self, w,v,time_delta): def calculate_odometrie_delta (self, w,v,time_delta):
theta_delta = (w * time_delta) theta_delta = (w * time_delta)
y_delta = (v * (-np.cos(theta_delta) / w)) if w < 0:
y_delta = (v * (-np.cos(theta_delta) / w - 1))
else:
y_delta = (v * (-np.cos(theta_delta) / w + 1))
x_delta = (v * (np.sin(w * time_delta) / w)) x_delta = (v * (np.sin(w * time_delta) / w))
return (x_delta, y_delta, theta_delta) return (x_delta, y_delta, theta_delta)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment