|
| 1 | +# auto_aprking |
| 2 | + |
| 3 | +## auto_parking_node |
| 4 | + |
| 5 | +`auto_parking_node` is a node that enables automated valet parking by puplishing appropriate goal poses. |
| 6 | + |
| 7 | +### Input topics |
| 8 | + |
| 9 | +| Name | Type | Description | |
| 10 | +| -------------------------------- | --------------------------------------- | --------------------------------------| |
| 11 | +| `~/input/engage` | autoware_auto_vehicle_msgs::msg::Engage | status of autoware AUTONOMOUS | |
| 12 | +| `~/input/lanelet_map_bin` | autoware_auto_mapping_msgs::HADMapBin | vector map, for drivable areas | |
| 13 | +| `~/input/occupancy_grid` | nav_msgs::msg::OccupancyGrid | occupancy grid from costmap generator | |
| 14 | +| `~input/odometry` | nav_msgs::Odometry | for getting current pose | |
| 15 | + |
| 16 | +### Output topics |
| 17 | + |
| 18 | +| Name | Type | Description | |
| 19 | +| ------------------------ | --------------------------------------- | ---------------------------------------------- | |
| 20 | +| `~/output/fixed_goal` | geometry_msgs::msg::PoseStamped | current goal published by auto_parking | |
| 21 | +| `~/output/active_status` | std_msgs::msg::Bool | active status of auto_park node | |
| 22 | + |
| 23 | +### Service |
| 24 | + |
| 25 | +| Name | Type | Description | |
| 26 | +| ------------------------ | --------------------------------------- | --------------------------------- | |
| 27 | +| `~/service/set_active` | std_srvs::srv::SetBool | set active status of node | |
| 28 | + |
| 29 | +### Client |
| 30 | + |
| 31 | +| Name | Type | Description | |
| 32 | +| -------------------- | --------------------------------------- | ---------------------------------------------- | |
| 33 | +| `~/service/engage` | tier4_external_api_msgs::srv::Engage | client to engage AUTONOMOUS mode | |
| 34 | + |
| 35 | +### How to launch |
| 36 | + |
| 37 | +1. Write your remapping info in `auto-parking.launch.xml` or add args when executing `roslaunch` |
| 38 | +2. Launch node using `ros2 launch auto-parking auto-parking.launch.xml` |
| 39 | +3. Call service to start auto parking after placing ego on map `ros2 service call /planning/auto_parking/set_status std_srvs/srv/SetBool "{data: True}"` |
| 40 | +3. To stop/reset call with False arg `ros2 service call /planning/auto_parking/set_status std_srvs/srv/SetBool "{data: False}"` |
| 41 | + |
| 42 | +### Parameters |
| 43 | + |
| 44 | +{{ json_to_markdown("schema/auto_parking.schema.json") }} |
| 45 | + |
| 46 | + |
| 47 | +### Flowchart |
| 48 | + |
| 49 | +```plantuml |
| 50 | +@startuml |
| 51 | +title onTimer |
| 52 | +start |
| 53 | +
|
| 54 | +if (active?) then (yes) |
| 55 | +else (no) |
| 56 | + stop |
| 57 | +endif |
| 58 | +
|
| 59 | +if (all input data are ready?) then (yes) |
| 60 | +else (no) |
| 61 | + :set active false; |
| 62 | + stop |
| 63 | +endif |
| 64 | +
|
| 65 | +:get current pose; |
| 66 | +
|
| 67 | +if (parking lot goal not set and set AutoParking init?) then (yes): |
| 68 | + :publish parking lot goal; |
| 69 | +else (no) |
| 70 | + stop |
| 71 | +endif |
| 72 | +
|
| 73 | +if (parking lot goal set and Arrived?) then (yes): |
| 74 | + :set active false; |
| 75 | + stop |
| 76 | +endif |
| 77 | +
|
| 78 | +if (parking space goal not set and inside ParkingLot?) then (yes): |
| 79 | + :findParkingSapce; |
| 80 | + :publish parking space goal; |
| 81 | +endif |
| 82 | +
|
| 83 | +if (parking space goal set and inside ParkingLot?) then (yes): |
| 84 | + :check if parking space goal still valid; |
| 85 | + if (not valid) then (yes): |
| 86 | + :publish parking lot goal; |
| 87 | + :continue search; |
| 88 | + endif |
| 89 | +endif |
| 90 | +
|
| 91 | +if (parking space goal set and Arrived?) then (yes): |
| 92 | + stop |
| 93 | +endif |
| 94 | +
|
| 95 | +if (autonomous not engaged?) then (yes): |
| 96 | + :engage autonomous; |
| 97 | +endif |
| 98 | +
|
| 99 | +stop |
| 100 | +@enduml |
| 101 | +``` |
| 102 | + |
0 commit comments