MaisJamal / Carla_apollo_maps

HD Apollo maps for Carla simulator towns. Town01 - Town02 - Town03 - Town04 - Town05
25 stars 2 forks source link

New Carla Map Town01 #5

Closed Cyrus-k closed 8 months ago

Cyrus-k commented 8 months ago

Hello, developers. I am glad to tell you that I have finished adding all the signals to the base_map and till now it works well on my machine. The way I determined the overlap start_s and end_s is not quite same as you. I use the Apollo's script add_signal.py to get the overlap info for each signal and that makes the overlap info I added is different from yours. However, It works fine for me. I can send my modified map to you and you may check the correctness of it. Just let me know and i will send it via email. By the way, did u find the co-simulation would be a little stuck if running the co-simulation for some time? As for me, the stuck will cause the ego-car may hit something it shouldn't hit like road edges or it may ignore the traffic light signal. I wonder whether it is the machine's problem or other hidden problem.

MaisJamal commented 8 months ago

Thanks for your efforts. You can send the modified map, or make a pull request. Regarding the stuck, it is probably related to a limitation of your resources (CPU,GPU,RAM,..). Try monitoring RAM and CPU to check if they hit the maximum. If you have access to another computer, consider running Carla simulator on one computer, and Apollo and the bridge on the other. The connection can be done through SSH. This would make the simulation run better.

MaisJamal commented 8 months ago

I have checked your modified map, the overlaps of the added signals should be adjusted. The start of the overlap with the lane near the signal affects the position of the stop decision. Please note, this picture is of a signal that you added automatically (overlap was not adjusted), here you can see the stop position of the ego on the lane: not_adjusted_overlap when running with a simulator with traffic, this will cause the ego to pass the intersection even when the signal is on red.

while here you can see the stop position is posed near the white line correctly, because I have adjusted the overlap: adjusted_overlap

To fix this issue for each signal, you need to fix the start s, and end s of the overlap with the near lane, defined in the picture: overlap_s What I usually do is

Cyrus-k commented 8 months ago

Can you tell me where your start and destination is? As I saw in this picture, the ego car is running on the lane 3_1_1. So I run the co-simulation by myself. And It seems different from yours. It looks like below. Screenshot from 2023-10-17 17-28-06 It can stop correctly before the signal. So can you give me your start and destination point, so I can reproduce your case.

MaisJamal commented 8 months ago

I monitored this issue in all added signals except for signal20. You can test it in Simcontrol without Carla simulator. Example routing request for producing the issue; first point(x,y): (92.45, -161.86) , second point(x,y): (92.35,-107.61).

Cyrus-k commented 8 months ago

Sorry to disturb you. I would like to know if there is difference between testing in Apollo simcontrol and testing with carla. I seldom use Simcontrol and I wonder if you don't use carla simulator how can you make the traffic light work in dreamview? I use simcontrol just now and i found traffic lights don't work. But even that time, I still found ego-car stopping right before the traffic light. Thank you for your instructions.

MaisJamal commented 8 months ago

You can make the traffic lights work by running the script ./scripts/manual_light.sh , then you can switch the light of the signal manually by this script. The difference between Simcontrol and running with a simulator like Carla: In Simcontrol mode, the ego vehicle follows the planned trajectory ideally (with no control and no feedback from a car model). While, when you run Apollo with Carla, you will have feedback from Carla regarding chassis and location of the vehicle, then Apollo control will send throttle,brake, and steering commands to control the vehicle to follow the planned trajectory. Running with a simulator is closer to reality.On the other hand, running in Simcontrol is simple and can be a pre-step, for example, when you debug or try to solve some issue, you can run it in simcontrol to simplify the experiment and narrow down the possible causes of the issue to Apollo's planning module or Apollo's map. For experimenting, of course the scenario should be run with a simulator like Carla. I use Simcontrol only for checking some problem quickly. Have you managed to reproduce the issue of ego passing the stop line?

Cyrus-k commented 8 months ago

Thank I got it. But unfortunately, I still cannot reproduce the issue of ego passing the stop line. I have tried your case and I also ran some cases by myself, but I still cannot reproduce the issue. Here are some printscreens: Screenshot from 2023-10-17 18-50-05 Screenshot from 2023-10-17 18-50-33 As you can see in the picture, the car always stop correctly before the stop line, which is different from yours. I think there must be some mismatches between maps we use. I will send you my map again via email.

MaisJamal commented 8 months ago

Can you please test it with Carla also?

Cyrus-k commented 8 months ago

Of course. I have already tested with carla. I can send my test video to you via email.

MaisJamal commented 8 months ago

That's great. Thanks for editing the map. I have updated the map in this repo, and updated the Carla_Apollo_bridge. The bridge now publishes the ground truth of all traffic lights in Town01. I will close the issue, as we have successfully updated the map.