Commit 5490e75d authored by Helge's avatar Helge

Fixed autopilot component, abs(x) not working as intended

parent 661b3d2d
Pipeline #188585 passed with stage
in 3 minutes and 46 seconds
......@@ -6,6 +6,10 @@ component Abs {
out Q output;
implementation Math {
output = abs(input);
if input < 0
output = (-1) * input;
else
output = input;
end
}
}
......@@ -18,7 +18,12 @@ component SteeringAngleCorrection {
steeringAngleCorrection = 0.0;
Q dist = abs(signedDistanceToTrajectory);
Q dist = signedDistanceToTrajectory;
if dist < 0
dist = (-1) * dist; // dist = abs(signedDistanceToTrajectory)
end
if (dist > EPSILON)
if (dist < X1)
steeringAngleCorrection = Y1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment