|
1 | 1 | # Reaction Analyzer
|
2 | 2 |
|
3 |
| -The main purpose of the reaction analayzer package is measuring reaction times of the nodes by listening the output |
| 3 | +The main purpose of the reaction analyzer package is measuring reaction times of the nodes by listening the |
| 4 | +pre-determined output |
4 | 5 | topics.
|
5 | 6 |
|
6 | 7 | ## Design For Psim
|
7 | 8 |
|
8 | 9 | 
|
9 | 10 |
|
| 11 | +Two main modules are running: Spawner and Observer. |
| 12 | + |
10 | 13 | ### Spawner
|
11 | 14 |
|
12 |
| -The main purpose of the `Spawner` is to create the entities within a condition. The `Spawner` takes the object |
| 15 | +The main purpose of the `Spawner` is imitating the perception pipeline outputs by creating the entities within a |
| 16 | +condition. The `Spawner` takes the object |
13 | 17 | and ego pose as inputs, and it creates obstacles with respect to position and orientation of center of mass and
|
14 | 18 | dimension of the objects. After creating pointcloud and predicted objects, it waits for `Spawn Conditioning Mechanism`
|
15 | 19 | to publish the messages to topics.
|
16 | 20 |
|
17 | 21 | **Spawn Conditioning Mechanism**
|
18 | 22 | Distance_between_ref_point_and_ego < some_threshold -> spawn obstacle
|
19 | 23 |
|
20 |
| -### RosObserver |
| 24 | +### Observer |
21 | 25 |
|
22 |
| -The `RosObserver Node` is responsible for watching the messages inside the topics by subscription and analyze them to |
| 26 | +The `Observer` is responsible for watching the messages inside the pre-determined topics by subscription and analyze |
| 27 | +them to |
23 | 28 | understand node is reacted or not. After `Spawner` publishes the Entities, it activates the observer's search functions.
|
24 |
| -For the PSim, after `Spawner` activates the `RosObserver`, it detects reaction messages and measure reaction time. |
25 |
| -Currently, it measures following durations: |
| 29 | +For the PSim, after `Spawner` activates the `Observer`, it detects reaction messages and measure reaction time. |
| 30 | +Currently, it supports following message types: |
26 | 31 |
|
27 |
| -- Duration between spawn_cmd_time - trajectory_follower reaction |
28 |
| -- Duration between trajectory_follower - vehicle_cmd_gate reaction |
| 32 | +- autoware_auto_control_msgs::msg::AckermannControlCommand |
| 33 | +- autoware_auto_planning_msgs::msg::Trajectory |
29 | 34 |
|
30 | 35 | ### Usage
|
31 | 36 |
|
32 |
| -Firstly, we need to set obstacle position to reaction_analyzer parameter file. Reaction_analyzer takes entity's map |
33 |
| -position. After deciding which map will be used, you can upload your map to scenario_editor, and put an entity to |
34 |
| -lanelet map. Then, convert the coordinate frame to map, you can see the entity's position in the map frame. Save the |
35 |
| -position, orientation, and dimensions to parameter file of the node. |
| 37 | +Download the demonstration test map from the link here: |
| 38 | +https://drive.google.com/file/d/1zHdSazcH9uQvw1Afj_6TL9N8d7_Z88Yu/view?usp=sharing |
| 39 | + |
| 40 | +If you want to make this test on another map, you need to arrange the test environment variables in parameter file. To |
| 41 | +do this: |
| 42 | + |
| 43 | +- Upload your map to scenario_editor |
| 44 | +- Locate the ego, entity, and goal pose |
| 45 | +- After locate necessary entities, change coordinate to world and orientation to euler from map section of scenario |
| 46 | + editor. |
| 47 | +- Change initial position, goal position, and entity's position and dimension in parameter file w.r.t. values in |
| 48 | + scenario editor. |
| 49 | + |
| 50 | +For quick test, you can use the default parameter values with the map shared above. |
36 | 51 |
|
37 | 52 | After entity parameters are set into parameter file, you can start to test. To do this:
|
38 | 53 |
|
39 | 54 | - Launch PSim.
|
40 | 55 |
|
41 | 56 | `ros2 launch autoware_launch planning_simulator.launch.xml map_path:=[MAP_PATH] vehicle_model:=sample_vehicle sensor_model:=sample_sensor_kit`
|
42 | 57 |
|
43 |
| -- Initialize the EGO in your test area and set a goal behind the entity. |
44 | 58 | - Launch `reaction_analyzer.launch.xml`
|
45 | 59 |
|
46 | 60 | `ros2 launch reaction_analyzer reaction_analyzer.launch.xml`
|
47 | 61 |
|
48 |
| -- Set the Autonomous Driving Mode and wait until the Spawner is triggered, after it spawns the obstacles, you can see the reaction durations in the |
49 |
| - terminal. |
50 |
| -- For the next test, re-open the reaction_analyzer. |
| 62 | +- Reaction analyzer initializes the test environment, and starts to test automatically. |
51 | 63 |
|
52 |
| -**PS**: While running the reaction_analyzer, you should be sure that dummy_perception and other perception modules are |
53 |
| -not running. In current branch of the package, all perception related modules are removed from the simulator launch |
54 |
| -file (src/universe/autoware.universe/launch/tier4_simulator_launch/launch/simulator.launch.xml), and you can start PSim |
55 |
| -directly. |
| 64 | +**PS**: This tool is currently under development. To do better measurements, some temporarily commits for other packages |
| 65 | +are added to branch. After checkout the branch, build all the Autoware before launch reaction analyzer. |
0 commit comments