Skip to content
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

Merged
merged 3 commits into from
Jan 31, 2025
Merged

Conversation

Peter230655
Copy link
Contributor

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.

@Peter230655 Peter230655 mentioned this pull request Dec 30, 2024
@Peter230655
Copy link
Contributor Author

There is nothing new here compared to #285 here.
Since @moorepants seemed to like it some time ago, I will not close it but let him decide.

@moorepants moorepants closed this Jan 27, 2025
@moorepants moorepants reopened this Jan 27, 2025
@Peter230655
Copy link
Contributor Author

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.
Copy link
Member

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.

Copy link
Contributor Author

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 -:(

@moorepants
Copy link
Member

Very nice!

@moorepants moorepants merged commit b33727c into csu-hmc:master Jan 31, 2025
21 of 22 checks passed
@Peter230655
Copy link
Contributor Author

Very nice!

Thanks! :-)

@Peter230655 Peter230655 deleted the car-in-garage-new branch January 31, 2025 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants