MaisJamal / carla_apollo_bridge

This project provides a bridge for communication between the autonomous driving platform Apollo and Carla simulator. Receiving data from Carla, Apollo controls the autonomous vehicle.
Apache License 2.0
53 stars 13 forks source link

About triggering Apollo Valet Parking Scenario #13

Closed Cyrus-k closed 12 months ago

Cyrus-k commented 1 year ago

Hello, developers. Recently I wanted to trigger Apollo valet parking scenario and I first use map carla Town03 and use Apollo sim-control mode. But I found that I cannot trigger AVP scenario for apollo cannot find a path to parking spot. However, I saw your video and surprisely I found you succeeded in doing this. Could you tell me how do you do that? I use Apollo7.0. Did you modify your Apollo or you did other changes? By the way, I also do experiments about valet parking on other maps not only in carla maps. I tested in sunnyvale with two office and go mentum. But I cannot trigger this even in map sunnyvale with two office, it has added a default routing of AVP scenario. And I know there is something wrong with doing this on dreamview by clicking routing points so I also tried to use mocking routing request script. However, That still don't work. So can you give me some instructions about this? Thank you very much.

MaisJamal commented 1 year ago

Hello, Currently, I am using Apollo 7.0 for my experiments, for valet parking I haven't edited Apollo. Apollo 7.0 has extra requirement over Apollo 6.0, that you should send 3 routing points, 1st : on lane starting point (before the parking spot), 2nd : on lane ending point (after the parking spot), 3rd inside the parking spot . When you pick the three points in DreamView, the parking spot becomes red and then you can press Send Routing Request to trigger valet parking. Another way is to mock the routing request using the file modules/tools/mock_routing.py but you should add the following data to the routing request message including spot id, x and y of a point inside the parking spot:

routing_request.parking_info.parking_space_id = parking_id
routing_request.parking_info.parking_point.x = parking_goal_x
routing_request.parking_info.parking_point.y = parking_goal_y

I have checked Apollo 8.0 quickly, it seems like there are issues with valet parking, it's not triggered appropriately. Probably they have changed some precondition of parking trigger, you can check the conditions for trigger in modules/planning/scenarios/scenario_manager.cc

Cyrus-k commented 12 months ago

Thanks for your guide. I didn't know triggering valet parking scenario need select three points before. I thought two points with a parking_space_id is enough. I succeeded triggering AVP now. Thank you very much!

MaisJamal commented 12 months ago

I will close the issue, as you have solved the problem.