Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add autoware_state_monitor package #9

Merged
Show file tree
Hide file tree
Changes from 58 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
ceb72ec
release v0.4.0
mitsudome-r Sep 18, 2020
cba99a6
Add map diag (#688)
kenji-miyake Jul 14, 2020
4636d20
Change default value of disengage_on_route (#703)
kenji-miyake Jul 20, 2020
8e946c5
Change localization diag namespace (#718)
kenji-miyake Jul 30, 2020
cf46256
Support error in autoware state (#728)
kenji-miyake Aug 4, 2020
681da92
Remove override after arrived goal in autoware_state_monitor (#737)
kenji-miyake Aug 5, 2020
7205638
Improve autoware state monitor diag (#792)
kenji-miyake Aug 19, 2020
22801f5
remove ROS1 packages temporarily
mitsudome-r Sep 29, 2020
d08400f
Revert "remove ROS1 packages temporarily"
mitsudome-r Oct 8, 2020
ea2532d
add COLCON_IGNORE to ros1 packages
mitsudome-r Oct 8, 2020
913cb92
Rename launch files to launch.xml (#28)
nnmm Oct 15, 2020
9a73929
[WIP] ROS2 Porting: autoware_state_monitor (#81)
jilaada Nov 24, 2020
047d395
Rename h files to hpp (#142)
nnmm Dec 3, 2020
cc614de
Adjust copyright notice on 532 out of 699 source files (#143)
nnmm Dec 3, 2020
8f50e3c
Use quotes for includes where appropriate (#144)
nnmm Dec 7, 2020
3cec5b3
Run uncrustify on the entire Pilot.Auto codebase (#151)
nnmm Dec 8, 2020
6e59c98
Add linters and fix some clang-tidy warnings (#205)
jilaada Dec 15, 2020
9220977
[autoware_state_monitor] fix parameter in autoware_state_monitor.plan…
mitsudome-r Jan 4, 2021
0cfbf85
Modify autoware state monitor (#288)
k0suke-murakami Jan 20, 2021
e98569d
change engage from bool to control msg (#292)
k0suke-murakami Jan 30, 2021
79eb158
Ros2 v0.8.0 autoware state monitor (#277)
wep21 Feb 4, 2021
f356e55
Ros2 v0.8.0 engage (#342)
wep21 Feb 17, 2021
035ea24
Fix invalid exception handling (#344)
k0suke-murakami Feb 18, 2021
cc7f7ba
Ros2 v0.8.0 fix packages (#351)
tkimura4 Feb 24, 2021
3b1dc66
fix implement miss in autoware_state_monitor
tkimura4 Feb 24, 2021
b6665bd
Rename ROS-related .yaml to .param.yaml (#352)
kenji-miyake Feb 24, 2021
2751aa1
Ros2 v0.8.0 fix packages2 (#354)
tkimura4 Feb 25, 2021
b3c183d
Add parameter args to autoware_state_monitor.launch (#1175) (#385)
mitsudome-r Feb 28, 2021
464da12
Feature/Add route cancel service (#384)
mitsudome-r Mar 2, 2021
b9c91e5
change wait time for state transition (#416)
tkimura4 Mar 10, 2021
6f20f1a
Sensor data qos (#407)
wep21 Mar 11, 2021
902f4c1
Fix typo in system module (#434)
kmiya Mar 17, 2021
d4fa90d
add use_sim-time option (#454)
tkimura4 Mar 26, 2021
966840d
add missing topic to topic config list (#1224)
tkimura4 Apr 1, 2021
7e67171
remove pointcloud from state_monitor (#1236)
tkimura4 Apr 7, 2021
66e30b3
Remove use_sim_time for set_parameter (#1260)
wep21 Apr 26, 2021
a963d2e
Use integrated generic subscription (#1342)
wep21 Jul 22, 2021
9b61488
suppress warnings for autoware_state_monitor (#1722)
h-ohta Jul 28, 2021
c585545
Fix -Wunused-parameter (#1836)
kenji-miyake Aug 14, 2021
06e31b6
Sync v1.3.0 (#1909)
kosuke55 Aug 20, 2021
f065ef3
sync rc (#1930)
tier4-autoware-private-bot[bot] Aug 23, 2021
8c55004
Add autoware api (#1979)
isamu-takagi Aug 31, 2021
77c96ce
suport auto recovery on autoware_state_monitor (#2006)
Sep 3, 2021
05020ec
disable emergency check if hazard_status is not received (#2024)
Sep 3, 2021
fdde06e
suppress warnings for system directory #2046
h-ohta Sep 8, 2021
8a5238c
add sort-package-xml hook in pre-commit (#1881)
KeisukeShima Sep 9, 2021
2bb9386
Added warning about lookupTransform failure in autoware_status_monito…
YoheiMishina Sep 16, 2021
ec40edf
Change formatter to clang-format and black (#2332)
kenji-miyake Nov 2, 2021
e93d7e7
Add COLCON_IGNORE (#500)
kenji-miyake Nov 4, 2021
1cd6325
[autoware state monitor] support autoware.auto msg (#521)
tkimura4 Nov 8, 2021
2ce7a1e
remove VehicleStateReport/VehicleStateCommand/VehicleControlCommand (…
tkimura4 Nov 9, 2021
b321a19
[autowere_web_controller/autoware_state_monitor/emergency_handler]fix…
tkimura4 Nov 11, 2021
b6e9fc0
[autoware_state_monitor]route -> had_map_route (#635)
tkimura4 Nov 15, 2021
e50d7e8
Fix autoware monitors readme (#629)
isamu-takagi Nov 16, 2021
9ae76de
adapt to actuation cmd/status as control msg (#646)
taikitanaka3 Nov 16, 2021
09908c5
Fix topic name in autoware_state_monitor (#667)
rej55 Nov 16, 2021
183ae92
Fix no ground pointcloud topic name (#733)
wep21 Nov 25, 2021
79908c0
fix/rename segmentation namespace (#742)
satoshi-ota Nov 29, 2021
2b6d454
Merge branch 'tier4/proposal' into 1-add-autoware-state-monitor
1222-takeshi Dec 2, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions system/autoware_state_monitor/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
cmake_minimum_required(VERSION 3.5)
project(autoware_state_monitor)

### Compile options
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic -Werror)
endif()

### Dependencies
find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()

# Target
## Set source files
set(AUTOWARE_STATE_MONITOR_SRC
src/autoware_state_monitor_node/autoware_state_monitor_node.cpp
src/autoware_state_monitor_node/state_machine.cpp
src/autoware_state_monitor_node/diagnostics.cpp
)

## Add executables
ament_auto_add_executable(autoware_state_monitor
src/autoware_state_monitor_node/main.cpp
${AUTOWARE_STATE_MONITOR_SRC}
)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

ament_auto_package(INSTALL_TO_SHARE
launch
config
)
46 changes: 46 additions & 0 deletions system/autoware_state_monitor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# autoware_state_monitor

## Purpose

This node manages AutowareState transitions.

## Inner-workings / Algorithms

## Inputs / Outputs

### Input

| Name | Type | Description |
| ---------------------------------- | ---------------------------------------------------- | ------------------------------------------------- |
| `/planning/mission_planning/route` | `autoware_auto_planning_msgs::msg::HADMapRoute` | Subscribe route |
| `/localization/kinematic_state` | `nav_msgs::msg::Odometry` | Used to decide whether vehicle is stopped or not |
| `/vehicle/state_report` | `autoware_auto_vehicle_msgs::msg::ControlModeReport` | Used to check vehicle mode: autonomous or manual. |

### Output

| Name | Type | Description |
| ------------------ | ----------------------------------------------- | -------------------------------------------------- |
| `/autoware/engage` | `autoware_auto_vehicle_msgs::msg::Engage` | publish disengage flag on AutowareState transition |
| `/autoware/state` | `autoware_auto_system_msgs::msg::AutowareState` | publish AutowareState |

## Parameters

### Node Parameters

| Name | Type | Default Value | Explanation |
| ------------- | ---- | ------------- | ---------------------- |
| `update_rate` | int | `10` | Timer callback period. |

### Core Parameters

| Name | Type | Default Value | Explanation |
| ------------------------- | ------ | ------------- | -------------------------------------------------------------------------- |
| `th_arrived_distance_m` | double | 1.0 | threshold distance to check if vehicle has arrived at the route's endpoint |
| `th_stopped_time_sec` | double | 1.0 | threshold time to check if vehicle is stopped |
| `th_stopped_velocity_mps` | double | 0.01 | threshold velocity to check if vehicle is stopped |
| `disengage_on_route` | bool | true | send disengage flag or not when the route is subscribed |
| `disengage_on_goal` | bool | true | send disengage flag or not when the vehicle is arrived goal |

## Assumptions / Known limits

TBD.
155 changes: 155 additions & 0 deletions system/autoware_state_monitor/config/autoware_state_monitor.param.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
# Autoware State Monitor Parameters
/**:
ros__parameters:
# modules_names: string array
module_names: [
"map",
"sensing",
"perception",
"localization",
"planning",
"control",
"vehicle",
"system"
]

# Topic Config
## names: string array
## configs: top level
### names used to declare parameter group
#### module: string
#### timeout[s]: double (0: none)
#### warn_rate[hz]: double (0: none)
topic_configs:
names: [
"/map/vector_map",
"/map/pointcloud_map",
"/perception/obstacle_segmentation/pointcloud",
"/initialpose3d",
"/localization/pose_twist_fusion_filter/pose",
"/perception/object_recognition/objects",
"/planning/mission_planning/route",
"/planning/scenario_planning/trajectory",
"/control/trajectory_follower/control_cmd",
"/control/command/control_cmd",
"/vehicle/status/velocity_status",
"/vehicle/status/steering_status",
"/system/emergency/control_cmd"
]

configs:
/map/vector_map:
module: "map"
timeout: 0.0
warn_rate: 0.0
type: "autoware_auto_mapping_msgs/msg/HADMapBin"
transient_local: True

/map/pointcloud_map:
module: "map"
timeout: 0.0
warn_rate: 0.0
type: "sensor_msgs/msg/PointCloud2"
transient_local: True

/perception/obstacle_segmentation/pointcloud:
module: "sensing"
timeout: 1.0
warn_rate: 5.0
type: "sensor_msgs/msg/PointCloud2"
best_effort: True

/initialpose3d:
module: "localization"
timeout: 0.0
warn_rate: 0.0
type: "geometry_msgs/msg/PoseWithCovarianceStamped"

/localization/pose_twist_fusion_filter/pose:
module: "localization"
timeout: 1.0
warn_rate: 5.0
type: "geometry_msgs/msg/PoseStamped"

# Can be both with feature array or without
# In prediction.launch.xml this is set to without
/perception/object_recognition/objects:
module: "perception"
timeout: 1.0
warn_rate: 5.0
type: "autoware_auto_perception_msgs/msg/PredictedObjects"
# This topic could have two different types depending on the launch flags used.
# The implementation of subscriptions in ROS2 does not allow for multiple types
# to be defined for a topic. By default this is set to not use have features.
# type: ["autoware_perception_msgs/msg/DynamicObjectArray", "autoware_perception_msgs/msg/DynamicObjectWithFeatureArray"]

/planning/mission_planning/route:
module: "planning"
timeout: 0.0
warn_rate: 0.0
type: "autoware_auto_planning_msgs/msg/HADMapRoute"
transient_local: True

/planning/scenario_planning/trajectory:
module: "planning"
timeout: 1.0
warn_rate: 5.0
type: "autoware_auto_planning_msgs/msg/Trajectory"

/control/trajectory_follower/control_cmd:
module: "control"
timeout: 1.0
warn_rate: 5.0
type: "autoware_auto_control_msgs/msg/AckermannControlCommand"

/control/command/control_cmd:
module: "control"
timeout: 1.0
warn_rate: 5.0
type: "autoware_auto_control_msgs/msg/AckermannControlCommand"

/vehicle/status/velocity_status:
module: "vehicle"
timeout: 1.0
warn_rate: 5.0
type: "autoware_auto_vehicle_msgs/msg/VelocityReport"

/vehicle/status/steering_status:
module: "vehicle"
timeout: 1.0
warn_rate: 5.0
type: "autoware_auto_vehicle_msgs/msg/SteeringReport"

/system/emergency/control_cmd:
module: "system"
timeout: 1.0
warn_rate: 5.0
type: "autoware_auto_control_msgs/msg/AckermannControlCommand"

# Param Config
## names: string array
## configs: top level
### names used to declare parameter group
#### module: string
# param_configs:
# names: ["/vehicle_info"]
# configs:
# /vehicle_info:
# module: "vehicle"

# TF Config
## names: string array
## configs: top level
### names used to declare parameter group
#### module: string
#### from: string
#### to: string
#### timeout[s]: double (0: none)
tf_configs:
names: ["map_to_base_link"]
configs:
map_to_base_link:
module: "localization"
from: "map"
to: "base_link"
timeout: 1.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# Autoware State Monitor: Planning Simulator Parameters
/**:
ros__parameters:
# modules_names: string array
module_names: [
"map",
"sensing",
"perception",
"localization",
"planning",
"control",
"vehicle",
"system"
]

# Topic Config
## names: string array
## configs: top level
### names used to declare parameter group
#### module: string
#### timeout[s]: double (0: none)
#### warn_rate[hz]: double (0: none)
topic_configs:
names: [
"/map/vector_map",
"/map/pointcloud_map",
"/perception/object_recognition/objects",
"/initialpose2d",
"/planning/mission_planning/route",
"/planning/scenario_planning/trajectory",
"/control/trajectory_follower/control_cmd",
"/control/command/control_cmd",
"/vehicle/status/velocity_status",
"/vehicle/status/steering_status",
"/system/emergency/control_cmd"
]

configs:
/map/vector_map:
module: "map"
timeout: 0.0
warn_rate: 0.0
type: "autoware_auto_mapping_msgs/msg/HADMapBin"
transient_local: True

/map/pointcloud_map:
module: "map"
timeout: 0.0
warn_rate: 0.0
type: "sensor_msgs/msg/PointCloud2"
transient_local: True

/perception/object_recognition/objects:
module: "perception"
timeout: 1.0
warn_rate: 5.0
type: "autoware_auto_perception_msgs/msg/PredictedObjects"

/initialpose2d:
module: "localization"
timeout: 0.0
warn_rate: 0.0
type: "geometry_msgs/msg/PoseWithCovarianceStamped"

/planning/mission_planning/route:
module: "planning"
timeout: 0.0
warn_rate: 0.0
type: "autoware_auto_planning_msgs/msg/HADMapRoute"
transient_local: True

/planning/scenario_planning/trajectory:
module: "planning"
timeout: 1.0
warn_rate: 5.0
type: "autoware_auto_planning_msgs/msg/Trajectory"

/control/trajectory_follower/control_cmd:
module: "control"
timeout: 1.0
warn_rate: 5.0
type: "autoware_auto_control_msgs/msg/AckermannControlCommand"

/control/command/control_cmd:
module: "control"
timeout: 1.0
warn_rate: 5.0
type: "autoware_auto_control_msgs/msg/AckermannControlCommand"

/vehicle/status/velocity_status:
module: "vehicle"
timeout: 1.0
warn_rate: 5.0
type: "autoware_auto_vehicle_msgs/msg/VelocityReport"

/vehicle/status/steering_status:
module: "vehicle"
timeout: 1.0
warn_rate: 5.0
type: "autoware_auto_vehicle_msgs/msg/SteeringReport"

/system/emergency/control_cmd:
module: "system"
timeout: 1.0
warn_rate: 5.0
type: "autoware_auto_control_msgs/msg/AckermannControlCommand"

# Param Config
## names: string array
## configs: top level
### names used to declare parameter group
#### module: string
# param_configs:
# names: ["/vehicle_info"]
# configs:
# /vehicle_info:
# module: "vehicle"

# TF Config
## names: string array
## configs: top level
### names used to declare parameter group
#### module: string
#### from: string
#### to: string
#### timeout[s]: double (0: none)
tf_configs:
names: ["map_to_base_link"]
configs:
map_to_base_link:
module: "localization"
from: "map"
to: "base_link"
timeout: 1.0
Loading