# Evaluating the controller performance

This page shows how to use `autoware_control_performance_analysis` package to evaluate the controllers.

`autoware_control_performance_analysis` is the package to analyze the tracking performance of a control module and monitor the driving status of the vehicle.

If you need more detailed information about package, refer to the [autoware\_control\_performance\_analysis](<https://github.com/autowarefoundation/autoware_universe/tree/main/control/autoware_control_performance_analysis>) package.

## How to use

### Before Driving

#### 1\. Firstly you need to launch Autoware. You can also use this tool with real vehicle driving

#### 2\. Initialize the vehicle and send goal position to create route

- If you have any problem with launching Autoware, please see the [simulation](<../../../../../simulation/index.md>) pages.

#### 3\. Launch the autoware\_control\_performance\_analysis package

```bash
ros2 launch autoware_control_performance_analysis control_performance_analysis.launch.xml
```

- After this command, you should be able to see the driving monitor and error variables in topics.

#### 4\. Run the PlotJuggler in sourced terminal

```bash
source ~/autoware/install/setup.bash
```

```bash
ros2 run plotjuggler plotjuggler
```

- If you do not have PlotJuggler with its ROS 2 plugins, install it with `sudo apt install ros-$ROS_DISTRO-plotjuggler-ros`. The `dev_tools` role of the Autoware setup script installs only the `ros-$ROS_DISTRO-plotjuggler` package, which does not have the ROS 2 plugins.

#### 5\. Increase the buffer size (maximum is 100), and import the layout from `src/universe/autoware_universe/control/autoware_control_performance_analysis/config/controller_monitor.xml`

- After import the layout, please specify the topics that are listed below.

> - /localization/kinematic\_state
> - /vehicle/status/steering\_status
> - /control\_performance/driving\_status
> - /control\_performance/performance\_vars

- Please mark the `If present, use the timestamp in the field [header.stamp]` box, then select the OK.

#### 6\. Now, you can start to driving. You should see all the performance and driving variables in PlotJuggler

### After Driving

#### 1\. You can export the statistical output and all data to compare and later usage

- With statistical data, you can export the all statistical values like (min, max, average) to compare the controllers.

- You can also export all data to later use. To investigate them again, after launch PlotJuggler, import the `.cvs` file from data section.

### Tips

- You can plot the vehicle position. Select the two curve (keeping CTRL key pressed) and Drag &amp; Drop them using the **RIGHT Mouse button**. Please visit the `Help -> Cheatsheet` in PlotJuggler to see more tips about it.

- If you see too much noised curve in plots, you can adjust the `odom_interval` and `low_pass_filter_gain` parameters in [control\_performance\_analysis.param.yaml](<https://github.com/autowarefoundation/autoware_universe/blob/main/control/autoware_control_performance_analysis/config/control_performance_analysis.param.yaml>) to avoid noised data.
