HighwayEnv
HighwayEnv copied to clipboard
How to obtain the target_lane_index parameter from intersection_env.py
I want to import "steering_control" function which in the class "ControlledVehicle" in control.py to intersection_env.py. It need "target_lane_index" parameter,how to obtain the target_lane_index parameter from intersection_env.py I am looking forward to your reply. Sincerely
you don't need to import anything, if you have access to a vehicle you can directly check its target lane index.
For instance:
vehicle = env.vehicle
or
vehicle = env.road.vehicles[0]
and
print(vehicle.target_lane_index)
Then print(env.vehicle.target_lane_index)
I just want to get ego-vehicle.Is this method used to obtain the target_lane_index of ego-vehicle thank you for your replay
| | @.*** | | @.*** |
---- Replied Message ---- | From | Edouard @.> | | Date | 05/14/2022 00:38 | | To | @.> | | Cc | @.@.> | | Subject | Re: [eleurent/highway-env] How to obtain the target_lane_index parameter from intersection_env.py (Issue #306) |
Then print(env.vehicle.target_lane_index)
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
yes
Thank you so much
| | @.*** | | @.*** |
---- Replied Message ---- | From | Edouard @.> | | Date | 05/14/2022 00:44 | | To | @.> | | Cc | @.@.> | | Subject | Re: [eleurent/highway-env] How to obtain the target_lane_index parameter from intersection_env.py (Issue #306) |
yes
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>