Skip to content

Steering optimal control example from documentation failing #636

Description

@mhassell

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

Activity

  1. bnavigator commented on Jul 7, 2021

    @bnavigator
    Contributor

    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.

  2. changed the title [-]Example failing in Jupyter Lab on Linux Mint[/-] [+]Steering optimal control example from documentation failing[/+] on Jul 7, 2021
  3. mhassell commented on Jul 7, 2021

    @mhassell
    Author

    Thank you!

  4. ThomasGiavasopoulos commented on Feb 2, 2022

    @ThomasGiavasopoulos

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

  5. self-assigned this
    on Mar 18, 2022
  6. added this to the 0.9.2 milestone on Mar 19, 2022
  7. linked a pull request that will close this issueOptimal control enhancements #712on Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions