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

Change traffic signal interface to support V2X/V2I #2567

Closed
8 tasks done
isamu-takagi opened this issue Dec 22, 2022 · 21 comments
Closed
8 tasks done

Change traffic signal interface to support V2X/V2I #2567

isamu-takagi opened this issue Dec 22, 2022 · 21 comments
Assignees
Labels
component:perception Advanced sensor data processing and environment understanding. (auto-assigned) component:planning Route planning, decision-making, and navigation. (auto-assigned) type:new-feature New functionalities or additions, feature requests.

Comments

@isamu-takagi
Copy link
Contributor

isamu-takagi commented Dec 22, 2022

Checklist

  • I've read the contribution guidelines.
  • I've searched other issues and no duplicate issues were found.
  • I've agreed with the maintainers that I can plan this task.

Description

Hi, I'm thinking about V2X support in traffic signal interface. Currently, the planning component (traffic_light module in behavior_velocity_planner) has two traffic signal inputs, perception and external. It looks like we can input V2X information into external, but it was actually created for the purpose of overriding vehicle behavior by the operator. So this interface means the operator's decision such as pass and stop rather than the traffic signal color such as green or red, and the pass throuh logic described here is not performed.

traffic-signal-discuss-old

Purpose

For the planning component, it doesn't matter if the input is image recognition results or V2X. Therefore, I'll unify the input so that V2X can be handled in the same way as image recognition results.

Possible approaches

The new architecture is as follows. Merge the image recognition results and V2X before inputting into the planning component. Typically the merge node will use V2X if it is available, otherwise it will use the most confident image recognition result. Also, as described later, light bulbs and traffic signals are treated separately.

The messages LightBulbsArray (or NewTrafficLightArray) and NewTrafficSignalArray (temporary name) are almost the same as TrafficSignalArray, except for the use of light bulbs ID and regulatory element ID. Or NewTrafficSignalArray could be changed to more semantic information such as {straight: green, turn_right: red}.

traffic-signal-discuss-new

Map primitive IDs

There are multiple signals (as equipment) at one intersection, and image recognition targets them. On the other hand, V2X and the planning component only need one traffic signal (as information) in each direction of the intersection. This is defined in lanelet as light_blubs way ID and regulatory_element relation ID. See here for details of lanelet format.

traffic-signal-lanelet

Definition of done

  • Add new interface message.
  • Change the perception output interface.
  • Change the planning input interface.
  • Create the V2X output interface.
  • Create the merge node from perception to planning.
@isamu-takagi isamu-takagi self-assigned this Dec 22, 2022
@isamu-takagi isamu-takagi added type:new-feature New functionalities or additions, feature requests. component:perception Advanced sensor data processing and environment understanding. (auto-assigned) component:planning Route planning, decision-making, and navigation. (auto-assigned) labels Dec 22, 2022
@TakaHoribe
Copy link
Contributor

For the planning component, it doesn't matter if the input is image recognition results or V2X. Therefore, I'll unify the input so that V2X can be handled in the same way as image recognition results.

I totally agree. The approach looks good to me as well.

@isamu-takagi
Copy link
Contributor Author

isamu-takagi commented Dec 26, 2022

@TakaHoribe Thank you. I would like to proceed with this proposal.

As a first step, create the autoware_perception_msgs package in autoware_msgs and define a message type as follows. Note that I changed the definition of traffic signal and traffic light. If there are other good words to distinguish between these, please let me know.

Type Current implementation Related lanelet ID
TrafficSignal.msg none Relation ID (type: regulatory_element)
TrafficLight.msg TrafficSignal.idl Way ID (type: traffic_light)
TrafficSignalElement.msg TrafficLight.idl Node ID if possible

Updated for #2567 (comment)

@isamu-takagi
Copy link
Contributor Author

I've created a PR to add messages.
autowarefoundation/autoware_msgs#48

@yukkysaito
Copy link
Contributor

cc @Mingyu1991 @miursh

@isamu-takagi
Copy link
Contributor Author

isamu-takagi commented Mar 9, 2023

The migration steps are as follows.

traffic-signal-migration

@yukkysaito
Copy link
Contributor

@isamu-takagi The diagram above is a bit old, so the actual roles and such will be different.
@Mingyu1991 @miursh Could you share the updated figure?

@Mingyu1991
Copy link
Contributor

@yukkysaito
Do you mean this figure?
image

@isamu-takagi
There would be two merge nodes within perception.
The "traffic_light_merger" would merge the results of the same traffic light from different cameras.
The "traffic_signal_arbitrator" would merge the results of traffic lights from the same group.

@isamu-takagi
Copy link
Contributor Author

Thank you. Updated the diagram.

@isamu-takagi
Copy link
Contributor Author

Step 1 is done. #2903

@stale
Copy link

stale bot commented May 15, 2023

This pull request has been automatically marked as stale because it has not had recent activity.

@stale stale bot added the status:stale Inactive or outdated issues. (auto-assigned) label May 15, 2023
@KhalilSelyan
Copy link
Contributor

@isamu-takagi Any updates ?

@stale stale bot removed the status:stale Inactive or outdated issues. (auto-assigned) label May 16, 2023
@isamu-takagi
Copy link
Contributor Author

@KhalilSelyan
I asked the maintainers of each package to implement it. I hear they are working on it now.

@isamu-takagi
Copy link
Contributor Author

Update the step 4 diagram to split merge step by targets. An implementation can perform multiple merge steps on the same node.
traffic-signal-step4

@isamu-takagi
Copy link
Contributor Author

isamu-takagi commented Jun 28, 2023

I noticed that TrafficLight.msg is converted to TrafficSignal.msg in perception component, and only TrafficSignal.msg is used for interface between components. So I will remove TrafficLight.msg.

@miursh
Copy link
Contributor

miursh commented Jul 8, 2023

Merged perception update #4050 #4125 #4176

This is the latest perception node diagaram.

traffic_light_node_diagram drawio

@miursh
Copy link
Contributor

miursh commented Jul 26, 2023

@TakaHoribe @TomohitoAndo @isamu-takagi
Let me just check one thing. Are all works in this issue already done?
Can I close this issue?

@isamu-takagi
Copy link
Contributor Author

@miursh I think so.
@TakaHoribe @TomohitoAndo @Mingyu1991 Are there any remaining tasks?

@TomohitoAndo
Copy link
Contributor

TomohitoAndo commented Jul 26, 2023

@isamu-takagi @miursh
The changes for the planning modules haven't been merged yet. (PR)
The review for this PR is already done, but scenario simulator doesn't support the new interface yet, so we are waiting for it.
It's scheduled to be done by next week.

@TomohitoAndo
Copy link
Contributor

Support for V2X in the scenario simulator has been delayed until early September. Thus, the PR for the planning modules is on hold until then.

@miursh
Copy link
Contributor

miursh commented Aug 29, 2023

Changing the node order of crosswalk_estimator
#4734
traffic_light_node-diagram

@TomohitoAndo
Copy link
Contributor

@isamu-takagi @miursh @TakaHoribe
The changes for the planning modules have been merged, so I close this issue.
#4133

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:perception Advanced sensor data processing and environment understanding. (auto-assigned) component:planning Route planning, decision-making, and navigation. (auto-assigned) type:new-feature New functionalities or additions, feature requests.
Development

No branches or pull requests

8 participants