# Planning simulation

## Preparation

### Download the sample map

Use the [`demo_artifacts`](<https://github.com/autowarefoundation/autoware/tree/2.0.0/ansible/roles/demo_artifacts>) ansible role to download and extract the sample map into `~/autoware_data/maps/sample-map-planning/`. Run these commands in the root folder of the `autoware` repository:

```bash
cd ~/autoware
ansible-galaxy collection install -f -r "ansible-galaxy-requirements.yaml"
ansible-playbook autoware.dev_env.install_dev_env --tags demo_artifacts --ask-become-pass
```

> [!NOTE]
>
> **Info**
>
> Sample map: Copyright 2020 TIER IV, Inc.

### Make sure the ML model artifacts are downloaded

Check if you have `~/autoware_data/ml_models` folder and files in it.

```bash
$ cd ~/autoware_data/ml_models
$ ls -C -w 30
bevfusion
calibration_status_classifier
camera_streampetr
diffusion_planner
image_projection_based_fusion
lidar_apollo_instance_segmentation
lidar_centerpoint
lidar_frnet
lidar_transfusion
ptv3
simpl_prediction
tensorrt_bevdet
tensorrt_yolox
traffic_light_classifier
traffic_light_fine_detector
vad
yabloc_pose_initializer
```

If not, download them with the [`artifacts`](<https://github.com/autowarefoundation/autoware/tree/2.0.0/ansible/roles/artifacts>) ansible role.

## Launch Autoware Planning Simulator

```bash
source ~/autoware/install/setup.bash
ros2 launch autoware_launch planning_simulator.launch.xml map_path:=$HOME/autoware_data/maps/sample-map-planning vehicle_model:=sample_vehicle sensor_model:=sample_sensor_kit
```

> [!WARNING]
>
> Note that you cannot use `~` instead of `$HOME` here.
>
> If `~` is used, the map will fail to load.

---

> [!NOTE]
>
> **[Using Autoware Launch GUI](<using-launch-gui/index.md>)**
>
> If you prefer a graphical user interface (GUI) over the command line for launching and managing your simulations, refer to the [Using Autoware Launch GUI](<using-launch-gui/index.md>) page for a step-by-step guide.

---

[Reference Video Tutorials](<https://drive.google.com/file/d/1bs_dX1JJ76qHk-SGvS6YF9gmekkN8fz7/view?usp=sharing>)

---

## Basic simulations

[Lane Driving](<lane-driving/index.md>) [Parking](<parking/index.md>) [Pull out and pull over](<pull-over-out/index.md>) [Lane Change](<lane-change/index.md>)

## Advanced simulations

[Placing Dummy Objects](<placing-objects/index.md>) [Avoidance](<avoidance/index.md>) [Traffic Light Recognition Simulation](<traffic-light/index.md>) [Driving Through a Crosswalk](<crosswalk/index.md>)

## Increase the maximum velocity

The original Autoware is designed to operate at a wide speed range. But for safety reasons, the default maximum velocity has been limited to **15 km/h**. Because of this, even if you drag the slider to a higher speed in the RViz panel, the system will not allow it.

To run Autoware at a higher speed, you can modify the `max_vel` parameter in the config file [autoware\_universe\_launch/autoware\_planning\_config/config/scenario\_planning/common/common.param.yaml](<https://github.com/autowarefoundation/autoware_launch/blob/main/autoware_universe_launch/autoware_planning_config/config/scenario_planning/common/common.param.yaml>) located in the `autoware_launch` repository.

> [!NOTE]
>
> **Example**
>
> Set `max_vel` to `20.0` (20 m/s = 72 km/h). Then launch the planning simulator, place the vehicle and set the velocity limit with the slider.

## Create your own map

The content above takes place in the planning simulator using a sample map. If you are interested in running Autoware with maps of your own environment, please visit the [How to Create Vector Map](<../../tutorials/integrating-autoware/creating-maps/index.md>) section for guidance.
