Skip to content

Steering optimal control example from documentation failing #636

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

Closed
mhassell opened this issue Jul 6, 2021 · 3 comments · Fixed by #712
Closed

Steering optimal control example from documentation failing #636

mhassell opened this issue Jul 6, 2021 · 3 comments · Fixed by #712
Assignees
Milestone

Comments

@mhassell
Copy link

mhassell commented Jul 6, 2021

I was working through the example in https://python-control.readthedocs.io/en/latest/optimal.html and I found that I am not able to get the results to work. My resulting state just seems to keep drifting left from the target lane. Am I missing something here? Run on Linux Mint, Python 3, in Jupyter Lab.

Notebook is here: https://github.com/mhassell/control_issue/blob/main/example.ipynb

Code/images: https://github.com/mhassell/control_issue/

As a sanity check I also ran it as a script, not_jupyter.py, using python3. Same deal. Saved the png as from_script_not_jupyter.png

@bnavigator
Copy link
Contributor

bnavigator commented Jul 7, 2021

Hi, the optimal example in the docs might be a bit outdated. Did you try with examples/steering-optimal.py as well? The definition of the cost functions and optimization methods were adjusted a bit.

@bnavigator bnavigator changed the title Example failing in Jupyter Lab on Linux Mint Steering optimal control example from documentation failing Jul 7, 2021
@mhassell
Copy link
Author

mhassell commented Jul 7, 2021

Thank you!

@ThomasGiavasopoulos
Copy link

Thank you! Had the same issue with the outdated code. Thanks again!

@murrayrm murrayrm self-assigned this Mar 18, 2022
@murrayrm murrayrm added this to the 0.9.2 milestone Mar 19, 2022
@murrayrm murrayrm linked a pull request Mar 23, 2022 that will close this issue
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 a pull request may close this issue.

4 participants