carla-simulator / carla

Open-source simulator for autonomous driving research.
http://carla.org
MIT License
11.23k stars 3.63k forks source link

Some Questions About Autopilot #646

Closed yuanzhiyu closed 6 years ago

yuanzhiyu commented 6 years ago

Hey! Recently I'm trying a pipeline-way to control a car in the simulator. So I have read part of the source codes of autopilot. But I still have some questions.

  1. Which method is used to control a car to turn at an intersection? Does "CalcStreeringValue(Direction)" solve this problem?
  2. What does TargetLocation mean? I understand it as a planned route consist of a series points vector. But why it executes "CalcStreeringValue(Direction)" when "TargetLocation is empty". if I can understand the TargetLocation as a straight-line route without any turning?
  3. How can I make sure that the car has reached a point on the planned route and to compute the "steering" with the next point? It should have a method to judge whether the car has reached a point, but I haven't found it.
  4. How does autopilot create a planned route automatically and update the variable “Locations”?(And I also think "Locations" is the same as "TargetLocations", because TargetLocations.emplace(Location), am I right?)

Thank you !!

yuanzhiyu commented 6 years ago

Also, a question does not belong to autopilot, where can I find the relationship between start point index and its coordinate in the map? Should it be in a file?

shriram17 commented 6 years ago

Hey @yuanzhiyu From my understanding, when Autopilot Mode is switched on

I hope this answers some or most of your questions.

yuanzhiyu commented 6 years ago

@shriram17 Thanks a lot for answering my question! But still, the algorithm on autopilot is not easy to understand, I choose pure-pursuit algorithm to solve my problem finally.

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Neel1302 commented 4 years ago

@shriram17 How can the probabilities for the splines be set in-game? I know it can set in OpenDriveActor in the Map before launching the simulator, but in scenarios when one actor needs to turn right and the other left, it doesn't work out. So it is best to set it in-game - any pointers as to how this can be done would be greatly appreciated. Thanks