magail4autodrive: first commit

This commit is contained in:
ZHY
2025-09-28 18:57:04 +08:00
commit 947871a720
90 changed files with 1037 additions and 0 deletions

18
Env/simple_idm_policy.py Normal file
View File

@@ -0,0 +1,18 @@
import numpy as np
class ConstantVelocityPolicy:
def __init__(self, target_speed=50):
self.step_num = 0
def act(self):
self.step_num += 1
if self.step_num % 30 < 15:
throttle = 1.0
else:
throttle = 1.0
steering = 0.1
# return [steering, throttle]
return [0.0,0.05]