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

Apollo HDmap Traffic Light Deployment #15654

Open
HandsomeAIccx opened this issue Feb 26, 2025 · 9 comments
Open

Apollo HDmap Traffic Light Deployment #15654

HandsomeAIccx opened this issue Feb 26, 2025 · 9 comments

Comments

@HandsomeAIccx
Copy link

I followed the guide from the link to set up traffic lights, as shown in the image:

Image
After exporting to Apollo’s format and loading it in Dreamview, I can see the traffic lights displayed, as shown in the image:

Image
However, during simulation, the planning module seems to not recognize these traffic lights. If it did, I would expect to see a signal identified as “unknown” in the planning channel of cyber_monitor, and the vehicle would stop.
For comparison, using Apollo’s built-in “Sunnyvale with Two Offices” map, the traffic lights are recognized as follows:

Image

Image
Therefore, my question is: How can I ensure that the HD map module and the planning module are aware of the deployed traffic lights? Are there any additional steps I need to take in Roadrunner?

System information

  • OS Platform and Distribution (Orin,Linux Ubuntu 20.04):
  • Apollo installed from (source):
  • Apollo version (9.0):
  • Output of apollo.sh config if on master branch:
@YuqiHuai
Copy link
Contributor

Not sure if I can help much. Did you try running https://github.com/ApolloAuto/apollo/tree/master/modules/tools/manual_traffic_light to see if this publishes the traffic light messages you are looking for?

@HandsomeAIccx
Copy link
Author

HandsomeAIccx commented Feb 28, 2025

Yes, I do use the manual traffic light to observe. I found that in the Sunnvale map, it publishes traffic light messages, but it doesn’t function properly in my map. Therefore, I’m not sure what the key reason is that the HDmap module does not recognize my traffic light.
By the way, Thanks. You always help me.
I use Roadrunner to create the map and then export it with apollo format then I got a .txt file, I use
./bazel-bin/modules/tools/create_map/convert_map_txt2bin
./bazel-bin/modules/map/tools/sim_map_generator
./bazel-bin/modules/routing/topo_creator
and then I have 3 .bin file and put them into map/data/my_map
Are there some steps I forgot?

@YuqiHuai
Copy link
Contributor

Glad to help. I’ll try my best. I’m not familiar with RoadRunner, but if you send me the Hd map binary file I might be able to take a closer look.

@HandsomeAIccx
Copy link
Author

map_file.zip
Thanks! Looking forward to your insights.

@YuqiHuai
Copy link
Contributor

YuqiHuai commented Feb 28, 2025

@HandsomeAIccx I have some guesses of where the problem is coming from, but I could not fix it yet. I am still trying to fix the issue and I'll keep you updated.

Update Feb 28 13:06:
Some immediate problems that I know about your map file is

  1. Apollo uses overlap ids to track which signals control which lane. For example, if Signal 1 controls Lane 1, then in the HD Map, they share the same overlap id (e.g., overlap_siganl_1_lane_1). But your map bin file did not setup overlapping id correctly.
  2. Even after I added the overlap ids, I still couldn't get lights to be recognized. I am still working on this.

@YuqiHuai
Copy link
Contributor

YuqiHuai commented Feb 28, 2025

Essentially your HD map has mismatched overlap ids. Lanes and signals need to have the same overlap id for Apollo to recognize signals on lanes. It will be a combination adding overlap id to lanes, signals, hd map itself, and setting correct value for overlap info objects.

I managed to set up 3 signals (194, 195, 196) for 1 lane (5_0_1), the process includes using a HD map viewer https://github.com/YuqiHuai/ApolloHDMapViewer to find the signal id and the lane id you want to connect.

Image

Running the script I temporarily created to fix HD Map

map_analysis.zip

Then manual traffic light / planning module itself should be able to recognize the traffic light.

Image

@YuqiHuai
Copy link
Contributor

YuqiHuai commented Mar 1, 2025

I managed to fix (I think) all signal issues in the map. map_file_fixed.zip

Image

@HandsomeAIccx
Copy link
Author

You are amazing. I will try it. The traffic lights in the map are just for test. I will create traffic lights at other accurate locations. I will go and try now. Really appreciate it so much!

I managed to fix (I think) all signal issues in the map. map_file_fixed.zip

Image

@YuqiHuai
Copy link
Contributor

YuqiHuai commented Mar 2, 2025

Always glad to help! I am in the process of building/collecting good tools/scripts to make Apollo easier to work with. I automated the script to fix this map issue https://github.com/YuqiHuai/baidu_apollo_map_tools/blob/main/tools/missing_overlap_relation/add_overlap.py

Probably not 100% correct, so please let me know if you see any other issues!

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