javyduck / ChatScene

[CVPR2024] ChatScene: Knowledge-Enabled Safety-Critical Scenario Generation for Autonomous Vehicles https://arxiv.org/abs/2405.14062
https://javyduck.github.io/chatscene/
MIT License
89 stars 5 forks source link

error in dynamic #23

Open JesmonX opened 2 weeks ago

JesmonX commented 2 weeks ago

When I run run_train_dynamic.py with compilable SCENIC code generated by your /ChatScene/retrieve/retrieve.py, it sometimes(maybe always) occuers a mistake of ZeroDivisionError: float division by zero after already building a scenario in carla. The detaild error is at the picture followed. 24d2d4c18cb001295beda33a8d13ac08 And there is another problem with /ChatScene/retrieve/retrieve.py, it always generate uncompilable scenic code. Is it normal or there is some problem in database?

javyduck commented 2 weeks ago

For the first question, the error "ZeroDivisionError: float division by zero" indicates that there is no record for even one frame, as the simulation hasn’t started as you can see from the log entry: "scenario stops due to scenic termination."

For the second question, I recently updated the database including more diverse snippets, and previously, the agent type was specified directly in the snippet, but I’ve now implemented it as a placeholder for extraction. This change may cause some compatibility issues. I will work on fixing it as soon as possible (apologies for the delay; I've been quite busy recently...)

JesmonX commented 2 weeks ago

But how to fix the first problem? I think it's because the scenic code is not that correct to some degree even it could go through the compilation. And I did not see similiar issue in the git repo of scenic.

javyduck commented 3 days ago

The thing is, in the senic repository, all the scripts there are written manually. However, in our repository, they are generated either through retrieval or by GPT, so there might be some errors in the final code. You can manually check and fix the generated code, or you can use GPT to automatically correct it. I’ll also refine it into a better version later. Apologies for being too busy recently...