Commit Graph

8 Commits

Author SHA1 Message Date
Sravan Balaji
390cdabc5a Adjust Some Parameters
- Increase `sim_stop_idx` to near the limit
- Adjust some cost parameters
- Remove unused `NL` cost parameter
- Increase `fmincon` iteration & evaluation limits
- Decrease `fmincon` constraint tolerance
2021-12-13 16:07:22 -05:00
Sravan Balaji
593d451ebf Add Gradients for Cost Function & Nonlinear Constraints
- Set gradient options to true for `fmincon` optimizer
- Play with optimizer limits a bit
- Add gradient computation for cost function
- Add gradient computation for track & obstacle constraints
- Compute gradients offline in `miscellaneous_stuff.m`
- Update `point_to_line` to output signed distance
2021-12-13 14:21:52 -05:00
Sravan Balaji
3d3c53fcd1 Continuous Track/Boundary Constraints
- Adjust input error cost for steering angle
- Increase `fmincon` maximum function evaluations
- Add buffer factors for track boundary distance
  and obstacle radius
- Add intermediate variables for calculating the
  number of constraints
- Change discrete `inpolygon` constraints to continuous
  function based constraints where obstacles are modeled
  as circles and distance/direction from track boundary
  is computed
- Add `point_to_line` function for computing track boundary
  quantities
2021-12-13 11:59:43 -05:00
Sravan Balaji
d591bb68c9 Try adjusting track boundary constraints (still being violated, but not detected)
- Use all track boundary points when checking if position is inside
- Still fails to stop simulation when car goes off track
2021-12-13 07:45:23 -05:00
Sravan Balaji
91fc8ff4c3 Playing with Nonlinear Constraint Costs
- Drastically increase nonlinear constraint violation cost (I think)
- Make state & input costs much smaller than constraint costs
- Add condition to stop simulation if nonlinear constraint
  is not satisfied (doesn't seem to work for going off track)
- Create separate nonlinear constraints for each state to check
  if it is on track and if it doesn't intersect each obstacle
- Change indexing of nonlinear constraints
2021-12-13 07:16:27 -05:00
Sravan Balaji
69c704e66b More outputs / debugging info
- Decrease `sim_stop_idx` to 1500
- Add some debugging messages for when simulation hits
  limit or when `fmincon` can't satisfy constraints
- Add more `fmincon` outputs for future debugging
- Add obstacle information to `getTrajectoryInfo` call
  in `part2_test_controller.m` to see when car crashes
2021-12-12 17:31:52 -05:00
Sravan Balaji
6f6db84c23 Simulation Stop Index & Obstacle Plotting
- Add parameter to stop simulation when specified
  index in reference trajectory is reached
- Modify `forwardIntegrate` to return `Xobs` for plotting
- Plot obstacles in part2 testing figure
- Change some line plotting styles for clarity
2021-12-12 16:29:20 -05:00
Sravan Balaji
5534819d90 File Renaming / Reorganization & Minor Changes
- Add 1/2 coefficient to cost function
- Move `MPC_Class.m` to "Deliverables" folder
- Modify `part2_test_controller.m` plotting style a bit
- Rename `part2_MPC_controller.m` to `sravan_MPC_controller.m`
2021-12-12 16:03:27 -05:00