Skip to content

need to correct the scope of the range function at line 321 in model_predictive_speed_and_steer_control.py #1263

@WordOfGod

Description

@WordOfGod

I apprecitated your work. It is a very good example code. I'd like to report a small bug.

Describe the bug
A clear and concise description of what the bug is.

need to correct the scope of the range function at line 321 in model_predictive_speed_and_steer_control.py
As-Is : range(T + 1)
To-Be : range(1, T + 1)

Expected behavior
A clear and concise description of what you expected to happen.

Issue : values are assigned to xref[0 , 0], ..., xref[3 , 0] above the for-loop. However, the range starts from index 0. The previously assigned value of xref[ : , 0] are overwrited with the values of the next time point.

tracking may fail in some cases.

Screenshots
If applicable, add screenshots to help explain your problem.

I have attached the result screens before and after the correction.

before
Image

after
Image

Desktop (please complete the following information):

  • Python version (This repo only supports Python 3.9.x or higher).
  • Each library version
  • OS version

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions