f1tenth / f1tenth_gym_ros

Containerized ROS communication bridge for F1TENTH gym environment.
MIT License
154 stars 106 forks source link

"ZeroDivisionError: division by zero" ? #20

Closed BrianN92 closed 2 years ago

BrianN92 commented 2 years ago

Hi everyone! I am new to this simulator, and just got it to run successfully with ROS2 container. However, I noticed after running the keyboard teleop control, the simulator would crash every time. I have made a screenshot of the error, and you can refer to it below. I am trying to look into the script to find the bug, at the mean time, I would really appreciate any help from you. Thank you!

image

hzheng40 commented 2 years ago

Looks like it's from the f1tenth_gym simulation instead of the script in this repo. Specifically these lines here. Do you have specific actions in the ROS environment that you perform that triggers this?

BrianN92 commented 2 years ago

Hi @hzheng40 Thanks for your reply! I noticed that as well. I am not sure what triggered it, so just add another condition to bypass it now. The problem is I cannot save my changes in the container. Everytime I open a new container, my changes are gone. Do you know how to fix it? Thanks again!

hzheng40 commented 2 years ago

I think you can use the --nocleanup option when you run rocker. The container rocker builds will then persist, but you'll have to figure out what the id of that container is when you want to restart it.

BrianN92 commented 2 years ago

Thanks @hzheng40 , I am able to find the id of that container, but looks like the extension volume does not support "--nocleanup". Please refer to the screenshot below.

image

BrianN92 commented 2 years ago

I'm closing this thread since the original issue was solved, and I will open a new one for the other. Thanks for your help! @hzheng40