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

How to specify the state of traffic lights in the scenario? #1236

Open
hcn1519 opened this issue Apr 22, 2024 · 3 comments
Open

How to specify the state of traffic lights in the scenario? #1236

hcn1519 opened this issue Apr 22, 2024 · 3 comments
Assignees

Comments

@hcn1519
Copy link

hcn1519 commented Apr 22, 2024

I am running a scenario using the scenario test runner, and I wonder how to specify the state of traffic lights in the TIER IV Scenario Format Version 2.0. It seems that the scenario simulator v2 does not follow the OpenScenario v1.2 specification.

Below are my scenario and map files, which I used to test traffic light behaviors. The scenario includes a simple ego routing story and sets all traffic lights to red. (I have checked the syntax against other scenario files, though there might be an error.) I expected the ego car to stop at the junction because of the traffic light, but it ignores it and reaches the destination.

The code below is the part related to traffic lights in the scenario file.

RoadNetwork:
  LogicFile:
    filepath: lanelet2_map.osm
  SceneGraphFile:
    filepath: point_cloud.pcd
  TrafficSignals:
      TrafficSignalController:
      - name: test_signals
        Phase:
        - duration: INF
          name: Stop
          TrafficSignalState:
          - state: red solidOn circle
            trafficSignalId: '494'
          - state: red solidOn circle
            trafficSignalId: '520'
          - state: red solidOn circle
            trafficSignalId: '586'
          - state: red solidOn circle
            trafficSignalId: '553'
Storyboard:
    Init:
      Actions:
        GlobalAction:
        - InfrastructureAction:
            TrafficSignalAction:
              TrafficSignalControllerAction:
                phase: Stop
                trafficSignalControllerRef: test_signals
@HansRobo
Copy link
Member

HansRobo commented Apr 22, 2024

@hcn1519

Hi, thank you for reporting!

Since the traffic light message type differs depending on the version of autoware, it is necessary to appropriately switch the traffic light topic output from the scenario_simulator_v2 side.

You can switch it by switching the architecture_type of scenario_test_runner.
For older Autoware, awf/universe is appropriate, and for newer Autoware, awf/universe/20230906 is appropriate.

If nothing is specified, awf/universe will be used, so the traffic light will not connect to new autoware.

We are aware of this issue and are working on #1232 .

@HansRobo
Copy link
Member

HansRobo commented Apr 22, 2024

It seems that the scenario simulator v2 does not follow the OpenScenario v1.2 specification.

The user guide provides a scenario for specifying a traffic light using OpenDRIVE as an example.
However, in reality, as shown below, the content of state is just an example, and it is not stipulated in the standard that it must be followed.

description of TrafficSignalState::state

State of the signal, e.g. the visual information "off;off;on". The number of values in the state depends on the traffic signal in the roadnetwork , e.g. type and subtype in OpenDRIVE

Autoware uses lanelet2 as its map format instead of OpenDRIVE, so please understand that although it is within the scope of the OpenSCENARIO standard, the specifications are different from the scenario in the user guide, which assumes OpenDRIVE.

@hcn1519
Copy link
Author

hcn1519 commented Apr 22, 2024

Thank you for your answer @HansRobo
I test to use awf/universe/20230906, and it works. Also, I appreciate your additional answer regarding specification.

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

2 participants