Skip to content

Commit

Permalink
corr
Browse files Browse the repository at this point in the history
  • Loading branch information
Bharath2 authored Nov 6, 2021
1 parent 228aa4c commit 2351618
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/vehicle_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ def vehicle_kinematics(state, action):
# other vehicle kinematics (constant velocity and steering)
state_dot[5:, :] = vehicle_kinematics(state[5:], [0, 0])
#construct
dynamics = Dynamics.SymContinuous(state_dot, state, actio)
dynamics = Dynamics.SymContinuous(state_dot, state, action)


#Construct cost to overtake
px1, py2, heading1, vel1, steer1 = state[:5]
px2, py2, heading2, vel2, steer2 = state[5:]
#cost for reference lane
L = 0.5*(py1 - 1.5)**2
L = 0.2*(py1 - 1.5)**2
#cost on velocity
L += (vel1*sp.cos(heading1) - 2)**2 + (vel1 - 2)**2
#penality on actions
Expand Down

0 comments on commit 2351618

Please sign in to comment.