Farama-Foundation / HighwayEnv

A minimalist environment for decision-making in autonomous driving

Home Page:https://highway-env.farama.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vehicle heading angle

izvvv opened this issue · comments

commented

How do I change the heading angle of a parked vehicle? I need to keep the vehicle level.

image
image

commented

And I've already added PI/2 to my goal
image

v = Vehicle.make_on_lane(...) aligns the vehicle heading with the lane direction, by default.
you can just add the following line below to rotate the vehicles:

v = Vehicle.make_on_lane(...)
v.heading += np.pi / 2
v.color = ...

(or you can just replace the call to make_on_lane by a copy of the function's code and change the heading as needed)