scenario_runner icon indicating copy to clipboard operation
scenario_runner copied to clipboard

Automatic Control

Open SiNa-Dehbari opened this issue 4 years ago • 5 comments

Hello Everybody,

I have a basic question.

I want to run scenarios (Ego vehicles and actors) automatically. It means they move base on waypoints or any other method, by their own. In other words, I don't want to use manual_control.py

could you please let me now which controller and how should I use?

Thank you in advance

SiNa-Dehbari avatar Nov 24 '20 08:11 SiNa-Dehbari

There are a couple of options:

  1. You run manual_control.py with autopilot enabled, but still you have to start manual_control.py then separately. a. You can incorporate the start of manual_control.py into the scenario runner, to make it easier to use.
  2. If you use OpenSCENARIO you can make use of a controller to control the ego vehicle. There is an example on github. If you use the simple_vehicle_control, you can even attach a camera to visualize the scenario.
  3. If you use a python-encoded scenario, you can simply enforce actions for the ego vehicle, like you do for any other vehicle. However, you have to attach a camera to the ego vehicle in this case, to see what is happening.

fabianoboril avatar Nov 26 '20 07:11 fabianoboril

Hi @fabianoboril ,

Could you please help to indicate where is the example with "simple_vehicle_control" on github. I couldn't find it.

I tried to set as follow, but nothing happens. And how to set the params for this, such as velocity or s.t to make it run.

<Controller name="HeroAgent">
        <Properties>
               <Property name="module" value="simple_vehicle_control"/>
        </Properties>
</Controller>

Thank you.

DeepAnonymous avatar Mar 07 '21 16:03 DeepAnonymous

Hi @SiNa-Dehbari Where you able to run the ego vehicle through a defined route with openSCENARIO using simple_vehicle_control as mentioned above. Iam not able to do the same actually

werewolfdev avatar Sep 21 '21 12:09 werewolfdev

@DeepAnonymous https://github.com/carla-simulator/scenario_runner/blob/05a811a6248c8033e4c76185ff40ae5eccad7e69/srunner/examples/OscControllerExample.xosc#L77

werewolfdev avatar Sep 21 '21 12:09 werewolfdev

You can utilize the simple_vehicle_control by setting the simple_vehicle_control as a module, and activating the visualizer in the simple_vehicle_control.py

TigerStone93 avatar Oct 30 '22 14:10 TigerStone93