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!: replace autoware_auto_msgs with autoware_msgs for system modules #7249

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 9 additions & 9 deletions system/component_state_monitor/config/topics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
args:
node_name_suffix: vector_map
topic: /map/vector_map
topic_type: autoware_auto_mapping_msgs/msg/HADMapBin
topic_type: autoware_map_msgs/msg/LaneletMapBin
best_effort: false
transient_local: true
warn_rate: 0.0
Expand Down Expand Up @@ -69,7 +69,7 @@
args:
node_name_suffix: object_recognition_objects
topic: /perception/object_recognition/objects
topic_type: autoware_auto_perception_msgs/msg/PredictedObjects
topic_type: autoware_perception_msgs/msg/PredictedObjects
best_effort: false
transient_local: false
warn_rate: 5.0
Expand All @@ -82,7 +82,7 @@
args:
node_name_suffix: traffic_light_recognition_traffic_signals
topic: /perception/traffic_light_recognition/traffic_signals
topic_type: autoware_perception_msgs/msg/TrafficSignalArray
topic_type: autoware_perception_msgs/msg/TrafficLightGroupArray
best_effort: false
transient_local: false
warn_rate: 5.0
Expand All @@ -108,7 +108,7 @@
args:
node_name_suffix: scenario_planning_trajectory
topic: /planning/scenario_planning/trajectory
topic_type: autoware_auto_planning_msgs/msg/Trajectory
topic_type: autoware_planning_msgs/msg/Trajectory
best_effort: false
transient_local: false
warn_rate: 5.0
Expand All @@ -121,7 +121,7 @@
args:
node_name_suffix: trajectory_follower_control_cmd
topic: /control/trajectory_follower/control_cmd
topic_type: autoware_auto_control_msgs/msg/AckermannControlCommand
topic_type: autoware_control_msgs/msg/Control
best_effort: false
transient_local: false
warn_rate: 5.0
Expand All @@ -134,7 +134,7 @@
args:
node_name_suffix: control_command_control_cmd
topic: /control/command/control_cmd
topic_type: autoware_auto_control_msgs/msg/AckermannControlCommand
topic_type: autoware_control_msgs/msg/Control
best_effort: false
transient_local: false
warn_rate: 5.0
Expand All @@ -147,7 +147,7 @@
args:
node_name_suffix: vehicle_status_velocity_status
topic: /vehicle/status/velocity_status
topic_type: autoware_auto_vehicle_msgs/msg/VelocityReport
topic_type: autoware_vehicle_msgs/msg/VelocityReport
best_effort: false
transient_local: false
warn_rate: 5.0
Expand All @@ -160,7 +160,7 @@
args:
node_name_suffix: vehicle_status_steering_status
topic: /vehicle/status/steering_status
topic_type: autoware_auto_vehicle_msgs/msg/SteeringReport
topic_type: autoware_vehicle_msgs/msg/SteeringReport
best_effort: false
transient_local: false
warn_rate: 5.0
Expand All @@ -173,7 +173,7 @@
args:
node_name_suffix: system_emergency_control_cmd
topic: /system/emergency/control_cmd
topic_type: autoware_auto_control_msgs/msg/AckermannControlCommand
topic_type: autoware_control_msgs/msg/Control
best_effort: false
transient_local: false
warn_rate: 5.0
Expand Down
5 changes: 2 additions & 3 deletions system/default_ad_api/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@
<depend>autoware_ad_api_specs</depend>
<depend>autoware_adapi_v1_msgs</depend>
<depend>autoware_adapi_version_msgs</depend>
<depend>autoware_auto_planning_msgs</depend>
<depend>autoware_auto_system_msgs</depend>
<depend>autoware_auto_vehicle_msgs</depend>
<depend>autoware_planning_msgs</depend>
<depend>autoware_system_msgs</depend>
<depend>autoware_vehicle_msgs</depend>
<depend>component_interface_specs</depend>
<depend>component_interface_utils</depend>
<depend>diagnostic_graph_utils</depend>
Expand Down
4 changes: 2 additions & 2 deletions system/default_ad_api/src/compatibility/autoware_state.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <autoware_ad_api_specs/operation_mode.hpp>
#include <autoware_ad_api_specs/routing.hpp>

