-
Notifications
You must be signed in to change notification settings - Fork 102
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
Exploding angular velocity #53
Comments
I've noticed that the last three states (yaw, yaw rate, slip angle) all go to infinity when this happens. Slip angle seems to be the most aggressively growing one, while the other states piggyback off of that. I haven't looked into the dynamics deeply, but is it possible that the dynamic model itself has this issue? |
I am also having the same issue. Setting the integrator to Euler seems to delay the explosion, but it eventually happens in my RL code. EDIT: The problem is with the backwards motion + steering combination, the states explode almost always, very quickly. Solution is limiting the action space. You can get a feel for the controller with this keyboard control example |
Hi All, As there seems to be some work for a v1 release but I haven't seen a decent solution to this issue yet, I wanted to propose a simple approach to avoid/fix it. AFAIK the problem comes from the dynamic model when driving backward. There's no issue with the kinematic model which is used for low velocities anyway: # switch to kinematic model for small velocities
if abs(x[3]) < 0.5:
... An easy and IMO reasonable fix could be extending the use of the kinematic model to negative velocities by simply removing the # switch to kinematic model for small velocities
if x[3] < 0.5:
... I ran the test from above and didn't see any issues. LMKWYT! |
Fixed by #100, switched to kinematic model when backing up. We've tried to investigate this, but it seems like it's just a singularity with the dynamics when the dynamics model is scaled down to 1/10 size. |
Describe the bug
I've found that by taking certain actions, the simulator can be prompted to calculate impossibly large angular velocity values. Once the angular velocity starts exploding, it creates a runaway effect and can increase to millions or billions of radians/sec.
To Reproduce
The following code example produces an angular velocity of -82084.6562721812, which is obviously impossible.
I'm currently training reinforcement learning algorithms with this environment, but runs keep failing because the agent may accidentally trigger this behavior. Is this a bug in the dynamics? This behavior appears for both euler integration as well as RK4, even after the bugfix introduced by #52.
The text was updated successfully, but these errors were encountered: