Skip to content

Commit

Permalink
Fixed calculations
Browse files Browse the repository at this point in the history
  • Loading branch information
ret15108 committed Mar 23, 2018
1 parent 83ae00b commit dcc1171
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/geo_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def main():
dely = (math.sin(theta[RIGHTTOP])*ranges[RIGHTTOP])
else:
dely = (math.sin(theta[RIGHTTOP])*ranges[RIGHTTOP]) - (math.sin(theta[RIGHTBOT])*ranges[RIGHTBOT])
thetar = -1* np.arctan(dely/delx) - np.pi/2
thetar = -1* np.arctan(dely/delx) + np.pi/2
steering_input = interp(thetar, [np.radians(-20),np.radians(20)], [-100,100])
print("ThetaR:",thetar, "|Steering Angle:", steering_input)
message = drive_params()
Expand Down

0 comments on commit dcc1171

Please sign in to comment.