Skip to content

Commit e391dac

Browse files
committed
add readme and schema
1 parent 692c095 commit e391dac

File tree

2 files changed

+156
-0
lines changed

2 files changed

+156
-0
lines changed

planning/auto_parking/README.md

+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
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+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "Parameters for Auto Parking Node",
4+
"type": "object",
5+
"definitions": {
6+
"auto_parking": {
7+
"type": "object",
8+
"properties": {
9+
"update_rate": {
10+
"type": "number",
11+
"description": "timer's update rate",
12+
"default": "5.0",
13+
"minimum": 0.0
14+
},
15+
"th_arrived_distance_m": {
16+
"type": "number",
17+
"description": "threshold distance to check if vehicle has arrived at the trajectory's endpoint",
18+
"default": "1.0",
19+
"minimum": 0.0
20+
},
21+
"th_parking_space_distance_m": {
22+
"type": "number",
23+
"description": "threshold radius within which to search parking spaces",
24+
"default": "10.0",
25+
"minimum": 0.0
26+
},
27+
"vehicle_shape_margin_m": {
28+
"type": "number",
29+
"description": "vehcile margin for astar search",
30+
"default": "0.2",
31+
"minimum": 0.0
32+
}
33+
},
34+
"required": [
35+
"update_rate",
36+
"th_arrived_distance_m",
37+
"th_parking_space_distance_m",
38+
"vehicle_shape_margin_m"
39+
]
40+
}
41+
},
42+
"properties": {
43+
"/**": {
44+
"type": "object",
45+
"properties": {
46+
"ros__parameters": {
47+
"$ref": "#/definitions/auto_parking"
48+
}
49+
},
50+
"required": ["ros__parameters"]
51+
}
52+
},
53+
"required": ["/**"]
54+
}

0 commit comments

Comments
 (0)