Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ego doesn't stop when traffic lights are red or yellow #272

Open
MingfeiCheng opened this issue Jun 12, 2022 · 0 comments
Open

Ego doesn't stop when traffic lights are red or yellow #272

MingfeiCheng opened this issue Jun 12, 2022 · 0 comments

Comments

@MingfeiCheng
Copy link

I test Pylot by using my predefined scenario of CARLA and my e2e.conf is shown below:

--random_seed=1337
###### Object detection config ######
--simulator_obstacle_detection
###### Traffic light detector config ######
--simulator_traffic_light_detection
###### Depth #####
--perfect_depth_estimation
###### Segmentation config ######
--perfect_segmentation
###### Prediction config ######
--perfect_obstacle_tracking
--tracking_num_steps=10
--prediction
--prediction_num_past_steps=10
--prediction_num_future_steps=30
###### Planning config #####
--planning_type=waypoint
--prediction_type=linear
--control=pid
###### Control config #####
--steer_gain=1.0
--stop_for_people=True
--stop_for_traffic_lights=True
--stop_for_vehicles=True
--stop_at_uncontrolled_junctions=True
######### Logging config #########
--log_file_name=pylot.log
--csv_log_file_name=pylot.csv
--v=1
--visualize_rgb_camera

I find that the ego does not stop when traffic lights are red:
image

I think the method below might ignore the situation where traffic lights are red or yellow.

def stop_traffic_light(self, tl, wp_vector, wp_angle) -> float:

My simple solution is modifying the code in L440

return True, speed_factor_tl

The modification is shown below, which is useful for my testing scenarios.

if (tl.state == TrafficLightColor.RED or tl.state == TrafficLightColor.YELLOW):
        return True, 0
else:
        return True, speed_factor_tl

Is there a better solution for this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant