|
| 1 | +# Detection area element |
| 2 | + |
| 3 | +Behavior velocity planner's [detection area](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_detection_area_module/) plans velocity |
| 4 | +when if pointcloud is detected in a detection area defined on a map, the stop planning will be executed at the predetermined point. |
| 5 | +In order to operate that, we will add a detection area element to our lanelet2 map. |
| 6 | + |
| 7 | +## Creating a detection area element |
| 8 | + |
| 9 | +In order to create a detection area on your map, please follow these steps: |
| 10 | + |
| 11 | +1. Click `Lanelet2Maps` button on top panel. |
| 12 | +2. Select `Detection Area` from the panel. |
| 13 | +3. Please select lanelet which stop line to be added. |
| 14 | +4. Click and insert `Detection Area` on your pointcloud map. |
| 15 | +5. You can change the dimensions of the detection area with clicking points on the corners of the detection area. For more information, you can check the demonstration video. |
| 16 | + |
| 17 | +You can see these steps in the detection area creating demonstration video: |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | +### Testing created detection area with planning simulator |
| 22 | + |
| 23 | +After the completing of creating the map, we need to save it. |
| 24 | +To that please click `File` --> `Export Lanelet2Maps` then download. |
| 25 | + |
| 26 | +After the download is finished, |
| 27 | +we need to put lanelet2 map and pointcloud map on the same location. |
| 28 | +The directory structure should be like this: |
| 29 | + |
| 30 | +```diff |
| 31 | ++ <YOUR-MAP-DIRECTORY>/ |
| 32 | ++ ├─ pointcloud_map.pcd |
| 33 | ++ └─ lanelet2_map.osm |
| 34 | +``` |
| 35 | + |
| 36 | +If your .osm or .pcd map file's name is different from these names, |
| 37 | +you need to update autoware.launch.xml: |
| 38 | + |
| 39 | +```diff |
| 40 | + <!-- Map --> |
| 41 | +- <arg name="lanelet2_map_file" default="lanelet2_map.osm" description="lanelet2 map file name"/> |
| 42 | ++ <arg name="lanelet2_map_file" default="<YOUR-LANELET-MAP-NAME>.osm" description="lanelet2 map file name"/> |
| 43 | +- <arg name="pointcloud_map_file" default="pointcloud_map.pcd" description="pointcloud map file name"/> |
| 44 | ++ <arg name="pointcloud_map_file" default="<YOUR-POINTCLOUD-MAP-NAME>.pcd" description="pointcloud map file name"/> |
| 45 | +``` |
| 46 | + |
| 47 | +Now we are ready to launch the planning simulator: |
| 48 | + |
| 49 | +```bash |
| 50 | +ros2 launch autoware_launch planning_simulator.launch.xml map_path:=<YOUR-MAP-FOLDER-DIR> vehicle_model:=<YOUR-VEHICLE-MODEL> sensor_model:=<YOUR-SENSOR-KIT> |
| 51 | +``` |
| 52 | + |
| 53 | +Example for tutorial_vehicle: |
| 54 | + |
| 55 | +```bash |
| 56 | +ros2 launch autoware_launch planning_simulator.launch.xml map_path:=$HOME/Files/autoware_map/tutorial_map/ vehicle_model:=tutorial_vehicle sensor_model:=tutorial_vehicle_sensor_kit vehicle_id:=tutorial_vehicle |
| 57 | +``` |
| 58 | + |
| 59 | +1. Click `2D Pose Estimate` button on rviz or press `P` and give a pose for initialization. |
| 60 | +2. Click `2D Goal Pose` button on rviz or press `G` and give a pose for goal point. |
| 61 | +3. We need to add pedestrians to detection area, so activate interactive pedestrians from `Tool Properties` panel on rviz. |
| 62 | +4. After that, please press `Shift`, then click right click button for inserting pedestrians. |
| 63 | +5. You can control inserted pedestrian via dragging right click. So, you should put pedestrian on the detection area for testing. |
| 64 | + |
| 65 | +Stop detection area on rviz: |
| 66 | + |
| 67 | +<figure markdown> |
| 68 | + { align=center } |
| 69 | + <figcaption> |
| 70 | + Detection area test on the created map. |
| 71 | + </figcaption> |
| 72 | +</figure> |
| 73 | + |
| 74 | +You can check your detection area elements in the planning simulator as this demonstration video: |
| 75 | + |
| 76 | + |
0 commit comments