f1tenth/f1tenth_gym

Simulator throw a division by zero error from check_ttc_jit()

Closed this issue · 10 comments

Describe the bug
The simulation sometimes throws a division by zero error seemingly stemming from some values being passed into the parameter cosines that causes the collision check to have a division by zero

Screenshots
image

Can you describe how one can replicate this issue? Was it with a specific map/pose of the agents?

Hi, I've actually encountered this issue when using the environment that has been modified to support deep reinforcement learning. I have only changed the main script and the gym environment from the original. https://github.com/qtweng/f1tenth-gym
Running the main.py in the above repo will do this.

There's no main.py in the repo.

Sorry, I meant the main.py in the pkg/src/pkg like usual.

Actually, I think I've found my issue. This happened because I did an improper operation on a python list on my part. This check is fine if the list is valid. I apologize for the false alert. Thanks

Seems I was too hasty. I did not fix the error with the fix on my side.

Does this happen on other maps?

Also, you have significantly changed the code from either riders or us, so it'll be really hard for me to help you debug. Could you also try to run something with the map you're testing using the recommended way shown in the example of this repo? That way it'll be easier for me to tell if it was an existing bug or a new introduced bug.

I appears to only happen on the new competition map. I will try running it on the original version of the repo.

Appears to be an unrelated Pytorch calculation error that throws an exception in a weird place.