Skip to content

Commit

Permalink
docs(behavior_path_planner): update main documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Zulfaqar Azmi <[email protected]>
  • Loading branch information
zulfaqar-azmi-t4 committed Nov 8, 2023
1 parent e02ec1b commit 558c97b
Showing 1 changed file with 22 additions and 18 deletions.
40 changes: 22 additions & 18 deletions planning/behavior_path_planner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,6 @@ set(COMPILE_WITH_OLD_ARCHITECTURE TRUE) # <- HERE
...
```

**What is the Behavior Tree?**: In the behavior path planner, the behavior tree mechanism is used to manage which modules are activated in which situations. In general, this "behavior manager" like function is expected to become bigger as more and more modules are added in the future. To improve maintainability, we adopted the behavior tree. The behavior tree has the following advantages: easy visualization, easy configuration management (behaviors can be changed by replacing configuration files), and high scalability compared to the state machine.

The current behavior tree structure is shown below. Each modules (LaneChange, Avoidance, etc) have _Request_, _Ready_, and _Plan_ nodes as a common function.

- **Request**: Check if there is a request from the module (e.g. LaneChange has a request when there are multi-lanes and the vehicle is not on the preferred lane),
- **Ready**: Check if it is safe to execute the plan (e.g. LaneChange is ready when the lane_change path does not have any conflicts with other dynamic objects on S-T space).
- **Plan**: Calculates path and set it to the output of the BehaviorTree. Until the internal status returns SUCCESS, it will be in running state and will not transit to another module.
- **ForceApproval**: A lane change-specific node that overrides the result of _Ready_ when a forced lane change command is given externally.

![behavior_path_planner_bt_config](./image/behavior_path_planner_bt_config.png)

## Inputs / Outputs / API

### output
Expand All @@ -91,13 +80,28 @@ The current behavior tree structure is shown below. Each modules (LaneChange, Av

### input

| Name | Type | Description |
| :----------------------------- | :----------------------------------------------------- | :------------------------------------------------------------------------------------ |
| ~/input/route | `autoware_auto_mapping_msgs::msg::LaneletRoute` | current route from start to goal. |
| ~/input/vector_map | `autoware_auto_mapping_msgs::msg::HADMapBin` | map information. |
| ~/input/objects | `autoware_auto_perception_msgs::msg::PredictedObjects` | dynamic objects from perception module. |
| ~/input/occupancy_grid_map/map | `nav_msgs::msg::OccupancyGrid` | occupancy grid map from perception module. This is used for only Goal Planner module. |
| ~/input/kinematic_state | `nav_msgs::msg::Odometry` | for ego velocity. |
| Name | Required? | Type | Description |
| :---------------------------- | --------- | :----------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ~/input/odometry || `nav_msgs::msg::Odometry` | for ego velocity. |
| ~/input/accel || `geometry_msgs::msg::AccelWithCovarianceStamped` | for ego acceleration. |
| ~/input/objects || `autoware_auto_perception_msgs::msg::PredictedObjects` | dynamic objects from perception module. |
| ~/input/occupancy_grid_map || `nav_msgs::msg::OccupancyGrid` | occupancy grid map from perception module. This is used for only Goal Planner module. |
| ~/input/traffic_signals || `autoware_perception_msgs::msg::TrafficSignalArray` | traffic signals information from the perception module |
| ~/input/vector_map || `autoware_auto_mapping_msgs::msg::HADMapBin` | vector map information. |
| ~/input/route || `autoware_auto_mapping_msgs::msg::LaneletRoute` | current route from start to goal. |
| ~/input/scenario || `tier4_planning_msgs::msg::Scenario` | |
| ~/input/lateral_offset || `tier4_planning_msgs::msg::LateralOffset` | lateral offset to trigger side shift |
| ~/system/operation_mode/state || `autoware_adapi_v1_msgs::msg::OperationModeState` | Allows planning module to know if vehicle is in autonomous mode or can be controlled<sup>[ref](https://github.com/autowarefoundation/autoware.universe/blob/main/system/default_ad_api/document/operation-mode.md)</sup> |

○ Mandatory △ Optional

#### Optional

The following inputs are not needed

| Name | Type | Description |
| :--------------------- | :---------------------------------------- | :----------------------------------- |
| ~/input/lateral_offset | `tier4_planning_msgs::msg::LateralOffset` | lateral offset to trigger side shift |

## General features of behavior path planner

Expand Down

0 comments on commit 558c97b

Please sign in to comment.