autowarefoundation / autoware.universe

https://autowarefoundation.github.io/autoware.universe/
Apache License 2.0
1k stars 641 forks source link

Planning simulator stops for non-existant virtual traffic light #2390

Closed xmfcx closed 1 year ago

xmfcx commented 1 year ago

Checklist

Description

Following the https://autowarefoundation.github.io/autoware-documentation/main/tutorials/ad-hoc-simulation/planning-simulation/ the vehicle stops at a right turn and stays there forever.

Expected behavior

Vehicle to move if there is no traffic light.

Actual behavior

Vehicle stops.

Steps to reproduce

Versions

Possible causes

No response

Additional context

There is not even a traffic light nearby, I don't know why it stops.

Screenshot from 2022-11-28 15-41-22

mitsudome-r commented 1 year ago

Virtual traffic light is meant to be used for V2X communication. The vehicle will wait until it receives approval from the external software (infrastructure) to pass. https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_planner/virtual-traffic-light-design/.

The reason why virtual traffic light being defined in the sample map is because the sample map is originally created by TIER IV to test all features in behavior modules. Maybe we should add tutorial for sending approval in the instruction to avoid confusion.

kosuke55 commented 1 year ago

thank you for your report. sorry, I did not check the actual behavior but the following command may approve it and the vehicle starts to move.

sec=$(($(date +%s) + 30)); ros2 topic pub /awapi/tmp/virtual_traffic_light_states tier4_v2x_msgs/msg/VirtualTrafficLightStateArray "{stamp: {sec: $sec, nanosec: 999999999}, states: [{stamp: {sec: $sec, nanosec: 999999999}, type: 'dummy_infrastructure', id: '$1', approval: true, is_finalized: true}]}" -1
xmfcx commented 1 year ago

Thanks, I will add this to the https://autowarefoundation.github.io/autoware-documentation/main/tutorials/ad-hoc-simulation/planning-simulation/ tutorial steps as a note for newcomers.

soblin commented 1 year ago

@xmfcx Recently we updated the sample map to contain all kinds of map primitives including virtual_trafic_light, so this is an expected behavior. So the workaround is to

mitsudome-r commented 1 year ago

@soblin It might be difficult for beginners to understand the difference between virtual traffic light(V2I command) and normal traffic light. Unless there is a good documentation for the virtual traffic light use-cases, it might be better to just turn the flag off.

mitsudome-r commented 1 year ago

@soblin I have talked with Fatih, and it would be nice if you can work on this issue.

soblin commented 1 year ago

@mitsudome-r Okay! I think we can just disable this flag in awf autoware_launch only.