#include <autoware_auto_system_msgs/msg/autoware_state.hpp>
#include <autoware_system_msgs/msg/autoware_state.hpp>
#include <std_srvs/srv/trigger.hpp>
#include <tier4_system_msgs/msg/mode_change_available.hpp>

Expand All @@ -44,7 +44,7 @@ class AutowareStateNode : public rclcpp::Node
Sub<autoware_ad_api::routing::RouteState> sub_routing_;
Sub<autoware_ad_api::operation_mode::OperationModeState> sub_operation_mode_;

using AutowareState = autoware_auto_system_msgs::msg::AutowareState;
using AutowareState = autoware_system_msgs::msg::AutowareState;
using LocalizationState = autoware_ad_api::localization::InitializationState::Message;
using RoutingState = autoware_ad_api::routing::RouteState::Message;
using OperationModeState = autoware_ad_api::operation_mode::OperationModeState::Message;
Expand Down
2 changes: 1 addition & 1 deletion system/default_ad_api/src/perception.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ using ObjectClassification = autoware_adapi_v1_msgs::msg::ObjectClassification;
using DynamicObject = autoware_adapi_v1_msgs::msg::DynamicObject;
using DynamicObjectPath = autoware_adapi_v1_msgs::msg::DynamicObjectPath;
using API_Shape = shape_msgs::msg::SolidPrimitive;
using Shape = autoware_auto_perception_msgs::msg::Shape;
using Shape = autoware_perception_msgs::msg::Shape;

