Skip to content

Commit

Permalink
Merge pull request autowarefoundation#208 from tier4/cherry-pick-rviz…
Browse files Browse the repository at this point in the history
…-state-plugin

chore: cherry pick adapi support for rviz state plugin
  • Loading branch information
TomohitoAndo authored Dec 14, 2022
2 parents a358cd3 + 6333cd6 commit 7a268c2
Show file tree
Hide file tree
Showing 6 changed files with 492 additions and 210 deletions.
40 changes: 28 additions & 12 deletions common/tier4_state_rviz_plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,47 @@

## Purpose

This plugin displays the current status of autoware.
This plugin displays the current status of autoware.
This plugin also can engage from the panel.

## Inputs / Outputs

### Input

| Name | Type | Description |
| ----------------------------- | ----------------------------------------------- | -------------------------------------------------- |
| `/control/current_gate_mode` | `tier4_control_msgs::msg::GateMode` | The topic represents the state of AUTO or EXTERNAL |
| `/autoware/state` | `autoware_auto_system_msgs::msg::AutowareState` | The topic represents the state of Autoware |
| `/vehicle/status/gear_status` | `autoware_auto_vehicle_msgs::msg::GearReport` | The topic represents the state of Gear |
| `/api/external/get/engage` | `tier4_external_api_msgs::msg::EngageStatus` | The topic represents the state of Engage |
| Name | Type | Description |
| ---------------------------------------- | -------------------------------------------------------------- | ------------------------------------------------------------- |
| `/api/operation_mode/state` | `autoware_adapi_v1_msgs::msg::OperationModeState` | The topic represents the state of operation mode |
| `/api/routing/state` | `autoware_adapi_v1_msgs::msg::RouteState` | The topic represents the state of route |
| `/api/localization/initialization_state` | `autoware_adapi_v1_msgs::msg::LocalizationInitializationState` | The topic represents the state of localization initialization |
| `/api/motion/state` | `autoware_adapi_v1_msgs::msg::MotionState` | The topic represents the state of motion |
| `/api/autoware/get/emergency` | `tier4_external_api_msgs::msg::Emergency` | The topic represents the state of external emergency |
| `/vehicle/status/gear_status` | `autoware_auto_vehicle_msgs::msg::GearReport` | The topic represents the state of gear |

### Output

| Name | Type | Description |
| -------------------------- | -------------------------------------- | ------------------------------ |
| `/api/external/set/engage` | `tier4_external_api_msgs::srv::Engage` | The service inputs engage true |
| Name | Type | Description |
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
| `/api/operation_mode/change_to_autonomous` | `autoware_adapi_v1_msgs::srv::ChangeOperationMode` | The service to change operation mode to autonomous |
| `/api/operation_mode/change_to_stop` | `autoware_adapi_v1_msgs::srv::ChangeOperationMode` | The service to change operation mode to stop |
| `/api/operation_mode/change_to_local` | `autoware_adapi_v1_msgs::srv::ChangeOperationMode` | The service to change operation mode to local |
| `/api/operation_mode/change_to_remote` | `autoware_adapi_v1_msgs::srv::ChangeOperationMode` | The service to change operation mode to remote |
| `/api/operation_mode/enable_autoware_control` | `autoware_adapi_v1_msgs::srv::ChangeOperationMode` | The service to enable vehicle control by Autoware |
| `/api/operation_mode/disable_autoware_control` | `autoware_adapi_v1_msgs::srv::ChangeOperationMode` | The service to disable vehicle control by Autoware |
| `/api/routing/clear_route` | `autoware_adapi_v1_msgs::srv::ClearRoute` | The service to clear route state |
| `/api/motion/accept_start` | `autoware_adapi_v1_msgs::srv::AcceptStart` | The service to accept the vehicle to start |
| `/api/autoware/set/emergency` | `tier4_external_api_msgs::srv::SetEmergency` | The service to set external emergency |
| `/planning/scenario_planning/max_velocity_default` | `tier4_planning_msgs::msg::VelocityLimit` | The topic to set maximum speed of the vehicle |

## HowToUse

1. Start rviz and select panels/Add new panel.

![select_panel](./images/select_panels.png)

2. Select tier4_state_rviz_plugin/AutowareStatePanel and press OK.

![select_state_plugin](./images/select_state_plugin.png)
3. If the AutowareState is WaitingForEngage, can engage by clicking the Engage button.
![select_engage](./images/select_engage.png)

3. If the auto button is activated, can engage by clicking it.

![select_auto](./images/select_auto.png)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
1 change: 1 addition & 0 deletions common/tier4_state_rviz_plugin/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

<build_depend>autoware_cmake</build_depend>

<depend>autoware_adapi_v1_msgs</depend>
<depend>autoware_auto_system_msgs</depend>
<depend>autoware_auto_vehicle_msgs</depend>
<depend>libqt5-core</depend>
Expand Down
Loading

0 comments on commit 7a268c2

Please sign in to comment.