-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
park a car in a garage #289
Conversation
There is nothing new here compared to #285 here. |
Worked again!! :-) :-) |
ax[5].axvline(0, color='k', linestyle='--') | ||
ax[5].axvline(1, color='k', linestyle='--') | ||
ax[5].set_title('differentiable in_0_1') | ||
prevent_print = 1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you end the set_title call with a ;
it shouldn't print the output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you end the set_title call with a
;
it shouldn't print the output.
I forgot -:(
Very nice! |
Thanks! :-) |
I did this from the wrong branch earlier. Now corrected:
A car should park in a garage without hitting any walls.
To avoid hitting any walls, I form a (differentiable) trough in the shape of the garage and the walls. number of points along the body of the car must always be above the trough. This leads to number of inequalities which I handle by introducing new state variables.
I have handled inequalities in 1 or 2 previous PRs. Maybe this one is nicer as it is applied to 'real' eoms, instead of just using the equations given in Betts' book.
As a priori it is not clear whether the care will back in or drive in straight, I look at the 'lower' part of the car, either fron or back for the final location, again a state variable.
NB: depending on the starting location of the car, it can take a very long time for the program to converge.