std::unordered_map<uint8_t, uint8_t> shape_type_ = {
{Shape::BOUNDING_BOX, API_Shape::BOX},
Expand Down
2 changes: 1 addition & 1 deletion system/default_ad_api/src/perception.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <autoware_adapi_v1_msgs/msg/dynamic_object.hpp>
#include <autoware_adapi_v1_msgs/msg/dynamic_object_path.hpp>
#include <autoware_adapi_v1_msgs/msg/object_classification.hpp>
#include <autoware_auto_perception_msgs/msg/shape.hpp>
#include <autoware_perception_msgs/msg/shape.hpp>
#include <shape_msgs/msg/solid_primitive.hpp>

#include <unordered_map>
Expand Down
30 changes: 15 additions & 15 deletions system/emergency_handler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@ Emergency Handler is a node to select proper MRM from from system failure state

### Input

| Name | Type | Description |
| ----------------------------------------- | ---------------------------------------------------------- | ----------------------------------------------------------------------------- |
| `/system/emergency/hazard_status` | `autoware_auto_system_msgs::msg::HazardStatusStamped` | Used to select proper MRM from system failure state contained in HazardStatus |
| `/control/vehicle_cmd` | `autoware_auto_control_msgs::msg::AckermannControlCommand` | Used as reference when generate Emergency Control Command |
| `/localization/kinematic_state` | `nav_msgs::msg::Odometry` | Used to decide whether vehicle is stopped or not |
| `/vehicle/status/control_mode` | `autoware_auto_vehicle_msgs::msg::ControlModeReport` | Used to check vehicle mode: autonomous or manual |
| `/system/api/mrm/comfortable_stop/status` | `tier4_system_msgs::msg::MrmBehaviorStatus` | Used to check if MRM comfortable stop operation is available |
| `/system/api/mrm/emergency_stop/status` | `tier4_system_msgs::msg::MrmBehaviorStatus` | Used to check if MRM emergency stop operation is available |
| Name | Type | Description |
| ----------------------------------------- | ------------------------------------------------ | ----------------------------------------------------------------------------- |
| `/system/emergency/hazard_status` | `autoware_system_msgs::msg::HazardStatusStamped` | Used to select proper MRM from system failure state contained in HazardStatus |
| `/control/vehicle_cmd` | `autoware_control_msgs::msg::Control` | Used as reference when generate Emergency Control Command |
| `/localization/kinematic_state` | `nav_msgs::msg::Odometry` | Used to decide whether vehicle is stopped or not |
| `/vehicle/status/control_mode` | `autoware_vehicle_msgs::msg::ControlModeReport` | Used to check vehicle mode: autonomous or manual |
| `/system/api/mrm/comfortable_stop/status` | `tier4_system_msgs::msg::MrmBehaviorStatus` | Used to check if MRM comfortable stop operation is available |
| `/system/api/mrm/emergency_stop/status` | `tier4_system_msgs::msg::MrmBehaviorStatus` | Used to check if MRM emergency stop operation is available |

### Output

| Name | Type | Description |
| ------------------------------------------ | ------------------------------------------------------ | ----------------------------------------------------- |
| `/system/emergency/shift_cmd` | `autoware_auto_vehicle_msgs::msg::GearCommand` | Required to execute proper MRM (send gear cmd) |
| `/system/emergency/hazard_cmd` | `autoware_auto_vehicle_msgs::msg::HazardLightsCommand` | Required to execute proper MRM (send turn signal cmd) |
| `/api/fail_safe/mrm_state` | `autoware_adapi_v1_msgs::msg::MrmState` | Inform MRM execution state and selected MRM behavior |
| `/system/api/mrm/comfortable_stop/operate` | `tier4_system_msgs::srv::OperateMrm` | Execution order for MRM comfortable stop |
| `/system/api/mrm/emergency_stop/operate` | `tier4_system_msgs::srv::OperateMrm` | Execution order for MRM emergency stop |
| Name | Type | Description |
| ------------------------------------------ | ------------------------------------------------- | ----------------------------------------------------- |
| `/system/emergency/shift_cmd` | `autoware_vehicle_msgs::msg::GearCommand` | Required to execute proper MRM (send gear cmd) |
| `/system/emergency/hazard_cmd` | `autoware_vehicle_msgs::msg::HazardLightsCommand` | Required to execute proper MRM (send turn signal cmd) |
| `/api/fail_safe/mrm_state` | `autoware_adapi_v1_msgs::msg::MrmState` | Inform MRM execution state and selected MRM behavior |
| `/system/api/mrm/comfortable_stop/operate` | `tier4_system_msgs::srv::OperateMrm` | Execution order for MRM comfortable stop |
| `/system/api/mrm/emergency_stop/operate` | `tier4_system_msgs::srv::OperateMrm` | Execution order for MRM emergency stop |

## Parameters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@

// Autoware
#include <autoware_adapi_v1_msgs/msg/mrm_state.hpp>
#include <autoware_auto_control_msgs/msg/ackermann_control_command.hpp>
#include <autoware_auto_system_msgs/msg/hazard_status_stamped.hpp>
#include <autoware_auto_vehicle_msgs/msg/control_mode_report.hpp>
#include <autoware_auto_vehicle_msgs/msg/gear_command.hpp>
#include <autoware_auto_vehicle_msgs/msg/hazard_lights_command.hpp>
#include <autoware_control_msgs/msg/control.hpp>
#include <autoware_system_msgs/msg/hazard_status_stamped.hpp>
#include <autoware_vehicle_msgs/msg/control_mode_report.hpp>
#include <autoware_vehicle_msgs/msg/gear_command.hpp>
#include <autoware_vehicle_msgs/msg/hazard_lights_command.hpp>
#include <tier4_system_msgs/msg/mrm_behavior_status.hpp>
#include <tier4_system_msgs/srv/operate_mrm.hpp>

Expand Down Expand Up @@ -57,48 +57,43 @@ class EmergencyHandler : public rclcpp::Node

private:
// Subscribers
rclcpp::Subscription<autoware_auto_system_msgs::msg::HazardStatusStamped>::SharedPtr
rclcpp::Subscription<autoware_system_msgs::msg::HazardStatusStamped>::SharedPtr
sub_hazard_status_stamped_;
rclcpp::Subscription<autoware_auto_control_msgs::msg::AckermannControlCommand>::SharedPtr
sub_prev_control_command_;
rclcpp::Subscription<autoware_control_msgs::msg::Control>::SharedPtr sub_prev_control_command_;
rclcpp::Subscription<nav_msgs::msg::Odometry>::SharedPtr sub_odom_;
rclcpp::Subscription<autoware_auto_vehicle_msgs::msg::ControlModeReport>::SharedPtr
sub_control_mode_;
rclcpp::Subscription<autoware_vehicle_msgs::msg::ControlModeReport>::SharedPtr sub_control_mode_;
rclcpp::Subscription<tier4_system_msgs::msg::MrmBehaviorStatus>::SharedPtr
sub_mrm_comfortable_stop_status_;
rclcpp::Subscription<tier4_system_msgs::msg::MrmBehaviorStatus>::SharedPtr
sub_mrm_emergency_stop_status_;

autoware_auto_system_msgs::msg::HazardStatusStamped::ConstSharedPtr hazard_status_stamped_;
autoware_auto_control_msgs::msg::AckermannControlCommand::ConstSharedPtr prev_control_command_;
autoware_system_msgs::msg::HazardStatusStamped::ConstSharedPtr hazard_status_stamped_;
autoware_control_msgs::msg::Control::ConstSharedPtr prev_control_command_;
nav_msgs::msg::Odometry::ConstSharedPtr odom_;
autoware_auto_vehicle_msgs::msg::ControlModeReport::ConstSharedPtr control_mode_;
autoware_vehicle_msgs::msg::ControlModeReport::ConstSharedPtr control_mode_;
tier4_system_msgs::msg::MrmBehaviorStatus::ConstSharedPtr mrm_comfortable_stop_status_;
tier4_system_msgs::msg::MrmBehaviorStatus::ConstSharedPtr mrm_emergency_stop_status_;

void onHazardStatusStamped(
const autoware_auto_system_msgs::msg::HazardStatusStamped::ConstSharedPtr msg);
void onPrevControlCommand(
const autoware_auto_control_msgs::msg::AckermannControlCommand::ConstSharedPtr msg);
const autoware_system_msgs::msg::HazardStatusStamped::ConstSharedPtr msg);
void onPrevControlCommand(const autoware_control_msgs::msg::Control::ConstSharedPtr msg);
void onOdometry(const nav_msgs::msg::Odometry::ConstSharedPtr msg);
void onControlMode(const autoware_auto_vehicle_msgs::msg::ControlModeReport::ConstSharedPtr msg);
void onControlMode(const autoware_vehicle_msgs::msg::ControlModeReport::ConstSharedPtr msg);
void onMrmComfortableStopStatus(
const tier4_system_msgs::msg::MrmBehaviorStatus::ConstSharedPtr msg);
void onMrmEmergencyStopStatus(
const tier4_system_msgs::msg::MrmBehaviorStatus::ConstSharedPtr msg);

