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

Wrong calculation for low FPS #2

Closed
rhalaly opened this issue Aug 27, 2021 · 1 comment
Closed

Wrong calculation for low FPS #2

rhalaly opened this issue Aug 27, 2021 · 1 comment
Labels
good first issue Good for newcomers

Comments

@rhalaly
Copy link

rhalaly commented Aug 27, 2021

For lower FPS values the results of the calculations are wrong.

For fps = 50 everything works just fine, but I wanted to simulate fps = 1 (to see where the vehicle will be every 1 second) but the algorithm crash.

I found that for dt >= 0.073 the algorithm crash... Is there any way to use the code for higher dts?

@winstxnhdw
Copy link
Owner

winstxnhdw commented Aug 27, 2021

Hello @rhalaly,

The program crashes when dt = 1 because f_load grows many magnitudes larger than the throttle value within only a few iterations. Recall that all discrete bicycle models, including this one, only work with the assumption that the value of each time step is tiny and the vehicle's velocity is set to a reasonable value. This is because at large time steps and extremely high speeds, we lose important information of the vehicle's state in between each iteration. This is the biggest limitations of all discrete models.

I believe that you are looking for a continuous bicycle model which would come with its own set of limitations and does not exist as of writing. The closest thing I have in mind is the Coordinated Turn Model that my good friend, @reuben-thomas, painstakingly wrote in Desmos, based on this paper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants