huawei-noah / SMARTS

Scalable Multi-Agent RL Training School for Autonomous Driving
MIT License
922 stars 186 forks source link

[Bug Report] IdEntryTactic reset timestamp to 0 #2070

Closed Edward11235 closed 1 year ago

Edward11235 commented 1 year ago

High Level Description

For each iteation, I have 1000 iterations, which means that I call step() method 1000 times and my episode should be 100s given that my environment runs at 10 frames per second. On my scenario.py, when I define Mission for ego_mission, I set entry_tactic=IdEntryTactic(start_time=0, actor_id="car-E0_0_0-E0_0_max--59446--11620-0-0.3". The traffic vehicle with actor_id="car-E0_0_0-E0_0_max--59446--11620-0-0.3" is created at 22.4 seconds. After I 'hijack' this car, my episode runs for 122.4 (= 100 + 22.4) seconds, which means that time is reset to zero when I take control of this car. This is not supposed to happen.

Version

I am using master branch.

Steps to reproduce the bug

No response

System info

Ubuntu 20.04, Python 3.8

Error logs and screenshots

No response

Impact (If known)

No response

Gamenot commented 1 year ago

Hello @Edward11235, to recount, I believe your are saying the following is true:

If this is the behaviour you are seeing, it is intended. We have to simulate the time leading up to the ego's entry into the simulation. You can reduce this if you wish by checking against env.smarts.step_count which will give you the steps taken.

Q

In terms of usability, is there some observation that you think should be providing the total simulation time/steps or be clarified in name/documentation?