// Publisher
rclcpp::Publisher<autoware_auto_control_msgs::msg::AckermannControlCommand>::SharedPtr
pub_control_command_;
rclcpp::Publisher<autoware_control_msgs::msg::Control>::SharedPtr pub_control_command_;

// rclcpp::Publisher<tier4_vehicle_msgs::msg::ShiftStamped>::SharedPtr pub_shift_;
// rclcpp::Publisher<tier4_vehicle_msgs::msg::TurnSignal>::SharedPtr pub_turn_signal_;
rclcpp::Publisher<autoware_auto_vehicle_msgs::msg::HazardLightsCommand>::SharedPtr
pub_hazard_cmd_;
rclcpp::Publisher<autoware_auto_vehicle_msgs::msg::GearCommand>::SharedPtr pub_gear_cmd_;
rclcpp::Publisher<autoware_vehicle_msgs::msg::HazardLightsCommand>::SharedPtr pub_hazard_cmd_;
rclcpp::Publisher<autoware_vehicle_msgs::msg::GearCommand>::SharedPtr pub_gear_cmd_;

autoware_auto_vehicle_msgs::msg::HazardLightsCommand createHazardCmdMsg();
autoware_auto_vehicle_msgs::msg::GearCommand createGearCmdMsg();
autoware_vehicle_msgs::msg::HazardLightsCommand createHazardCmdMsg();
autoware_vehicle_msgs::msg::GearCommand createGearCmdMsg();
void publishControlCommands();

rclcpp::Publisher<autoware_adapi_v1_msgs::msg::MrmState>::SharedPtr pub_mrm_state_;
Expand Down
6 changes: 3 additions & 3 deletions system/emergency_handler/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<buildtool_depend>autoware_cmake</buildtool_depend>

<depend>autoware_adapi_v1_msgs</depend>
<depend>autoware_auto_control_msgs</depend>
<depend>autoware_auto_system_msgs</depend>
<depend>autoware_auto_vehicle_msgs</depend>
<depend>autoware_control_msgs</depend>
<depend>autoware_system_msgs</depend>
<depend>autoware_vehicle_msgs</depend>
<depend>nav_msgs</depend>
<depend>rclcpp</depend>
<depend>rclcpp_components</depend>
Expand Down
Loading
Loading