diff --git a/awapi/awapi_awiv_adapter/CMakeLists.txt b/awapi/awapi_awiv_adapter/CMakeLists.txt deleted file mode 100644 index 2f6171b969440..0000000000000 --- a/awapi/awapi_awiv_adapter/CMakeLists.txt +++ /dev/null @@ -1,35 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(awapi_awiv_adapter) - -if(NOT CMAKE_CXX_STANDARD) - set(CMAKE_CXX_STANDARD 17) - 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() - -find_package(ament_cmake_auto REQUIRED) -ament_auto_find_build_dependencies() - -ament_auto_add_executable(awapi_awiv_adapter - src/awapi_awiv_adapter_node.cpp - src/awapi_awiv_adapter_core.cpp - src/awapi_vehicle_state_publisher.cpp - src/awapi_autoware_state_publisher.cpp - src/awapi_stop_reason_aggregator.cpp - src/awapi_v2x_aggregator.cpp - src/awapi_lane_change_state_publisher.cpp - src/awapi_obstacle_avoidance_state_publisher.cpp - src/awapi_max_velocity_publisher.cpp - src/awapi_autoware_util.cpp - src/awapi_pacmod_util.cpp -) - -if(BUILD_TESTING) - find_package(ament_lint_auto REQUIRED) - ament_lint_auto_find_test_dependencies() -endif() - -ament_auto_package(INSTALL_TO_SHARE launch) diff --git a/awapi/awapi_awiv_adapter/Readme.md b/awapi/awapi_awiv_adapter/Readme.md deleted file mode 100644 index b762812173e22..0000000000000 --- a/awapi/awapi_awiv_adapter/Readme.md +++ /dev/null @@ -1,299 +0,0 @@ -# awapi_awiv_adapter - -✓: confirmed, (blank): not confirmed - -## get topic - -### /awapi/vehicle/get/status - -- get vehicle status -- MessageType: awapi_awiv_adapter/AwapiVehicleStatus - -| ✓ | type | name | unit | note | -| --- | :----------------------- | :----------------------- | :----------------------------------------- | :--------------------------------------- | -| ✓ | std_msgs/Header | header | | | -| ✓ | geometry_msgs/Pose | pose | position:[m] | | -| ✓ | awapi_awiv_adapter/Euler | eulerangle | [rad] | roll/pitch/yaw | -| | geographic_msgs/GeoPoint | geo_point | | lat/lon/alt | -| ✓ | float64 | velocity | [m/s] | | -| ✓ | float64 | acceleration | [m/ss] | calculate from velocity in awapi_adapter | -| ✓ | float64 | steering | [rad] | | -| ✓ | float64 | steering_velocity | [rad/s] | calculate from steering in awapi_adapter | -| ✓ | float64 | angular_velocity | [rad/s] | | -| | int32 | gear | according to tier4_vehicle_msgs/Shift | | -| | float32 | energy_level | | available only for golf-cart | -| ✓ | int32 | turn_signal | according to tier4_vehicle_msgs/TurnSignal | | -| ✓ | float64 | target_velocity | [m/s] | | -| ✓ | float64 | target_acceleration | [m/ss] | | -| ✓ | float64 | target_steering | [rad] | | -| ✓ | float64 | target_steering_velocity | [rad/s] | | - -### /awapi/autoware/get/status - -- get autoware status -- MessageType: awapi_awiv_adapter/AwapiVehicleStatus - -| ✓ | type | name | unit | note | -| --- | :---------------------------------- | :------------------- | :------------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| ✓ | std_msgs/Header | header | | | -| ✓ | string | autoware_state | | | -| ✓ | int32 | control_mode | according to tier4_vehicle_msgs/ControlMode | manual/auto (changed by /awapi/autoware/put/engage) | -| | int32 | gate_mode | tier4_vehicle_msgs/GateMode | auto/remote (it is valid only when control_mode=auto)) | -| ✓ | bool | emergency_stopped | True in emergency mode | | -| ✓ | float32 | current_max_velocity | [m/s] | | -| | tier4_system_msgs/HazardStatus | hazard_status | | system hazard status | -| ✓ | tier4_planning_msgs/StopReasonArray | stop_reason | | "stop_pose" represents the position of "base_link" (not the head of the car) | -| ✓ | diagnostic_msgs/DiagnosticStatus[] | diagnostics | | output only diag. of leaf node (diag. of parent node are cut) | -| ✓ | diagnostic_msgs/DiagnosticStatus[] | error_diagnostics | | diagnostics that are the cause of system emergency | -| ✓ | bool | arrived_goal | | True if the autoware_state is changed from Driving to ArrivedGoal or WaitingForRoute. False if the autoware_state is changed to WaitingForEngage or Driving. Default False. | - -- specification of stop_reason - - stop_reason is output only when the following conditions are met. - - stop_point in stop_reason is close to /planning/scenario_planning/trajectory (within 10m). - - The distance between current position and stop_point is less than stop_reason_thresh_dist. - -### /awapi/autoware/get/route - -- get route -- MessageType: tier4_planning_msgs/Route - -| ✓ | type | name | unit | note | -| --- | :------------------------ | :--- | :--- | :--- | -| ✓ | tier4_planning_msgs/Route | | | | - -### /awapi/autoware/get/stop_speed_exceeded - -- get flag of exceeding stop speed or not - - True: exceed the stop speed ( = "cannot stop before the stop line") - - False: not exceed the stop speed ( = "no stop line in the trajectory" or "possible to stop before the stop line" ) -- MessageType: tier4_planning_msgs/StopSpeedExceedStatus - -| ✓ | type | name | unit | note | -| --- | :---------------------------------------- | :--- | :--- | :--- | -| | tier4_planning_msgs/StopSpeedExceedStatus | | - | | - -### /awapi/prediction/get/objects - -- get predicted object -- MessageType: tier4_api_msgs/DynamicObjectArray - -| ✓ | type | name | unit | note | -| --- | :-------------------------------- | :--- | :--- | :--- | -| ✓ | tier4_api_msgs/DynamicObjectArray | | | | - -### /awapi/lane_change/get/status - -- get lane change information -- MessageType: awapi_awiv_adapter/LaneChangeStatus - -| ✓ | type | name | unit | note | -| --- | :----------------------- | :-------------------------- | :------------------------------------ | :--------------------------------------------------------------------------------- | -| | std_msgs/Header | header | | | -| | bool | force_lane_change_available | True when lane change is available | available: Physically lane changeable state (do not consider other vehicle) | -| | bool | lane_change_ready | True when lane change is ready | ready: State that ego-vehicle can change lane without collision with other vehicle | -| | tier4_planning_msgs/Path | candidate_path | according to tier4_planning_msgs/Path | | - -### /awapi/object_avoidance/get/status - -- get obstacle avoidance information -- MessageType: awapi_awiv_adapter/ObstacleAvoidanceStatus - -| ✓ | type | name | unit | note | -| --- | :----------------------------- | :----------------------- | :------------------------------------------ | :---------------------------------------------------- | -| | std_msgs/Header | header | | | -| | bool | obstacle_avoidance_ready | True when obstacle avoidance is ready | | -| | tier4_planning_msgs/Trajectory | candidate_path | according to tier4_planning_msgs/Trajectory | Msg type is different from lane change candidate path | - -### /awapi/traffic_light/get/traffic_signals - -- get recognition result of traffic light -- MessageType: autoware_auto_perception_msgs/msg/TrafficSignalArray - -| ✓ | type | name | unit | note | -| --- | :--------------------------------------------------- | :--- | :--- | :--- | -| | autoware_auto_perception_msgs/msg/TrafficSignalArray | | | | - -### /awapi/traffic_light/get/nearest_traffic_signal - -- get recognition result of nearest traffic light -- MessageType: autoware_auto_perception_msgs/LookingTrafficSignal - -| | type | name | unit | note | -| --- | :--------------------------------------------------- | :--------- | :--- | :------------------------------------------------------------ | -| | std_msgs/Header | header | | | -| | autoware_auto_perception_msgs/TrafficSignalWithJudge | perception | | traffic light information from autoware perception module | -| | autoware_auto_perception_msgs/TrafficSignalWithJudge | external | | traffic light information from external tool/module | -| | autoware_auto_perception_msgs/TrafficSignalWithJudge | final | | traffic light information used by the planning module finally | - -- The contents of TrafficSignalWithJudge.msg is following. - -| | type | name | unit | note | -| --- | :------------------------------------------ | :----- | :------------------- | :------------------------------------------------------------- | -| | autoware_auto_perception_msgs/TrafficSignal | signal | | traffic light color/arrow | -| | uint8 | judge | 0:NONE, 1:STOP, 2:GO | go/stop judgment based on the color/arrow of the traffic light | - -### /awapi/vehicle/get/door - -- get door status -- MessageType: tier4_api_msgs/DoorStatus.msg - -| ✓ | type | name | unit | note | -| --- | :------------------------ | :----- | :--------------------------------------------------------------------------------------- | :------------------------------------------ | -| | tier4_api_msgs/DoorStatus | status | 0:UNKNOWN, 1:DOOR_OPENED, 2:DOOR_CLOSED 3:DOOR_OPENING, 4:DOOR_CLOSING, 5:NOT_APPLICABLE | available only for the vehicle using pacmod | - -- Now, available status is following: (0:UNKNOWN, 1:DOOR_OPENED, 2:DOOR_CLOSED, 5:NOT_APPLICABLE ). -- 5 (NOT_APPLICABLE) is published if the pacmod is not used -- Due to the specifications of pacmod, the last door open / close command is published as the status. -- The status is 0 (UNKNOWN) until the door open / close command is published once. - -## put topic - -### /awapi/vehicle/put/velocity - -- set upper velocity -- MessageType: tier4_api_msgs/VelocityLimit - -| ✓ | type | name | unit | note | -| --- | :--------------------------- | :--- | :--- | :----------- | -| ✓ | tier4_api_msgs/VelocityLimit | | | max velocity | - -### /awapi/vehicle/put/stop - -- set temporary stop signal -- MessageType: tier4_api_msgs/StopCommand -- Specification - - - send True: send upper velocity to 0 - - send False: resend last received upper velocity - - (if upper velocity have never received, send _default_max_velocity_ value.) - - _default_max_velocity_ refers to the param: _/planning/scenario_planning/motion_velocity_optimizer/max_velocity_ - - | ✓ | type | name | unit | note | - | --- | :------------------------- | :--- | :--- | :--- | - | ✓ | tier4_api_msgs/StopCommand | | | | - -### /awapi/autoware/put/gate_mode - -- send gate mode (auto/remote) -- MessageType: tier4_control_msgs/GateMode - -| ✓ | type | name | unit | note | -| --- | :-------------------------- | :--- | :--- | :--- | -| | tier4_control_msgs/GateMode | | | | - -### /awapi/autoware/put/engage - -- send engage signal (both of autoware/engage and vehicle/engage) -- MessageType: tier4_vehicle_msgs/Engage - -| ✓ | type | name | unit | note | -| --- | :------------------------ | :--- | :--- | :--- | -| ✓ | tier4_vehicle_msgs/Engage | | | | - -### /awapi/autoware/put/goal - -- send goal pose -- MessageType: geometry_msgs/PoseStamped - -| ✓ | type | name | unit | note | -| --- | :------------------------ | :--- | :--- | :--- | -| | geometry_msgs/PoseStamped | | | | - -### /awapi/autoware/put/route - -- send route -- MessageType: tier4_planning_msgs/Route - -| ✓ | type | name | unit | note | -| --- | :------------------------ | :--- | :--- | :--- | -| ✓ | tier4_planning_msgs/Route | | | | - -### /awapi/lane_change/put/approval - -- send lane change approval flag -- send True: start lane change when **lane_change_ready** is true -- MessageType: tier4_planning_msgs/LaneChangeCommand - -| ✓ | type | name | unit | note | -| --- | :---------------------------------------- | :--- | :--- | :--- | -| | tier4_planning_msgs/msg/LaneChangeCommand | | | | - -### /awapi/lane_change/put/force - -- send force lane change flag -- send True: start lane change when **force_lane_change_available** is true -- MessageType: tier4_planning_msgs/LaneChangeCommand - -| ✓ | type | name | unit | note | -| --- | :------------------------------------ | :--- | :--- | :--- | -| | tier4_planning_msgs/LaneChangeCommand | | | | - -### /awapi/object_avoidance/put/approval - -- send object avoidance approval flag -- MessageType: tier4_planning_msgs/EnableAvoidance - -| ✓ | type | name | unit | note | -| --- | :---------------------------------- | :--- | :--- | :--- | -| | tier4_planning_msgs/EnableAvoidance | | | | - -### /awapi/object_avoidance/put/force - -- send force object avoidance flag -- **not implemented (Autoware does not have corresponded topic)** - -| ✓ | type | name | unit | note | -| --- | :--- | :--- | :--- | :--- | - -### /awapi/traffic_light/put/traffic_signals - -- Overwrite the recognition result of traffic light -- MessageType: autoware_auto_perception_msgs/TrafficSignalArray - -| ✓ | type | name | unit | note | -| --- | :----------------------------------------------- | :--- | :--- | :--- | -| | autoware_auto_perception_msgs/TrafficSignalArray | | | | - -### /awapi/vehicle/put/door - -- send door command -- MessageType: tier4_api_msgs/DoorCommand - - send True: open door - - send False: close door - -| ✓ | type | name | unit | note | -| --- | :------------------------- | :--- | :--- | :------------------------------------------ | -| | tier4_api_msgs/DoorCommand | | | available only for the vehicle using pacmod | - -### /awapi/autoware/put/crosswalk_states - -- send crosswalk status - - forcibly rewrite the internal state of crosswalk module -- MessageType: tier4_api_msgs/CrossWalkStatus - -| ✓ | type | name | unit | note | -| --- | :-------------- | :----- | :----------------------- | :--- | -| | std_msgs/Header | header | | | -| | int32 | status | 0:STOP, 1:GO, 2:SLOWDOWN | | - -### /awapi/autoware/put/intersection_states - -- send intersection status - - forcibly rewrite the internal state of intersection module -- MessageType: tier4_api_msgs/CrosswalkStatus - -| ✓ | type | name | unit | note | -| --- | :-------------- | :----- | :----------- | :--- | -| | std_msgs/Header | header | | | -| | int32 | status | 0:STOP, 1:GO | | - -### /awapi/autoware/put/expand_stop_range - -- send expand range of the polygon used by obstacle stop [m] -- MessageType: tier4_planning_msgs/ExpandStopRange - -| ✓ | type | name | unit | note | -| --- | :---------------------------------- | :--- | :--- | :--- | -| | tier4_planning_msgs/ExpandStopRange | | | | - ---- diff --git a/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_autoware_state_publisher.hpp b/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_autoware_state_publisher.hpp deleted file mode 100644 index 7352e43433276..0000000000000 --- a/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_autoware_state_publisher.hpp +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2020 Tier IV, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef AWAPI_AWIV_ADAPTER__AWAPI_AUTOWARE_STATE_PUBLISHER_HPP_ -#define AWAPI_AWIV_ADAPTER__AWAPI_AUTOWARE_STATE_PUBLISHER_HPP_ - -#include "awapi_awiv_adapter/awapi_autoware_util.hpp" - -#include - -#include - -#include -#include -#include - -namespace autoware_api -{ -class AutowareIvAutowareStatePublisher -{ -public: - explicit AutowareIvAutowareStatePublisher(rclcpp::Node & node); - void statePublisher(const AutowareInfo & aw_info); - -private: - rclcpp::Logger logger_; - rclcpp::Clock::SharedPtr clock_; - // publisher - rclcpp::Publisher::SharedPtr pub_state_; - - // parameter - - /* parameter for judging goal now */ - bool arrived_goal_; - autoware_auto_system_msgs::msg::AutowareState::_state_type prev_state_; - - void getAutowareStateInfo( - const autoware_auto_system_msgs::msg::AutowareState::ConstSharedPtr & autoware_state_ptr, - tier4_api_msgs::msg::AwapiAutowareStatus * status); - void getControlModeInfo( - const autoware_auto_vehicle_msgs::msg::ControlModeReport::ConstSharedPtr & control_mode_ptr, - tier4_api_msgs::msg::AwapiAutowareStatus * status); - void getGateModeInfo( - const tier4_control_msgs::msg::GateMode::ConstSharedPtr & gate_mode_ptr, - tier4_api_msgs::msg::AwapiAutowareStatus * status); - void getEmergencyStateInfo( - const autoware_auto_system_msgs::msg::EmergencyState::ConstSharedPtr & emergency_state_ptr, - tier4_api_msgs::msg::AwapiAutowareStatus * status); - void getCurrentMaxVelInfo( - const tier4_planning_msgs::msg::VelocityLimit::ConstSharedPtr & current_max_velocity_ptr, - tier4_api_msgs::msg::AwapiAutowareStatus * status); - void getHazardStatusInfo( - const AutowareInfo & aw_info, tier4_api_msgs::msg::AwapiAutowareStatus * status); - void getStopReasonInfo( - const tier4_planning_msgs::msg::StopReasonArray::ConstSharedPtr & stop_reason_ptr, - tier4_api_msgs::msg::AwapiAutowareStatus * status); - void getDiagInfo(const AutowareInfo & aw_info, tier4_api_msgs::msg::AwapiAutowareStatus * status); - void getErrorDiagInfo( - const AutowareInfo & aw_info, tier4_api_msgs::msg::AwapiAutowareStatus * status); - void getGlobalRptInfo( - const pacmod3_msgs::msg::GlobalRpt::ConstSharedPtr & global_rpt_ptr, - tier4_api_msgs::msg::AwapiAutowareStatus * status); - - bool isGoal(const autoware_auto_system_msgs::msg::AutowareState::ConstSharedPtr & autoware_state); -}; - -} // namespace autoware_api - -#endif // AWAPI_AWIV_ADAPTER__AWAPI_AUTOWARE_STATE_PUBLISHER_HPP_ diff --git a/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_autoware_util.hpp b/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_autoware_util.hpp deleted file mode 100644 index bacca29abfa15..0000000000000 --- a/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_autoware_util.hpp +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright 2020 Tier IV, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef AWAPI_AWIV_ADAPTER__AWAPI_AUTOWARE_UTIL_HPP_ -#define AWAPI_AWIV_ADAPTER__AWAPI_AUTOWARE_UTIL_HPP_ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -namespace autoware_api -{ -struct AutowareInfo -{ - std::shared_ptr current_pose_ptr; - autoware_auto_vehicle_msgs::msg::SteeringReport::ConstSharedPtr steer_ptr; - autoware_auto_control_msgs::msg::AckermannControlCommand::ConstSharedPtr vehicle_cmd_ptr; - autoware_auto_vehicle_msgs::msg::TurnIndicatorsReport::ConstSharedPtr turn_indicators_ptr; - autoware_auto_vehicle_msgs::msg::HazardLightsReport::ConstSharedPtr hazard_lights_ptr; - nav_msgs::msg::Odometry::ConstSharedPtr odometry_ptr; - autoware_auto_vehicle_msgs::msg::GearReport::ConstSharedPtr gear_ptr; - tier4_vehicle_msgs::msg::BatteryStatus::ConstSharedPtr battery_ptr; - sensor_msgs::msg::NavSatFix::ConstSharedPtr nav_sat_ptr; - autoware_auto_system_msgs::msg::AutowareState::ConstSharedPtr autoware_state_ptr; - autoware_auto_vehicle_msgs::msg::ControlModeReport::ConstSharedPtr control_mode_ptr; - tier4_control_msgs::msg::GateMode::ConstSharedPtr gate_mode_ptr; - autoware_auto_system_msgs::msg::EmergencyState::ConstSharedPtr emergency_state_ptr; - autoware_auto_system_msgs::msg::HazardStatusStamped::ConstSharedPtr hazard_status_ptr; - tier4_planning_msgs::msg::StopReasonArray::ConstSharedPtr stop_reason_ptr; - tier4_v2x_msgs::msg::InfrastructureCommandArray::ConstSharedPtr v2x_command_ptr; - tier4_v2x_msgs::msg::VirtualTrafficLightStateArray::ConstSharedPtr v2x_state_ptr; - diagnostic_msgs::msg::DiagnosticArray::ConstSharedPtr diagnostic_ptr; - pacmod3_msgs::msg::GlobalRpt::ConstSharedPtr global_rpt_ptr; - tier4_planning_msgs::msg::LaneChangeStatus::ConstSharedPtr lane_change_available_ptr; - tier4_planning_msgs::msg::LaneChangeStatus::ConstSharedPtr lane_change_ready_ptr; - autoware_auto_planning_msgs::msg::Path::ConstSharedPtr lane_change_candidate_ptr; - tier4_planning_msgs::msg::IsAvoidancePossible::ConstSharedPtr obstacle_avoid_ready_ptr; - autoware_auto_planning_msgs::msg::Trajectory::ConstSharedPtr obstacle_avoid_candidate_ptr; - tier4_api_msgs::msg::VelocityLimit::ConstSharedPtr max_velocity_ptr; - tier4_planning_msgs::msg::VelocityLimit::ConstSharedPtr current_max_velocity_ptr; - tier4_api_msgs::msg::StopCommand::ConstSharedPtr temporary_stop_ptr; - autoware_auto_planning_msgs::msg::Trajectory::ConstSharedPtr autoware_planning_traj_ptr; - pacmod3_msgs::msg::SystemRptInt::ConstSharedPtr door_state_ptr; -}; - -template -T waitForParam( - rclcpp::Node * node, const std::string & remote_node_name, const std::string & param_name) -{ - std::chrono::seconds sec(1); - - auto param_client = std::make_shared(node, remote_node_name); - - while (!param_client->wait_for_service(sec)) { - if (!rclcpp::ok()) { - RCLCPP_ERROR(node->get_logger(), "Interrupted while waiting for the service."); - return {}; - } - RCLCPP_INFO_THROTTLE( - node->get_logger(), *node->get_clock(), 1000 /* ms */, "waiting for node: %s, param: %s\n", - remote_node_name.c_str(), param_name.c_str()); - } - - if (param_client->has_parameter(param_name)) { - return param_client->get_parameter(param_name); - } - - return {}; -} - -double lowpass_filter(const double current_value, const double prev_value, const double gain); - -namespace planning_util -{ -bool calcClosestIndex( - const autoware_auto_planning_msgs::msg::Trajectory & traj, const geometry_msgs::msg::Pose & pose, - size_t & output_closest_idx, const double dist_thr = 10.0, const double angle_thr = M_PI / 2.0); - -inline geometry_msgs::msg::Pose getPose( - const autoware_auto_planning_msgs::msg::Trajectory & traj, const int idx) -{ - return traj.points.at(idx).pose; -} - -inline double calcDist2d(const geometry_msgs::msg::Point & a, const geometry_msgs::msg::Point & b) -{ - return std::hypot((a.x - b.x), (a.y - b.y)); -} - -double normalizeEulerAngle(double euler); - -double calcArcLengthFromWayPoint( - const autoware_auto_planning_msgs::msg::Trajectory & input_path, const size_t src_idx, - const size_t dst_idx); - -double calcDistanceAlongTrajectory( - const autoware_auto_planning_msgs::msg::Trajectory & trajectory, - const geometry_msgs::msg::Pose & current_pose, const geometry_msgs::msg::Pose & target_pose); - -} // namespace planning_util - -} // namespace autoware_api - -#endif // AWAPI_AWIV_ADAPTER__AWAPI_AUTOWARE_UTIL_HPP_ diff --git a/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_awiv_adapter_core.hpp b/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_awiv_adapter_core.hpp deleted file mode 100644 index 61d92f635e33e..0000000000000 --- a/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_awiv_adapter_core.hpp +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright 2020 Tier IV, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef AWAPI_AWIV_ADAPTER__AWAPI_AWIV_ADAPTER_CORE_HPP_ -#define AWAPI_AWIV_ADAPTER__AWAPI_AWIV_ADAPTER_CORE_HPP_ - -#include "awapi_awiv_adapter/awapi_autoware_state_publisher.hpp" -#include "awapi_awiv_adapter/awapi_autoware_util.hpp" -#include "awapi_awiv_adapter/awapi_lane_change_state_publisher.hpp" -#include "awapi_awiv_adapter/awapi_max_velocity_publisher.hpp" -#include "awapi_awiv_adapter/awapi_obstacle_avoidance_state_publisher.hpp" -#include "awapi_awiv_adapter/awapi_pacmod_util.hpp" -#include "awapi_awiv_adapter/awapi_stop_reason_aggregator.hpp" -#include "awapi_awiv_adapter/awapi_v2x_aggregator.hpp" -#include "awapi_awiv_adapter/awapi_vehicle_state_publisher.hpp" - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include - -namespace autoware_api -{ -class AutowareIvAdapter : public rclcpp::Node -{ -public: - AutowareIvAdapter(); - -private: - // subscriber - rclcpp::Subscription::SharedPtr sub_steer_; - rclcpp::Subscription::SharedPtr - sub_vehicle_cmd_; - rclcpp::Subscription::SharedPtr - sub_turn_indicators_; - rclcpp::Subscription::SharedPtr - sub_hazard_lights_; - rclcpp::Subscription::SharedPtr sub_odometry_; - rclcpp::Subscription::SharedPtr sub_gear_; - rclcpp::Subscription::SharedPtr sub_battery_; - rclcpp::Subscription::SharedPtr sub_nav_sat_; - rclcpp::Subscription::SharedPtr - sub_autoware_state_; - rclcpp::Subscription::SharedPtr - sub_control_mode_; - rclcpp::Subscription::SharedPtr sub_gate_mode_; - rclcpp::Subscription::SharedPtr sub_emergency_; - rclcpp::Subscription::SharedPtr - sub_hazard_status_; - rclcpp::Subscription::SharedPtr sub_stop_reason_; - rclcpp::Subscription::SharedPtr sub_v2x_command_; - rclcpp::Subscription::SharedPtr - sub_v2x_state_; - rclcpp::Subscription::SharedPtr sub_diagnostics_; - rclcpp::Subscription::SharedPtr sub_global_rpt_; - rclcpp::Subscription::SharedPtr - sub_lane_change_available_; - rclcpp::Subscription::SharedPtr - sub_lane_change_ready_; - rclcpp::Subscription::SharedPtr - sub_lane_change_candidate_; - rclcpp::Subscription::SharedPtr - sub_obstacle_avoid_ready_; - rclcpp::Subscription::SharedPtr - sub_obstacle_avoid_candidate_; - rclcpp::Subscription::SharedPtr sub_max_velocity_; - rclcpp::Subscription::SharedPtr - sub_current_max_velocity_; - rclcpp::Subscription::SharedPtr sub_temporary_stop_; - rclcpp::Subscription::SharedPtr sub_autoware_traj_; - rclcpp::Subscription::SharedPtr sub_door_control_; - rclcpp::Subscription::SharedPtr sub_door_status_; - - // publisher - rclcpp::Publisher::SharedPtr pub_door_control_; - rclcpp::Publisher::SharedPtr pub_door_status_; - rclcpp::Publisher::SharedPtr pub_v2x_command_; - rclcpp::Publisher::SharedPtr pub_v2x_state_; - - // timer - rclcpp::TimerBase::SharedPtr timer_; - - // tf - tf2_ros::Buffer tf_buffer_; - tf2_ros::TransformListener tf_listener_; - - // callback function - void callbackSteer(const autoware_auto_vehicle_msgs::msg::SteeringReport::ConstSharedPtr msg_ptr); - void callbackVehicleCmd( - const autoware_auto_control_msgs::msg::AckermannControlCommand::ConstSharedPtr msg_ptr); - void callbackTurnIndicators( - const autoware_auto_vehicle_msgs::msg::TurnIndicatorsReport::ConstSharedPtr msg_ptr); - void callbackHazardLights( - const autoware_auto_vehicle_msgs::msg::HazardLightsReport::ConstSharedPtr msg_ptr); - void callbackTwist(const nav_msgs::msg::Odometry::ConstSharedPtr msg_ptr); - void callbackGear(const autoware_auto_vehicle_msgs::msg::GearReport::ConstSharedPtr msg_ptr); - void callbackBattery(const tier4_vehicle_msgs::msg::BatteryStatus::ConstSharedPtr msg_ptr); - void callbackNavSat(const sensor_msgs::msg::NavSatFix::ConstSharedPtr msg_ptr); - void callbackAutowareState( - const autoware_auto_system_msgs::msg::AutowareState::ConstSharedPtr msg_ptr); - void callbackControlMode( - const autoware_auto_vehicle_msgs::msg::ControlModeReport::ConstSharedPtr msg_ptr); - void callbackGateMode(const tier4_control_msgs::msg::GateMode::ConstSharedPtr msg_ptr); - void callbackEmergencyState( - const autoware_auto_system_msgs::msg::EmergencyState::ConstSharedPtr msg_ptr); - void callbackHazardStatus( - const autoware_auto_system_msgs::msg::HazardStatusStamped::ConstSharedPtr msg_ptr); - void callbackStopReason(const tier4_planning_msgs::msg::StopReasonArray::ConstSharedPtr msg_ptr); - void callbackV2XCommand( - const tier4_v2x_msgs::msg::InfrastructureCommandArray::ConstSharedPtr msg_ptr); - void callbackV2XState( - const tier4_v2x_msgs::msg::VirtualTrafficLightStateArray::ConstSharedPtr msg_ptr); - void callbackDiagnostics(const diagnostic_msgs::msg::DiagnosticArray::ConstSharedPtr msg_ptr); - void callbackGlobalRpt(const pacmod3_msgs::msg::GlobalRpt::ConstSharedPtr msg_ptr); - void callbackLaneChangeAvailable( - const tier4_planning_msgs::msg::LaneChangeStatus::ConstSharedPtr msg_ptr); - void callbackLaneChangeReady( - const tier4_planning_msgs::msg::LaneChangeStatus::ConstSharedPtr msg_ptr); - void callbackLaneChangeCandidatePath( - const autoware_auto_planning_msgs::msg::Path::ConstSharedPtr msg_ptr); - void callbackLaneObstacleAvoidReady( - const tier4_planning_msgs::msg::IsAvoidancePossible::ConstSharedPtr msg_ptr); - void callbackLaneObstacleAvoidCandidatePath( - const autoware_auto_planning_msgs::msg::Trajectory::ConstSharedPtr msg_ptr); - void callbackMaxVelocity(const tier4_api_msgs::msg::VelocityLimit::ConstSharedPtr msg_ptr); - void callbackCurrentMaxVelocity( - const tier4_planning_msgs::msg::VelocityLimit::ConstSharedPtr msg_ptr); - void callbackTemporaryStop(const tier4_api_msgs::msg::StopCommand::ConstSharedPtr msg_ptr); - void callbackAutowareTrajectory( - const autoware_auto_planning_msgs::msg::Trajectory::ConstSharedPtr msg_ptr); - void callbackDoorControl(const tier4_api_msgs::msg::DoorControlCommand::ConstSharedPtr msg_ptr); - void callbackDoorStatus(const pacmod3_msgs::msg::SystemRptInt::ConstSharedPtr msg_ptr); - - // timer function - void timerCallback(); - - void emergencyParamCheck(const bool emergency_stop_param); - void getCurrentPose(); - - // parameter - AutowareInfo aw_info_; - std::unique_ptr vehicle_state_publisher_; - std::unique_ptr autoware_state_publisher_; - std::unique_ptr stop_reason_aggregator_; - std::unique_ptr v2x_aggregator_; - std::unique_ptr lane_change_state_publisher_; - std::unique_ptr obstacle_avoidance_state_publisher_; - std::unique_ptr max_velocity_publisher_; - double status_pub_hz_; - double stop_reason_timeout_; - double stop_reason_thresh_dist_; -}; - -} // namespace autoware_api - -#endif // AWAPI_AWIV_ADAPTER__AWAPI_AWIV_ADAPTER_CORE_HPP_ diff --git a/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_lane_change_state_publisher.hpp b/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_lane_change_state_publisher.hpp deleted file mode 100644 index c540aa7992ae8..0000000000000 --- a/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_lane_change_state_publisher.hpp +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2020 Tier IV, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef AWAPI_AWIV_ADAPTER__AWAPI_LANE_CHANGE_STATE_PUBLISHER_HPP_ -#define AWAPI_AWIV_ADAPTER__AWAPI_LANE_CHANGE_STATE_PUBLISHER_HPP_ - -#include "awapi_awiv_adapter/awapi_autoware_util.hpp" - -#include - -#include - -namespace autoware_api -{ -class AutowareIvLaneChangeStatePublisher -{ -public: - explicit AutowareIvLaneChangeStatePublisher(rclcpp::Node & node); - void statePublisher(const AutowareInfo & aw_info); - -private: - rclcpp::Logger logger_; - rclcpp::Clock::SharedPtr clock_; - - // publisher - rclcpp::Publisher::SharedPtr pub_state_; - - void getLaneChangeAvailableInfo( - const tier4_planning_msgs::msg::LaneChangeStatus::ConstSharedPtr & available_ptr, - tier4_api_msgs::msg::LaneChangeStatus * status); - void getLaneChangeReadyInfo( - const tier4_planning_msgs::msg::LaneChangeStatus::ConstSharedPtr & ready_ptr, - tier4_api_msgs::msg::LaneChangeStatus * status); - void getCandidatePathInfo( - const autoware_auto_planning_msgs::msg::Path::ConstSharedPtr & path_ptr, - tier4_api_msgs::msg::LaneChangeStatus * status); -}; - -} // namespace autoware_api - -#endif // AWAPI_AWIV_ADAPTER__AWAPI_LANE_CHANGE_STATE_PUBLISHER_HPP_ diff --git a/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_max_velocity_publisher.hpp b/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_max_velocity_publisher.hpp deleted file mode 100644 index 507afd688af9e..0000000000000 --- a/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_max_velocity_publisher.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2020 Tier IV, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef AWAPI_AWIV_ADAPTER__AWAPI_MAX_VELOCITY_PUBLISHER_HPP_ -#define AWAPI_AWIV_ADAPTER__AWAPI_MAX_VELOCITY_PUBLISHER_HPP_ - -#include "awapi_awiv_adapter/awapi_autoware_util.hpp" - -#include - -#include - -namespace autoware_api -{ -class AutowareIvMaxVelocityPublisher -{ -public: - AutowareIvMaxVelocityPublisher(rclcpp::Node & node, const double default_max_velocity); - void statePublisher(const AutowareInfo & aw_info); - -private: - // publisher - rclcpp::Publisher::SharedPtr pub_state_; - - bool calcMaxVelocity( - const tier4_api_msgs::msg::VelocityLimit::ConstSharedPtr & max_velocity_ptr, - const tier4_api_msgs::msg::StopCommand::ConstSharedPtr & temporary_stop_ptr, - float * max_velocity); - - double default_max_velocity_; -}; - -} // namespace autoware_api - -#endif // AWAPI_AWIV_ADAPTER__AWAPI_MAX_VELOCITY_PUBLISHER_HPP_ diff --git a/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_obstacle_avoidance_state_publisher.hpp b/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_obstacle_avoidance_state_publisher.hpp deleted file mode 100644 index 7ac755e8102c6..0000000000000 --- a/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_obstacle_avoidance_state_publisher.hpp +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2020 Tier IV, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef AWAPI_AWIV_ADAPTER__AWAPI_OBSTACLE_AVOIDANCE_STATE_PUBLISHER_HPP_ -#define AWAPI_AWIV_ADAPTER__AWAPI_OBSTACLE_AVOIDANCE_STATE_PUBLISHER_HPP_ - -#include "awapi_awiv_adapter/awapi_autoware_util.hpp" - -#include - -#include - -namespace autoware_api -{ -class AutowareIvObstacleAvoidanceStatePublisher -{ -public: - explicit AutowareIvObstacleAvoidanceStatePublisher(rclcpp::Node & node); - void statePublisher(const AutowareInfo & aw_info); - -private: - rclcpp::Logger logger_; - rclcpp::Clock::SharedPtr clock_; - - // publisher - rclcpp::Publisher::SharedPtr pub_state_; - - void getObstacleAvoidReadyInfo( - const tier4_planning_msgs::msg::IsAvoidancePossible::ConstSharedPtr & ready_ptr, - tier4_api_msgs::msg::ObstacleAvoidanceStatus * status); - void getCandidatePathInfo( - const autoware_auto_planning_msgs::msg::Trajectory::ConstSharedPtr & path_ptr, - tier4_api_msgs::msg::ObstacleAvoidanceStatus * status); -}; - -} // namespace autoware_api - -#endif // AWAPI_AWIV_ADAPTER__AWAPI_OBSTACLE_AVOIDANCE_STATE_PUBLISHER_HPP_ diff --git a/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_pacmod_util.hpp b/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_pacmod_util.hpp deleted file mode 100644 index 8426a385e3a65..0000000000000 --- a/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_pacmod_util.hpp +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2020 Tier IV, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef AWAPI_AWIV_ADAPTER__AWAPI_PACMOD_UTIL_HPP_ -#define AWAPI_AWIV_ADAPTER__AWAPI_PACMOD_UTIL_HPP_ - -#include - -#include -#include -#include -#include - -namespace autoware_api -{ -namespace pacmod_util -{ -tier4_api_msgs::msg::DoorStatus getDoorStatusMsg( - const pacmod3_msgs::msg::SystemRptInt::ConstSharedPtr & msg_ptr); -pacmod3_msgs::msg::SystemCmdInt createClearOverrideDoorCommand( - const rclcpp::Clock::SharedPtr & clock); -pacmod3_msgs::msg::SystemCmdInt createDoorCommand( - const rclcpp::Clock::SharedPtr & clock, - const tier4_api_msgs::msg::DoorControlCommand::ConstSharedPtr & msg_ptr); -} // namespace pacmod_util - -} // namespace autoware_api - -#endif // AWAPI_AWIV_ADAPTER__AWAPI_PACMOD_UTIL_HPP_ diff --git a/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_stop_reason_aggregator.hpp b/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_stop_reason_aggregator.hpp deleted file mode 100644 index b05ec18817537..0000000000000 --- a/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_stop_reason_aggregator.hpp +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2020 Tier IV, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef AWAPI_AWIV_ADAPTER__AWAPI_STOP_REASON_AGGREGATOR_HPP_ -#define AWAPI_AWIV_ADAPTER__AWAPI_STOP_REASON_AGGREGATOR_HPP_ - -#include "awapi_awiv_adapter/awapi_autoware_util.hpp" - -#include - -#include - -namespace autoware_api -{ -class AutowareIvStopReasonAggregator -{ -public: - AutowareIvStopReasonAggregator( - rclcpp::Node & node, const double timeout, const double thresh_dist_to_stop_pose); - tier4_planning_msgs::msg::StopReasonArray::ConstSharedPtr updateStopReasonArray( - const tier4_planning_msgs::msg::StopReasonArray::ConstSharedPtr & msg_ptr, - const AutowareInfo & aw_info); - -private: - void applyUpdate( - const tier4_planning_msgs::msg::StopReasonArray::ConstSharedPtr & msg_ptr, - const AutowareInfo & aw_info); - bool checkMatchingReason( - const tier4_planning_msgs::msg::StopReasonArray::ConstSharedPtr & msg_stop_reason_array, - const tier4_planning_msgs::msg::StopReasonArray & stop_reason_array); - void applyTimeOut(); - void appendStopReasonToArray( - const tier4_planning_msgs::msg::StopReason & stop_reason, - tier4_planning_msgs::msg::StopReasonArray * stop_reason_array, const AutowareInfo & aw_info); - tier4_planning_msgs::msg::StopReasonArray::ConstSharedPtr makeStopReasonArray( - const AutowareInfo & aw_info); - tier4_planning_msgs::msg::StopReason inputStopDistToStopReason( - const tier4_planning_msgs::msg::StopReason & stop_reason, const AutowareInfo & aw_info); - double calcStopDistToStopFactor( - const tier4_planning_msgs::msg::StopFactor & stop_factor, const AutowareInfo & aw_info); - tier4_planning_msgs::msg::StopReason getNearStopReason( - const tier4_planning_msgs::msg::StopReason & stop_reason, const AutowareInfo & aw_info); - - rclcpp::Logger logger_; - rclcpp::Clock::SharedPtr clock_; - double timeout_; - double thresh_dist_to_stop_pose_; - std::vector stop_reason_array_vec_; -}; - -} // namespace autoware_api - -#endif // AWAPI_AWIV_ADAPTER__AWAPI_STOP_REASON_AGGREGATOR_HPP_ diff --git a/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_v2x_aggregator.hpp b/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_v2x_aggregator.hpp deleted file mode 100644 index 11406da27deab..0000000000000 --- a/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_v2x_aggregator.hpp +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2021 Tier IV, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef AWAPI_AWIV_ADAPTER__AWAPI_V2X_AGGREGATOR_HPP_ -#define AWAPI_AWIV_ADAPTER__AWAPI_V2X_AGGREGATOR_HPP_ - -#include - -#include -#include - -#include -#include -#include - -namespace autoware_api -{ -using Command = tier4_v2x_msgs::msg::InfrastructureCommand; -using CommandArray = tier4_v2x_msgs::msg::InfrastructureCommandArray; -using State = tier4_v2x_msgs::msg::VirtualTrafficLightState; -using StateArray = tier4_v2x_msgs::msg::VirtualTrafficLightStateArray; - -class AutowareIvV2XAggregator -{ -public: - explicit AutowareIvV2XAggregator(rclcpp::Node & node); - - CommandArray::ConstSharedPtr updateV2XCommand(const CommandArray::ConstSharedPtr & msg); - - StateArray::ConstSharedPtr updateV2XState(const StateArray::ConstSharedPtr & msg); - -private: - rclcpp::Logger logger_; - rclcpp::Clock::SharedPtr clock_; - const double max_delay_sec_{5.0}; - const double max_clock_error_sec_{300.0}; - std::map command_map_; - std::map state_map_; -}; - -} // namespace autoware_api - -#endif // AWAPI_AWIV_ADAPTER__AWAPI_V2X_AGGREGATOR_HPP_ diff --git a/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_vehicle_state_publisher.hpp b/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_vehicle_state_publisher.hpp deleted file mode 100644 index 20d44297f21ee..0000000000000 --- a/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/awapi_vehicle_state_publisher.hpp +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2020 Tier IV, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef AWAPI_AWIV_ADAPTER__AWAPI_VEHICLE_STATE_PUBLISHER_HPP_ -#define AWAPI_AWIV_ADAPTER__AWAPI_VEHICLE_STATE_PUBLISHER_HPP_ - -#include "awapi_awiv_adapter/awapi_autoware_util.hpp" - -#include - -#include - -#include - -namespace autoware_api -{ -class AutowareIvVehicleStatePublisher -{ -public: - explicit AutowareIvVehicleStatePublisher(rclcpp::Node & node); - void statePublisher(const AutowareInfo & aw_info); - -private: - // publisher - rclcpp::Publisher::SharedPtr pub_state_; - - tier4_api_msgs::msg::AwapiVehicleStatus initVehicleStatus(); - void getPoseInfo( - const std::shared_ptr & pose_ptr, - tier4_api_msgs::msg::AwapiVehicleStatus * status); - void getSteerInfo( - const autoware_auto_vehicle_msgs::msg::SteeringReport::ConstSharedPtr & steer_ptr, - tier4_api_msgs::msg::AwapiVehicleStatus * status); - void getVehicleCmdInfo( - const autoware_auto_control_msgs::msg::AckermannControlCommand::ConstSharedPtr & - vehicle_cmd_ptr, - tier4_api_msgs::msg::AwapiVehicleStatus * status); - void getTurnSignalInfo( - const autoware_auto_vehicle_msgs::msg::TurnIndicatorsReport::ConstSharedPtr & - turn_indicators_ptr, - const autoware_auto_vehicle_msgs::msg::HazardLightsReport::ConstSharedPtr & hazard_lights_ptr, - tier4_api_msgs::msg::AwapiVehicleStatus * status); - void getTwistInfo( - const nav_msgs::msg::Odometry::ConstSharedPtr & odometry_ptr, - tier4_api_msgs::msg::AwapiVehicleStatus * status); - void getGearInfo( - const autoware_auto_vehicle_msgs::msg::GearReport::ConstSharedPtr & gear_ptr, - tier4_api_msgs::msg::AwapiVehicleStatus * status); - void getBatteryInfo( - const tier4_vehicle_msgs::msg::BatteryStatus::ConstSharedPtr & battery_ptr, - tier4_api_msgs::msg::AwapiVehicleStatus * status); - void getGpsInfo( - const sensor_msgs::msg::NavSatFix::ConstSharedPtr & nav_sat_ptr, - tier4_api_msgs::msg::AwapiVehicleStatus * status); - - rclcpp::Logger logger_; - rclcpp::Clock::SharedPtr clock_; - - // parameters - nav_msgs::msg::Odometry::ConstSharedPtr previous_odometry_ptr_; - autoware_auto_vehicle_msgs::msg::SteeringReport::ConstSharedPtr previous_steer_ptr_; - double prev_accel_; - double prev_steer_vel_; - - // defined value - const double accel_lowpass_gain_ = 0.2; - const double steer_vel_lowpass_gain_ = 0.2; -}; - -} // namespace autoware_api - -#endif // AWAPI_AWIV_ADAPTER__AWAPI_VEHICLE_STATE_PUBLISHER_HPP_ diff --git a/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/diagnostics_filter.hpp b/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/diagnostics_filter.hpp deleted file mode 100644 index 87e84861b49ee..0000000000000 --- a/awapi/awapi_awiv_adapter/include/awapi_awiv_adapter/diagnostics_filter.hpp +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright 2020 Tier IV, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef AWAPI_AWIV_ADAPTER__DIAGNOSTICS_FILTER_HPP_ -#define AWAPI_AWIV_ADAPTER__DIAGNOSTICS_FILTER_HPP_ - -#include - -#include -#include -#include - -namespace diagnostics_filter -{ -inline std::string splitStringByLastSlash(const std::string & str) -{ - const auto last_slash = str.find_last_of("/"); - - if (last_slash == std::string::npos) { - return ""; - } - - return str.substr(0, last_slash); -} - -std::vector getAllParentNames(const std::string & diag_name) -{ - std::vector all_parent_names; - - auto parent_name = splitStringByLastSlash(diag_name); - while (parent_name != "") { - all_parent_names.push_back(parent_name); - parent_name = splitStringByLastSlash(parent_name); - } - - return all_parent_names; -} - -inline bool isChild( - const diagnostic_msgs::msg::DiagnosticStatus & child, - const diagnostic_msgs::msg::DiagnosticStatus & parent) -{ - auto name = splitStringByLastSlash(child.name); - while (name != "") { - if (name == parent.name) { - return true; - } - - name = splitStringByLastSlash(name); - } - - return false; -} - -inline bool isLeaf( - const std::unordered_set & diag_name_set, - const diagnostic_msgs::msg::DiagnosticStatus & diag) -{ - return diag_name_set.count(diag.name) == 0; -} - -inline std::unordered_set createDiagNameSet( - const std::vector & diagnostics) -{ - std::unordered_set diag_name_set; - - for (const auto & diag : diagnostics) { - for (const auto & parent_name : getAllParentNames(diag.name)) { - diag_name_set.insert(parent_name); - } - } - - return diag_name_set; -} - -inline std::vector extractLeafDiagnostics( - const std::vector & diagnostics) -{ - const auto diag_name_set = createDiagNameSet(diagnostics); - - std::vector leaf_diagnostics; - for (const auto & diag : diagnostics) { - if (isLeaf(diag_name_set, diag)) { - leaf_diagnostics.push_back(diag); - } - } - - return leaf_diagnostics; -} - -inline std::vector extractLeafChildrenDiagnostics( - const diagnostic_msgs::msg::DiagnosticStatus & parent, - const std::vector & diagnostics) -{ - std::vector leaf_children_diagnostics; - for (const auto & diag : extractLeafDiagnostics(diagnostics)) { - if (isChild(diag, parent)) { - leaf_children_diagnostics.push_back(diag); - } - } - - return leaf_children_diagnostics; -} - -} // namespace diagnostics_filter - -#endif // AWAPI_AWIV_ADAPTER__DIAGNOSTICS_FILTER_HPP_ diff --git a/awapi/awapi_awiv_adapter/launch/awapi_awiv_adapter.launch.xml b/awapi/awapi_awiv_adapter/launch/awapi_awiv_adapter.launch.xml deleted file mode 100644 index 5038612f87644..0000000000000 --- a/awapi/awapi_awiv_adapter/launch/awapi_awiv_adapter.launch.xml +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/awapi/awapi_awiv_adapter/launch/awapi_relay_container.launch.py b/awapi/awapi_awiv_adapter/launch/awapi_relay_container.launch.py deleted file mode 100644 index e743f0a5f7d19..0000000000000 --- a/awapi/awapi_awiv_adapter/launch/awapi_relay_container.launch.py +++ /dev/null @@ -1,425 +0,0 @@ -# Copyright 2020 Tier IV, Inc. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import launch -from launch.actions import SetLaunchConfiguration -from launch.conditions import IfCondition -from launch.conditions import UnlessCondition -from launch.substitutions import LaunchConfiguration -from launch_ros.actions import ComposableNodeContainer -from launch_ros.descriptions import ComposableNode - - -def generate_launch_description(): - relay_components = [] - - relay_components.append( - ComposableNode( - package="topic_tools", - plugin="topic_tools::RelayNode", - name="route_relay", - namespace="awapi", - parameters=[ - { - "input_topic": LaunchConfiguration("input_route"), - "output_topic": LaunchConfiguration("get_route"), - "type": "autoware_auto_planning_msgs/msg/HADMapRoute", - } - ], - extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], - ) - ) - - relay_components.append( - ComposableNode( - package="topic_tools", - plugin="topic_tools::RelayNode", - name="predict_object_relay", - namespace="awapi", - parameters=[ - { - "input_topic": LaunchConfiguration("input_object"), - "output_topic": LaunchConfiguration("get_predicted_object"), - "type": "autoware_auto_perception_msgs/msg/PredictedObjects", - } - ], - extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], - ) - ) - - relay_components.append( - ComposableNode( - package="topic_tools", - plugin="topic_tools::RelayNode", - name="nearest_traffic_signal_relay", - namespace="awapi", - parameters=[ - { - "input_topic": LaunchConfiguration("input_nearest_traffic_signal"), - "output_topic": LaunchConfiguration("get_nearest_traffic_signal"), - "type": "autoware_auto_perception_msgs/msg/LookingTrafficSignal", - } - ], - extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], - ) - ) - - relay_components.append( - ComposableNode( - package="topic_tools", - plugin="topic_tools::RelayNode", - name="ready_module_relay", - namespace="awapi", - parameters=[ - { - "input_topic": LaunchConfiguration("input_path_change_ready"), - "output_topic": LaunchConfiguration("get_path_change_ready"), - "type": "tier4_planning_msgs/msg/PathChangeModule", - } - ], - extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], - ) - ) - - relay_components.append( - ComposableNode( - package="topic_tools", - plugin="topic_tools::RelayNode", - name="force_available_relay", - namespace="awapi", - parameters=[ - { - "input_topic": LaunchConfiguration("input_path_change_force_available"), - "output_topic": LaunchConfiguration("get_path_change_force_available"), - "type": "tier4_planning_msgs/msg/PathChangeModuleArray", - } - ], - extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], - ) - ) - - relay_components.append( - ComposableNode( - package="topic_tools", - plugin="topic_tools::RelayNode", - name="running_modules_relay", - namespace="awapi", - parameters=[ - { - "input_topic": LaunchConfiguration("input_path_change_running"), - "output_topic": LaunchConfiguration("get_path_change_running"), - "type": "tier4_planning_msgs/msg/PathChangeModuleArray", - } - ], - extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], - ) - ) - - relay_components.append( - ComposableNode( - package="topic_tools", - plugin="topic_tools::RelayNode", - name="autoware_engage_relay", - namespace="awapi", - parameters=[ - { - "input_topic": LaunchConfiguration("set_engage"), - "output_topic": LaunchConfiguration("output_autoware_engage"), - "type": "autoware_auto_vehicle_msgs/msg/Engage", - } - ], - extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], - ) - ) - - relay_components.append( - ComposableNode( - package="topic_tools", - plugin="topic_tools::RelayNode", - name="vehicle_engage_relay", - namespace="awapi", - parameters=[ - { - "input_topic": LaunchConfiguration("set_engage"), - "output_topic": LaunchConfiguration("output_vehicle_engage"), - "type": "autoware_auto_vehicle_msgs/msg/Engage", - } - ], - extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], - ) - ) - - relay_components.append( - ComposableNode( - package="topic_tools", - plugin="topic_tools::RelayNode", - name="put_route_relay", - namespace="awapi", - parameters=[ - { - "input_topic": LaunchConfiguration("set_route"), - "output_topic": LaunchConfiguration("output_route"), - "type": "autoware_auto_planning_msgs/msg/HADMapRoute", - "durability": "transient_local", - } - ], - extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], - ) - ) - - relay_components.append( - ComposableNode( - package="topic_tools", - plugin="topic_tools::RelayNode", - name="put_goal_relay", - namespace="awapi", - parameters=[ - { - "input_topic": LaunchConfiguration("set_goal"), - "output_topic": LaunchConfiguration("output_goal"), - "type": "geometry_msgs/msg/PoseStamped", - } - ], - extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], - ) - ) - - relay_components.append( - ComposableNode( - package="topic_tools", - plugin="topic_tools::RelayNode", - name="lane_change_approval_relay", - namespace="awapi", - parameters=[ - { - "input_topic": LaunchConfiguration("set_lane_change_approval"), - "output_topic": LaunchConfiguration("output_lane_change_approval"), - "type": "tier4_planning_msgs/msg/LaneChangeCommand", - } - ], - extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], - ) - ) - - relay_components.append( - ComposableNode( - package="topic_tools", - plugin="topic_tools::RelayNode", - name="force_lane_change_relay", - namespace="awapi", - parameters=[ - { - "input_topic": LaunchConfiguration("set_force_lane_change"), - "output_topic": LaunchConfiguration("output_force_lane_change"), - "type": "tier4_planning_msgs/msg/LaneChangeCommand", - } - ], - extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], - ) - ) - - relay_components.append( - ComposableNode( - package="topic_tools", - plugin="topic_tools::RelayNode", - name="external_approval_relay", - namespace="awapi", - parameters=[ - { - "input_topic": LaunchConfiguration("set_path_change_approval"), - "output_topic": LaunchConfiguration("output_path_change_approval"), - "type": "tier4_planning_msgs/msg/Approval", - } - ], - extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], - ) - ) - - relay_components.append( - ComposableNode( - package="topic_tools", - plugin="topic_tools::RelayNode", - name="force_approval_relay", - namespace="awapi", - parameters=[ - { - "input_topic": LaunchConfiguration("set_path_change_force"), - "output_topic": LaunchConfiguration("output_path_change_force"), - "type": "tier4_planning_msgs/msg/PathChangeModule", - } - ], - extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], - ) - ) - - relay_components.append( - ComposableNode( - package="topic_tools", - plugin="topic_tools::RelayNode", - name="obstacle_avoid_approval_relay", - namespace="awapi", - parameters=[ - { - "input_topic": LaunchConfiguration("set_obstacle_avoid_approval"), - "output_topic": LaunchConfiguration("output_obstacle_avoid_approval"), - "type": "tier4_planning_msgs/msg/EnableAvoidance", - } - ], - extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], - ) - ) - - relay_components.append( - ComposableNode( - package="topic_tools", - plugin="topic_tools::RelayNode", - name="traffic_signal_relay", - namespace="awapi", - parameters=[ - { - "input_topic": LaunchConfiguration("input_traffic_signals"), - "output_topic": LaunchConfiguration("get_traffic_signals"), - "type": "autoware_auto_perception_msgs/msg/TrafficSignalArray", - } - ], - extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], - ) - ) - - relay_components.append( - ComposableNode( - package="topic_tools", - plugin="topic_tools::RelayNode", - name="overwrite_traffic_signals_relay", - namespace="awapi", - parameters=[ - { - "input_topic": LaunchConfiguration("set_overwrite_traffic_signals"), - "output_topic": LaunchConfiguration("output_overwrite_traffic_signals"), - "type": "autoware_auto_perception_msgs/msg/TrafficSignalArray", - } - ], - extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], - ) - ) - - relay_components.append( - ComposableNode( - package="topic_tools", - plugin="topic_tools::RelayNode", - name="speed_exceeded_relay", - namespace="awapi", - parameters=[ - { - "input_topic": LaunchConfiguration("input_stop_speed_exceeded"), - "output_topic": LaunchConfiguration("get_stop_speed_exceeded"), - "type": "tier4_planning_msgs/msg/StopSpeedExceeded", - } - ], - extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], - ) - ) - - relay_components.append( - ComposableNode( - package="topic_tools", - plugin="topic_tools::RelayNode", - name="crosswalk_status_relay", - namespace="awapi", - parameters=[ - { - "input_topic": LaunchConfiguration("set_crosswalk_status"), - "output_topic": LaunchConfiguration("input_external_crosswalk_status"), - "type": "tier4_api_msgs/msg/CrosswalkStatus", - } - ], - extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], - ) - ) - - relay_components.append( - ComposableNode( - package="topic_tools", - plugin="topic_tools::RelayNode", - name="intersection_status_relay", - namespace="awapi", - parameters=[ - { - "input_topic": LaunchConfiguration("set_intersection_status"), - "output_topic": LaunchConfiguration("input_external_intersection_status"), - "type": "tier4_api_msgs/msg/IntersectionStatus", - } - ], - extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], - ) - ) - - relay_components.append( - ComposableNode( - package="topic_tools", - plugin="topic_tools::RelayNode", - name="expand_stop_range_relay", - namespace="awapi", - parameters=[ - { - "input_topic": LaunchConfiguration("set_expand_stop_range"), - "output_topic": LaunchConfiguration("input_expand_stop_range"), - "type": "tier4_planning_msgs/msg/ExpandStopRange", - } - ], - extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], - ) - ) - - relay_components.append( - ComposableNode( - package="topic_tools", - plugin="topic_tools::RelayNode", - name="pose_initialization_request_relay", - namespace="awapi", - parameters=[ - { - "input_topic": LaunchConfiguration("set_pose_initialization_request"), - "output_topic": LaunchConfiguration("input_pose_initialization_request"), - "type": "tier4_localization_msgs/msg/PoseInitializationRequest", - } - ], - extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], - ) - ) - - container = ComposableNodeContainer( - name="awapi_relay_container", - namespace="awapi", - package="rclcpp_components", - executable=LaunchConfiguration("container_executable"), - composable_node_descriptions=relay_components, - output="screen", - ) - - set_container_executable = SetLaunchConfiguration( - "container_executable", - "component_container", - condition=UnlessCondition(LaunchConfiguration("use_multithread")), - ) - - set_container_mt_executable = SetLaunchConfiguration( - "container_executable", - "component_container_mt", - condition=IfCondition(LaunchConfiguration("use_multithread")), - ) - - return launch.LaunchDescription( - [set_container_executable, set_container_mt_executable] + [container] - ) diff --git a/awapi/awapi_awiv_adapter/package.xml b/awapi/awapi_awiv_adapter/package.xml deleted file mode 100644 index 0edb0a9072933..0000000000000 --- a/awapi/awapi_awiv_adapter/package.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - awapi_awiv_adapter - 0.1.0 - The awapi_awiv_adapter package - Tomoya Kimura - Tomoya Kimura - Apache License 2.0 - - ament_cmake_auto - - autoware_auto_control_msgs - autoware_auto_planning_msgs - autoware_auto_system_msgs - autoware_auto_vehicle_msgs - diagnostic_msgs - geometry_msgs - nav_msgs - pacmod3_msgs - rclcpp - sensor_msgs - std_msgs - tf2 - tf2_geometry_msgs - tier4_api_msgs - tier4_auto_msgs_converter - tier4_control_msgs - tier4_external_api_msgs - tier4_planning_msgs - tier4_v2x_msgs - tier4_vehicle_msgs - - autoware_auto_perception_msgs - tier4_perception_msgs - topic_tools - - ament_lint_auto - autoware_lint_common - - - ament_cmake - - diff --git a/awapi/awapi_awiv_adapter/src/awapi_autoware_state_publisher.cpp b/awapi/awapi_awiv_adapter/src/awapi_autoware_state_publisher.cpp deleted file mode 100644 index 12e7af3651ad9..0000000000000 --- a/awapi/awapi_awiv_adapter/src/awapi_autoware_state_publisher.cpp +++ /dev/null @@ -1,302 +0,0 @@ -// Copyright 2020 Tier IV, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "awapi_awiv_adapter/awapi_autoware_state_publisher.hpp" - -#include "awapi_awiv_adapter/diagnostics_filter.hpp" -#include "tier4_auto_msgs_converter/tier4_auto_msgs_converter.hpp" - -#include -#include -#include - -namespace autoware_api -{ -AutowareIvAutowareStatePublisher::AutowareIvAutowareStatePublisher(rclcpp::Node & node) -: logger_(node.get_logger().get_child("awapi_awiv_autoware_state_publisher")), - clock_(node.get_clock()), - arrived_goal_(false) -{ - // publisher - pub_state_ = - node.create_publisher("output/autoware_status", 1); -} - -void AutowareIvAutowareStatePublisher::statePublisher(const AutowareInfo & aw_info) -{ - tier4_api_msgs::msg::AwapiAutowareStatus status; - - // input header - status.header.frame_id = "base_link"; - status.header.stamp = clock_->now(); - - // get all info - getAutowareStateInfo(aw_info.autoware_state_ptr, &status); - getControlModeInfo(aw_info.control_mode_ptr, &status); - getGateModeInfo(aw_info.gate_mode_ptr, &status); - getEmergencyStateInfo(aw_info.emergency_state_ptr, &status); - getCurrentMaxVelInfo(aw_info.current_max_velocity_ptr, &status); - getHazardStatusInfo(aw_info, &status); - getStopReasonInfo(aw_info.stop_reason_ptr, &status); - getDiagInfo(aw_info, &status); - getErrorDiagInfo(aw_info, &status); - getGlobalRptInfo(aw_info.global_rpt_ptr, &status); - - // publish info - pub_state_->publish(status); -} - -void AutowareIvAutowareStatePublisher::getAutowareStateInfo( - const autoware_auto_system_msgs::msg::AutowareState::ConstSharedPtr & autoware_state_ptr, - tier4_api_msgs::msg::AwapiAutowareStatus * status) -{ - if (!autoware_state_ptr) { - RCLCPP_DEBUG_STREAM_THROTTLE(logger_, *clock_, 5000 /* ms */, "autoware_state is nullptr"); - return; - } - - // get autoware_state - using tier4_auto_msgs_converter::convert; - status->autoware_state = convert(*autoware_state_ptr).state; - status->arrived_goal = isGoal(autoware_state_ptr); -} - -void AutowareIvAutowareStatePublisher::getControlModeInfo( - const autoware_auto_vehicle_msgs::msg::ControlModeReport::ConstSharedPtr & control_mode_ptr, - tier4_api_msgs::msg::AwapiAutowareStatus * status) -{ - if (!control_mode_ptr) { - RCLCPP_DEBUG_STREAM_THROTTLE(logger_, *clock_, 5000 /* ms */, "control mode is nullptr"); - return; - } - - // get control mode - using tier4_auto_msgs_converter::convert; - status->control_mode = convert(*control_mode_ptr).data; -} - -void AutowareIvAutowareStatePublisher::getGateModeInfo( - const tier4_control_msgs::msg::GateMode::ConstSharedPtr & gate_mode_ptr, - tier4_api_msgs::msg::AwapiAutowareStatus * status) -{ - if (!gate_mode_ptr) { - RCLCPP_DEBUG_STREAM_THROTTLE(logger_, *clock_, 5000 /* ms */, "gate mode is nullptr"); - return; - } - - // get control mode - status->gate_mode = gate_mode_ptr->data; -} - -void AutowareIvAutowareStatePublisher::getEmergencyStateInfo( - const autoware_auto_system_msgs::msg::EmergencyState::ConstSharedPtr & emergency_state_ptr, - tier4_api_msgs::msg::AwapiAutowareStatus * status) -{ - if (!emergency_state_ptr) { - RCLCPP_DEBUG_STREAM_THROTTLE(logger_, *clock_, 5000 /* ms */, "emergency_state is nullptr"); - return; - } - - // get emergency - using autoware_auto_system_msgs::msg::EmergencyState; - status->emergency_stopped = (emergency_state_ptr->state == EmergencyState::MRM_OPERATING) || - (emergency_state_ptr->state == EmergencyState::MRM_SUCCEEDED) || - (emergency_state_ptr->state == EmergencyState::MRM_FAILED); -} - -void AutowareIvAutowareStatePublisher::getCurrentMaxVelInfo( - const tier4_planning_msgs::msg::VelocityLimit::ConstSharedPtr & current_max_velocity_ptr, - tier4_api_msgs::msg::AwapiAutowareStatus * status) -{ - if (!current_max_velocity_ptr) { - RCLCPP_DEBUG_STREAM_THROTTLE( - logger_, *clock_, 5000 /* ms */, - "[AutowareIvAutowareStatePublisher] current_max_velocity is nullptr"); - return; - } - - // get current max velocity - status->current_max_velocity = current_max_velocity_ptr->max_velocity; -} - -void AutowareIvAutowareStatePublisher::getHazardStatusInfo( - const AutowareInfo & aw_info, tier4_api_msgs::msg::AwapiAutowareStatus * status) -{ - if (!aw_info.autoware_state_ptr) { - RCLCPP_DEBUG_STREAM_THROTTLE( - logger_, *clock_, 5000 /* ms */, - "[AutowareIvAutowareStatePublisher] autoware_state is nullptr"); - return; - } - - if (!aw_info.control_mode_ptr) { - RCLCPP_DEBUG_STREAM_THROTTLE( - logger_, *clock_, 5000 /* ms */, - "[AutowareIvAutowareStatePublisher] control_mode is nullptr"); - return; - } - - if (!aw_info.hazard_status_ptr) { - RCLCPP_DEBUG_STREAM_THROTTLE( - logger_, *clock_, 5000 /* ms */, - "[AutowareIvAutowareStatePublisher] hazard_status is nullptr"); - return; - } - - // get emergency - using tier4_auto_msgs_converter::convert; - status->hazard_status = convert(*aw_info.hazard_status_ptr); - - // filter leaf diagnostics - status->hazard_status.status.diagnostics_spf = - diagnostics_filter::extractLeafDiagnostics(status->hazard_status.status.diagnostics_spf); - status->hazard_status.status.diagnostics_lf = - diagnostics_filter::extractLeafDiagnostics(status->hazard_status.status.diagnostics_lf); - status->hazard_status.status.diagnostics_sf = - diagnostics_filter::extractLeafDiagnostics(status->hazard_status.status.diagnostics_sf); - status->hazard_status.status.diagnostics_nf = - diagnostics_filter::extractLeafDiagnostics(status->hazard_status.status.diagnostics_nf); -} - -void AutowareIvAutowareStatePublisher::getStopReasonInfo( - const tier4_planning_msgs::msg::StopReasonArray::ConstSharedPtr & stop_reason_ptr, - tier4_api_msgs::msg::AwapiAutowareStatus * status) -{ - if (!stop_reason_ptr) { - RCLCPP_DEBUG_STREAM_THROTTLE(logger_, *clock_, 5000 /* ms */, "stop reason is nullptr"); - return; - } - - status->stop_reason = *stop_reason_ptr; -} - -void AutowareIvAutowareStatePublisher::getDiagInfo( - const AutowareInfo & aw_info, tier4_api_msgs::msg::AwapiAutowareStatus * status) -{ - if (!aw_info.diagnostic_ptr) { - RCLCPP_DEBUG_STREAM_THROTTLE( - logger_, *clock_, 5000 /* ms */, "[AutowareIvAutowareStatePublisher] diagnostics is nullptr"); - return; - } - - // get diag - status->diagnostics = diagnostics_filter::extractLeafDiagnostics(aw_info.diagnostic_ptr->status); -} - -// This function is tentative and should be replaced with getHazardStatusInfo. -// TODO(Kenji Miyake): Make getErrorDiagInfo users to use getHazardStatusInfo. -void AutowareIvAutowareStatePublisher::getErrorDiagInfo( - const AutowareInfo & aw_info, tier4_api_msgs::msg::AwapiAutowareStatus * status) -{ - using autoware_auto_system_msgs::msg::AutowareState; - using autoware_auto_vehicle_msgs::msg::ControlModeReport; - - if (!aw_info.autoware_state_ptr) { - RCLCPP_DEBUG_STREAM_THROTTLE( - logger_, *clock_, 5000 /* ms */, - "[AutowareIvAutowareStatePublisher] autoware_state is nullptr"); - return; - } - - if (!aw_info.control_mode_ptr) { - RCLCPP_DEBUG_STREAM_THROTTLE( - logger_, *clock_, 5000 /* ms */, - "[AutowareIvAutowareStatePublisher] control mode is nullptr"); - return; - } - - if (!aw_info.diagnostic_ptr) { - RCLCPP_DEBUG_STREAM_THROTTLE( - logger_, *clock_, 5000 /* ms */, "[AutowareIvAutowareStatePublisher] diagnostics is nullptr"); - return; - } - - if (!aw_info.hazard_status_ptr) { - RCLCPP_DEBUG_STREAM_THROTTLE( - logger_, *clock_, 5000 /* ms */, - "[AutowareIvAutowareStatePublisher] hazard_status is nullptr"); - return; - } - - // get diag - using diagnostic_msgs::msg::DiagnosticStatus; - const auto & hazard_status = aw_info.hazard_status_ptr->status; - std::vector error_diagnostics; - - for (const auto & hazard_diag : hazard_status.diag_single_point_fault) { - auto diag = hazard_diag; - diag.message = "[Single Point Fault]" + hazard_diag.message; - error_diagnostics.push_back(diag); - } - for (const auto & hazard_diag : hazard_status.diag_latent_fault) { - auto diag = hazard_diag; - diag.message = "[Latent Fault]" + hazard_diag.message; - error_diagnostics.push_back(diag); - } - for (const auto & hazard_diag : hazard_status.diag_safe_fault) { - auto diag = hazard_diag; - diag.message = "[Safe Fault]" + hazard_diag.message; - error_diagnostics.push_back(diag); - } - for (const auto & hazard_diag : hazard_status.diag_no_fault) { - auto diag = hazard_diag; - diag.message = "[No Fault]" + hazard_diag.message; - diag.level = DiagnosticStatus::OK; - error_diagnostics.push_back(diag); - } - - // filter leaf diag - status->error_diagnostics = diagnostics_filter::extractLeafDiagnostics(error_diagnostics); -} - -void AutowareIvAutowareStatePublisher::getGlobalRptInfo( - const pacmod3_msgs::msg::GlobalRpt::ConstSharedPtr & global_rpt_ptr, - tier4_api_msgs::msg::AwapiAutowareStatus * status) -{ - if (!global_rpt_ptr) { - RCLCPP_DEBUG_STREAM_THROTTLE(logger_, *clock_, 5000 /* ms */, "global_rpt is nullptr"); - return; - } - - // get global_rpt - status->autonomous_overridden = global_rpt_ptr->override_active; -} - -bool AutowareIvAutowareStatePublisher::isGoal( - const autoware_auto_system_msgs::msg::AutowareState::ConstSharedPtr & autoware_state) -{ - // rename - const auto & aw_state = autoware_state->state; - - if (aw_state == autoware_auto_system_msgs::msg::AutowareState::ARRIVED_GOAL) { - arrived_goal_ = true; - } else if ( // NOLINT - prev_state_ == autoware_auto_system_msgs::msg::AutowareState::DRIVING && - aw_state == autoware_auto_system_msgs::msg::AutowareState::WAITING_FOR_ROUTE) { - arrived_goal_ = true; - } - - if ( - aw_state == autoware_auto_system_msgs::msg::AutowareState::WAITING_FOR_ENGAGE || - aw_state == autoware_auto_system_msgs::msg::AutowareState::DRIVING) { - // cancel goal state - arrived_goal_ = false; - } - - prev_state_ = aw_state; - - return arrived_goal_; -} - -} // namespace autoware_api diff --git a/awapi/awapi_awiv_adapter/src/awapi_autoware_util.cpp b/awapi/awapi_awiv_adapter/src/awapi_autoware_util.cpp deleted file mode 100644 index 7d6ccba672996..0000000000000 --- a/awapi/awapi_awiv_adapter/src/awapi_autoware_util.cpp +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright 2020 Tier IV, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "awapi_awiv_adapter/awapi_autoware_util.hpp" - -#include - -namespace autoware_api -{ -double lowpass_filter(const double current_value, const double prev_value, const double gain) -{ - return gain * prev_value + (1.0 - gain) * current_value; -} - -namespace planning_util -{ -bool calcClosestIndex( - const autoware_auto_planning_msgs::msg::Trajectory & traj, const geometry_msgs::msg::Pose & pose, - size_t & output_closest_idx, const double dist_thr, const double angle_thr) -{ - double dist_min = std::numeric_limits::max(); - const double yaw_pose = tf2::getYaw(pose.orientation); - int closest_idx = -1; - - for (int i = 0; i < static_cast(traj.points.size()); ++i) { - const double dist = calcDist2d(getPose(traj, i).position, pose.position); - - /* check distance threshold */ - if (dist > dist_thr) { - continue; - } - - /* check angle threshold */ - double yaw_i = tf2::getYaw(getPose(traj, i).orientation); - double yaw_diff = normalizeEulerAngle(yaw_pose - yaw_i); - - if (std::fabs(yaw_diff) > angle_thr) { - continue; - } - - if (dist < dist_min) { - dist_min = dist; - closest_idx = i; - } - } - - output_closest_idx = static_cast(closest_idx); - - return closest_idx != -1; -} - -double normalizeEulerAngle(double euler) -{ - double res = euler; - while (res > M_PI) { - res -= (2.0 * M_PI); - } - while (res < -M_PI) { - res += 2.0 * M_PI; - } - - return res; -} - -double calcArcLengthFromWayPoint( - const autoware_auto_planning_msgs::msg::Trajectory & input_path, const size_t src_idx, - const size_t dst_idx) -{ - double length = 0; - for (size_t i = src_idx; i < dst_idx; ++i) { - const double dx_wp = - input_path.points.at(i + 1).pose.position.x - input_path.points.at(i).pose.position.x; - const double dy_wp = - input_path.points.at(i + 1).pose.position.y - input_path.points.at(i).pose.position.y; - length += std::hypot(dx_wp, dy_wp); - } - return length; -} - -double calcDistanceAlongTrajectory( - const autoware_auto_planning_msgs::msg::Trajectory & trajectory, - const geometry_msgs::msg::Pose & current_pose, const geometry_msgs::msg::Pose & target_pose) -{ - size_t self_idx; - size_t stop_idx; - if ( - !calcClosestIndex(trajectory, current_pose, self_idx) || - !calcClosestIndex(trajectory, target_pose, stop_idx)) { - return std::numeric_limits::max(); - } - const double dist_to_stop_pose = calcArcLengthFromWayPoint(trajectory, self_idx, stop_idx); - return dist_to_stop_pose; -} - -} // namespace planning_util - -} // namespace autoware_api diff --git a/awapi/awapi_awiv_adapter/src/awapi_awiv_adapter_core.cpp b/awapi/awapi_awiv_adapter/src/awapi_awiv_adapter_core.cpp deleted file mode 100644 index f1ba0b1ced6b7..0000000000000 --- a/awapi/awapi_awiv_adapter/src/awapi_awiv_adapter_core.cpp +++ /dev/null @@ -1,384 +0,0 @@ -// Copyright 2020 Tier IV, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "awapi_awiv_adapter/awapi_awiv_adapter_core.hpp" - -#include -#include -#include - -namespace autoware_api -{ -using std::placeholders::_1; - -AutowareIvAdapter::AutowareIvAdapter() -: Node("awapi_awiv_adapter_node"), tf_buffer_(this->get_clock()), tf_listener_(tf_buffer_) -{ - // get param - status_pub_hz_ = this->declare_parameter("status_pub_hz", 5.0); - stop_reason_timeout_ = this->declare_parameter("stop_reason_timeout", 0.5); - stop_reason_thresh_dist_ = this->declare_parameter("stop_reason_thresh_dist", 100.0); - const double default_max_velocity = waitForParam( - this, declare_parameter("node/max_velocity", ""), declare_parameter("param/max_velocity", "")); - const bool em_stop_param = waitForParam( - this, declare_parameter("node/emergency_stop", ""), - declare_parameter("param/emergency_stop", "")); - emergencyParamCheck(em_stop_param); - - // setup instance - vehicle_state_publisher_ = std::make_unique(*this); - autoware_state_publisher_ = std::make_unique(*this); - stop_reason_aggregator_ = std::make_unique( - *this, stop_reason_timeout_, stop_reason_thresh_dist_); - v2x_aggregator_ = std::make_unique(*this); - lane_change_state_publisher_ = std::make_unique(*this); - obstacle_avoidance_state_publisher_ = - std::make_unique(*this); - max_velocity_publisher_ = - std::make_unique(*this, default_max_velocity); - - // publisher - pub_door_control_ = - this->create_publisher("output/door_control", 1); - pub_door_status_ = - this->create_publisher("output/door_status", 1); - pub_v2x_command_ = this->create_publisher( - "output/v2x_command", 1); - pub_v2x_state_ = this->create_publisher( - "output/v2x_state", 1); - - // subscriber - - auto durable_qos = rclcpp::QoS{1}.transient_local(); - - sub_steer_ = this->create_subscription( - "input/steer", 1, std::bind(&AutowareIvAdapter::callbackSteer, this, _1)); - sub_vehicle_cmd_ = - this->create_subscription( - "input/vehicle_cmd", durable_qos, - std::bind(&AutowareIvAdapter::callbackVehicleCmd, this, _1)); - sub_turn_indicators_ = - this->create_subscription( - "input/turn_indicators", 1, std::bind(&AutowareIvAdapter::callbackTurnIndicators, this, _1)); - sub_hazard_lights_ = - this->create_subscription( - "input/hazard_lights", 1, std::bind(&AutowareIvAdapter::callbackHazardLights, this, _1)); - sub_odometry_ = this->create_subscription( - "input/odometry", 1, std::bind(&AutowareIvAdapter::callbackTwist, this, _1)); - sub_gear_ = this->create_subscription( - "input/gear", 1, std::bind(&AutowareIvAdapter::callbackGear, this, _1)); - sub_battery_ = this->create_subscription( - "input/battery", 1, std::bind(&AutowareIvAdapter::callbackBattery, this, _1)); - sub_nav_sat_ = this->create_subscription( - "input/nav_sat", 1, std::bind(&AutowareIvAdapter::callbackNavSat, this, _1)); - sub_autoware_state_ = this->create_subscription( - "input/autoware_state", 1, std::bind(&AutowareIvAdapter::callbackAutowareState, this, _1)); - sub_control_mode_ = this->create_subscription( - "input/control_mode", 1, std::bind(&AutowareIvAdapter::callbackControlMode, this, _1)); - sub_gate_mode_ = this->create_subscription( - "input/gate_mode", durable_qos, std::bind(&AutowareIvAdapter::callbackGateMode, this, _1)); - sub_emergency_ = this->create_subscription( - "input/emergency_state", 1, std::bind(&AutowareIvAdapter::callbackEmergencyState, this, _1)); - sub_hazard_status_ = - this->create_subscription( - "input/hazard_status", 1, std::bind(&AutowareIvAdapter::callbackHazardStatus, this, _1)); - sub_stop_reason_ = this->create_subscription( - "input/stop_reason", 100, std::bind(&AutowareIvAdapter::callbackStopReason, this, _1)); - sub_v2x_command_ = this->create_subscription( - "input/v2x_command", 100, std::bind(&AutowareIvAdapter::callbackV2XCommand, this, _1)); - sub_v2x_state_ = this->create_subscription( - "input/v2x_state", 100, std::bind(&AutowareIvAdapter::callbackV2XState, this, _1)); - sub_diagnostics_ = this->create_subscription( - "input/diagnostics", 1, std::bind(&AutowareIvAdapter::callbackDiagnostics, this, _1)); - sub_global_rpt_ = this->create_subscription( - "input/global_rpt", 1, std::bind(&AutowareIvAdapter::callbackGlobalRpt, this, _1)); - sub_lane_change_available_ = - this->create_subscription( - "input/lane_change_available", 1, - std::bind(&AutowareIvAdapter::callbackLaneChangeAvailable, this, _1)); - sub_lane_change_ready_ = this->create_subscription( - "input/lane_change_ready", 1, std::bind(&AutowareIvAdapter::callbackLaneChangeReady, this, _1)); - sub_lane_change_candidate_ = this->create_subscription( - "input/lane_change_candidate_path", 1, - std::bind(&AutowareIvAdapter::callbackLaneChangeCandidatePath, this, _1)); - sub_obstacle_avoid_ready_ = - this->create_subscription( - "input/obstacle_avoid_ready", durable_qos, - std::bind(&AutowareIvAdapter::callbackLaneObstacleAvoidReady, this, _1)); - sub_obstacle_avoid_candidate_ = - this->create_subscription( - "input/obstacle_avoid_candidate_path", durable_qos, - std::bind(&AutowareIvAdapter::callbackLaneObstacleAvoidCandidatePath, this, _1)); - sub_max_velocity_ = this->create_subscription( - "input/max_velocity", 1, std::bind(&AutowareIvAdapter::callbackMaxVelocity, this, _1)); - sub_current_max_velocity_ = this->create_subscription( - "input/current_max_velocity", durable_qos, - std::bind(&AutowareIvAdapter::callbackCurrentMaxVelocity, this, _1)); - sub_temporary_stop_ = this->create_subscription( - "input/temporary_stop", 1, std::bind(&AutowareIvAdapter::callbackTemporaryStop, this, _1)); - sub_autoware_traj_ = this->create_subscription( - "input/autoware_trajectory", 1, - std::bind(&AutowareIvAdapter::callbackAutowareTrajectory, this, _1)); - sub_door_control_ = this->create_subscription( - "input/door_control", 1, std::bind(&AutowareIvAdapter::callbackDoorControl, this, _1)); - sub_door_status_ = this->create_subscription( - "input/door_status", 1, std::bind(&AutowareIvAdapter::callbackDoorStatus, this, _1)); - - // timer - auto timer_callback = std::bind(&AutowareIvAdapter::timerCallback, this); - auto period = std::chrono::duration_cast( - std::chrono::duration(1.0 / status_pub_hz_)); - timer_ = std::make_shared>( - this->get_clock(), period, std::move(timer_callback), - this->get_node_base_interface()->get_context()); - this->get_node_timers_interface()->add_timer(timer_, nullptr); -} - -void AutowareIvAdapter::emergencyParamCheck(const bool emergency_stop_param) -{ - if (!emergency_stop_param) { - RCLCPP_WARN_STREAM(get_logger(), "parameter[use_external_emergency_stop] is false."); - RCLCPP_WARN_STREAM(get_logger(), "autoware/put/emergency is not valid"); - } -} - -void AutowareIvAdapter::timerCallback() -{ - // get current pose - getCurrentPose(); - - // publish vehicle state - vehicle_state_publisher_->statePublisher(aw_info_); - - // publish autoware state - autoware_state_publisher_->statePublisher(aw_info_); - - // publish lane change state - lane_change_state_publisher_->statePublisher(aw_info_); - - // publish obstacle_avoidance state - obstacle_avoidance_state_publisher_->statePublisher(aw_info_); - - // publish pacmod door status - pub_door_status_->publish(pacmod_util::getDoorStatusMsg(aw_info_.door_state_ptr)); - - // publish v2x command and state - if (aw_info_.v2x_command_ptr) { - pub_v2x_command_->publish(*aw_info_.v2x_command_ptr); - } - if (aw_info_.v2x_state_ptr) { - pub_v2x_state_->publish(*aw_info_.v2x_state_ptr); - } -} - -void AutowareIvAdapter::callbackSteer( - const autoware_auto_vehicle_msgs::msg::SteeringReport::ConstSharedPtr msg_ptr) -{ - aw_info_.steer_ptr = msg_ptr; -} - -void AutowareIvAdapter::callbackVehicleCmd( - const autoware_auto_control_msgs::msg::AckermannControlCommand::ConstSharedPtr msg_ptr) -{ - aw_info_.vehicle_cmd_ptr = msg_ptr; -} - -void AutowareIvAdapter::callbackTurnIndicators( - const autoware_auto_vehicle_msgs::msg::TurnIndicatorsReport::ConstSharedPtr msg_ptr) -{ - aw_info_.turn_indicators_ptr = msg_ptr; -} - -void AutowareIvAdapter::callbackHazardLights( - const autoware_auto_vehicle_msgs::msg::HazardLightsReport::ConstSharedPtr msg_ptr) -{ - aw_info_.hazard_lights_ptr = msg_ptr; -} - -void AutowareIvAdapter::callbackTwist(const nav_msgs::msg::Odometry::ConstSharedPtr msg_ptr) -{ - aw_info_.odometry_ptr = msg_ptr; -} - -void AutowareIvAdapter::callbackGear( - const autoware_auto_vehicle_msgs::msg::GearReport::ConstSharedPtr msg_ptr) -{ - aw_info_.gear_ptr = msg_ptr; -} - -void AutowareIvAdapter::callbackBattery( - const tier4_vehicle_msgs::msg::BatteryStatus::ConstSharedPtr msg_ptr) -{ - aw_info_.battery_ptr = msg_ptr; -} - -void AutowareIvAdapter::callbackNavSat(const sensor_msgs::msg::NavSatFix::ConstSharedPtr msg_ptr) -{ - aw_info_.nav_sat_ptr = msg_ptr; -} - -void AutowareIvAdapter::getCurrentPose() -{ - try { - auto transform = tf_buffer_.lookupTransform("map", "base_link", tf2::TimePointZero); - geometry_msgs::msg::PoseStamped ps; - ps.header = transform.header; - ps.pose.position.x = transform.transform.translation.x; - ps.pose.position.y = transform.transform.translation.y; - ps.pose.position.z = transform.transform.translation.z; - ps.pose.orientation = transform.transform.rotation; - aw_info_.current_pose_ptr = std::make_shared(ps); - } catch (tf2::TransformException & ex) { - RCLCPP_DEBUG_STREAM_THROTTLE( - get_logger(), *this->get_clock(), 2000 /* ms */, "cannot get self pose"); - } -} - -void AutowareIvAdapter::callbackAutowareState( - const autoware_auto_system_msgs::msg::AutowareState::ConstSharedPtr msg_ptr) -{ - aw_info_.autoware_state_ptr = msg_ptr; -} -void AutowareIvAdapter::callbackControlMode( - const autoware_auto_vehicle_msgs::msg::ControlModeReport::ConstSharedPtr msg_ptr) -{ - aw_info_.control_mode_ptr = msg_ptr; -} - -void AutowareIvAdapter::callbackGateMode( - const tier4_control_msgs::msg::GateMode::ConstSharedPtr msg_ptr) -{ - aw_info_.gate_mode_ptr = msg_ptr; -} - -void AutowareIvAdapter::callbackEmergencyState( - const autoware_auto_system_msgs::msg::EmergencyState::ConstSharedPtr msg_ptr) -{ - aw_info_.emergency_state_ptr = msg_ptr; -} - -void AutowareIvAdapter::callbackHazardStatus( - const autoware_auto_system_msgs::msg::HazardStatusStamped::ConstSharedPtr msg_ptr) -{ - aw_info_.hazard_status_ptr = msg_ptr; -} - -void AutowareIvAdapter::callbackStopReason( - const tier4_planning_msgs::msg::StopReasonArray::ConstSharedPtr msg_ptr) -{ - aw_info_.stop_reason_ptr = stop_reason_aggregator_->updateStopReasonArray(msg_ptr, aw_info_); -} - -void AutowareIvAdapter::callbackV2XCommand( - const tier4_v2x_msgs::msg::InfrastructureCommandArray::ConstSharedPtr msg_ptr) -{ - aw_info_.v2x_command_ptr = v2x_aggregator_->updateV2XCommand(msg_ptr); -} - -void AutowareIvAdapter::callbackV2XState( - const tier4_v2x_msgs::msg::VirtualTrafficLightStateArray::ConstSharedPtr msg_ptr) -{ - aw_info_.v2x_state_ptr = v2x_aggregator_->updateV2XState(msg_ptr); -} - -void AutowareIvAdapter::callbackDiagnostics( - const diagnostic_msgs::msg::DiagnosticArray::ConstSharedPtr msg_ptr) -{ - aw_info_.diagnostic_ptr = msg_ptr; -} - -void AutowareIvAdapter::callbackGlobalRpt( - const pacmod3_msgs::msg::GlobalRpt::ConstSharedPtr msg_ptr) -{ - aw_info_.global_rpt_ptr = msg_ptr; -} - -void AutowareIvAdapter::callbackLaneChangeAvailable( - const tier4_planning_msgs::msg::LaneChangeStatus::ConstSharedPtr msg_ptr) -{ - aw_info_.lane_change_available_ptr = msg_ptr; -} - -void AutowareIvAdapter::callbackLaneChangeReady( - const tier4_planning_msgs::msg::LaneChangeStatus::ConstSharedPtr msg_ptr) -{ - aw_info_.lane_change_ready_ptr = msg_ptr; -} - -void AutowareIvAdapter::callbackLaneChangeCandidatePath( - const autoware_auto_planning_msgs::msg::Path::ConstSharedPtr msg_ptr) -{ - aw_info_.lane_change_candidate_ptr = msg_ptr; -} - -void AutowareIvAdapter::callbackLaneObstacleAvoidReady( - const tier4_planning_msgs::msg::IsAvoidancePossible::ConstSharedPtr msg_ptr) -{ - aw_info_.obstacle_avoid_ready_ptr = msg_ptr; -} - -void AutowareIvAdapter::callbackLaneObstacleAvoidCandidatePath( - const autoware_auto_planning_msgs::msg::Trajectory::ConstSharedPtr msg_ptr) -{ - aw_info_.obstacle_avoid_candidate_ptr = msg_ptr; -} - -void AutowareIvAdapter::callbackMaxVelocity( - const tier4_api_msgs::msg::VelocityLimit::ConstSharedPtr msg_ptr) -{ - aw_info_.max_velocity_ptr = msg_ptr; - max_velocity_publisher_->statePublisher(aw_info_); -} - -void AutowareIvAdapter::callbackCurrentMaxVelocity( - const tier4_planning_msgs::msg::VelocityLimit::ConstSharedPtr msg_ptr) -{ - aw_info_.current_max_velocity_ptr = msg_ptr; -} - -void AutowareIvAdapter::callbackTemporaryStop( - const tier4_api_msgs::msg::StopCommand::ConstSharedPtr msg_ptr) -{ - if (aw_info_.temporary_stop_ptr) { - if (aw_info_.temporary_stop_ptr->stop == msg_ptr->stop) { - // if same value as last time is sent, ignore msg. - return; - } - } - - aw_info_.temporary_stop_ptr = msg_ptr; - max_velocity_publisher_->statePublisher(aw_info_); -} - -void AutowareIvAdapter::callbackAutowareTrajectory( - const autoware_auto_planning_msgs::msg::Trajectory::ConstSharedPtr msg_ptr) -{ - aw_info_.autoware_planning_traj_ptr = msg_ptr; -} - -void AutowareIvAdapter::callbackDoorControl( - const tier4_api_msgs::msg::DoorControlCommand::ConstSharedPtr msg_ptr) -{ - pub_door_control_->publish(pacmod_util::createClearOverrideDoorCommand(this->get_clock())); - rclcpp::Rate(10.0).sleep(); // avoid message loss - pub_door_control_->publish(pacmod_util::createDoorCommand(this->get_clock(), msg_ptr)); -} - -void AutowareIvAdapter::callbackDoorStatus( - const pacmod3_msgs::msg::SystemRptInt::ConstSharedPtr msg_ptr) -{ - aw_info_.door_state_ptr = msg_ptr; -} - -} // namespace autoware_api diff --git a/awapi/awapi_awiv_adapter/src/awapi_awiv_adapter_node.cpp b/awapi/awapi_awiv_adapter/src/awapi_awiv_adapter_node.cpp deleted file mode 100644 index c3bc000bd2e4c..0000000000000 --- a/awapi/awapi_awiv_adapter/src/awapi_awiv_adapter_node.cpp +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2020 Tier IV, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "awapi_awiv_adapter/awapi_awiv_adapter_core.hpp" - -#include - -#include - -int main(int argc, char ** argv) -{ - rclcpp::init(argc, argv); - rclcpp::spin(std::make_shared()); - rclcpp::shutdown(); - - return 0; -} diff --git a/awapi/awapi_awiv_adapter/src/awapi_lane_change_state_publisher.cpp b/awapi/awapi_awiv_adapter/src/awapi_lane_change_state_publisher.cpp deleted file mode 100644 index cb74bf222417f..0000000000000 --- a/awapi/awapi_awiv_adapter/src/awapi_lane_change_state_publisher.cpp +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2020 Tier IV, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "awapi_awiv_adapter/awapi_lane_change_state_publisher.hpp" - -#include "tier4_auto_msgs_converter/tier4_auto_msgs_converter.hpp" - -namespace autoware_api -{ -AutowareIvLaneChangeStatePublisher::AutowareIvLaneChangeStatePublisher(rclcpp::Node & node) -: logger_(node.get_logger().get_child("awapi_awiv_lane_change_state_publisher")), - clock_(node.get_clock()) -{ - // publisher - pub_state_ = - node.create_publisher("output/lane_change_status", 1); -} - -void AutowareIvLaneChangeStatePublisher::statePublisher(const AutowareInfo & aw_info) -{ - tier4_api_msgs::msg::LaneChangeStatus status; - - // input header - status.header.frame_id = "base_link"; - status.header.stamp = clock_->now(); - - // get all info - getLaneChangeAvailableInfo(aw_info.lane_change_available_ptr, &status); - getLaneChangeReadyInfo(aw_info.lane_change_ready_ptr, &status); - getCandidatePathInfo(aw_info.lane_change_candidate_ptr, &status); - - // publish info - pub_state_->publish(status); -} - -void AutowareIvLaneChangeStatePublisher::getLaneChangeAvailableInfo( - const tier4_planning_msgs::msg::LaneChangeStatus::ConstSharedPtr & available_ptr, - tier4_api_msgs::msg::LaneChangeStatus * status) -{ - if (!available_ptr) { - RCLCPP_DEBUG_STREAM_THROTTLE( - logger_, *clock_, 5000 /* ms */, "lane change available is nullptr"); - return; - } - - // get lane change available info - status->force_lane_change_available = available_ptr->status; -} - -void AutowareIvLaneChangeStatePublisher::getLaneChangeReadyInfo( - const tier4_planning_msgs::msg::LaneChangeStatus::ConstSharedPtr & ready_ptr, - tier4_api_msgs::msg::LaneChangeStatus * status) -{ - if (!ready_ptr) { - RCLCPP_DEBUG_STREAM_THROTTLE(logger_, *clock_, 5000 /* ms */, "lane change ready is nullptr"); - return; - } - - // get lane change available info - status->lane_change_ready = ready_ptr->status; -} - -void AutowareIvLaneChangeStatePublisher::getCandidatePathInfo( - const autoware_auto_planning_msgs::msg::Path::ConstSharedPtr & path_ptr, - tier4_api_msgs::msg::LaneChangeStatus * status) -{ - if (!path_ptr) { - RCLCPP_DEBUG_STREAM_THROTTLE( - logger_, *clock_, 5000 /* ms */, "lane_change_candidate_path is nullptr"); - return; - } - - using tier4_auto_msgs_converter::convert; - status->candidate_path = convert(*path_ptr); -} - -} // namespace autoware_api diff --git a/awapi/awapi_awiv_adapter/src/awapi_max_velocity_publisher.cpp b/awapi/awapi_awiv_adapter/src/awapi_max_velocity_publisher.cpp deleted file mode 100644 index 0866ae2e47d97..0000000000000 --- a/awapi/awapi_awiv_adapter/src/awapi_max_velocity_publisher.cpp +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2020 Tier IV, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "awapi_awiv_adapter/awapi_max_velocity_publisher.hpp" - -namespace autoware_api -{ -AutowareIvMaxVelocityPublisher::AutowareIvMaxVelocityPublisher( - rclcpp::Node & node, const double default_max_velocity) -: default_max_velocity_(default_max_velocity) -{ - // publisher - pub_state_ = - node.create_publisher("output/max_velocity", 1); -} - -void AutowareIvMaxVelocityPublisher::statePublisher(const AutowareInfo & aw_info) -{ - tier4_planning_msgs::msg::VelocityLimit max_velocity; - if (calcMaxVelocity( - aw_info.max_velocity_ptr, aw_info.temporary_stop_ptr, - &max_velocity.max_velocity)) // publish info - { - pub_state_->publish(max_velocity); - } -} - -bool AutowareIvMaxVelocityPublisher::calcMaxVelocity( - const tier4_api_msgs::msg::VelocityLimit::ConstSharedPtr & max_velocity_ptr, - const tier4_api_msgs::msg::StopCommand::ConstSharedPtr & temporary_stop_ptr, float * max_velocity) -{ - if (!max_velocity_ptr && !temporary_stop_ptr) { - // receive no max velocity information - return false; - } - - // input max velocity - *max_velocity = - static_cast(max_velocity_ptr ? max_velocity_ptr->max_velocity : default_max_velocity_); - - if (temporary_stop_ptr && temporary_stop_ptr->stop) { - // if temporary_stop is true, max velocity is 0 - *max_velocity = static_cast(0.0); - } - - return true; -} - -} // namespace autoware_api diff --git a/awapi/awapi_awiv_adapter/src/awapi_obstacle_avoidance_state_publisher.cpp b/awapi/awapi_awiv_adapter/src/awapi_obstacle_avoidance_state_publisher.cpp deleted file mode 100644 index e877a47f18a4e..0000000000000 --- a/awapi/awapi_awiv_adapter/src/awapi_obstacle_avoidance_state_publisher.cpp +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2020 Tier IV, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "awapi_awiv_adapter/awapi_obstacle_avoidance_state_publisher.hpp" - -#include "tier4_auto_msgs_converter/tier4_auto_msgs_converter.hpp" - -namespace autoware_api -{ -AutowareIvObstacleAvoidanceStatePublisher::AutowareIvObstacleAvoidanceStatePublisher( - rclcpp::Node & node) -: logger_(node.get_logger().get_child("awapi_awiv_obstacle_avoidance_state_publisher")), - clock_(node.get_clock()) -{ - // publisher - pub_state_ = node.create_publisher( - "output/obstacle_avoid_status", 1); -} - -void AutowareIvObstacleAvoidanceStatePublisher::statePublisher(const AutowareInfo & aw_info) -{ - tier4_api_msgs::msg::ObstacleAvoidanceStatus status; - - // input header - status.header.frame_id = "base_link"; - status.header.stamp = clock_->now(); - - // get all info - getObstacleAvoidReadyInfo(aw_info.obstacle_avoid_ready_ptr, &status); - getCandidatePathInfo(aw_info.obstacle_avoid_candidate_ptr, &status); - - // publish info - pub_state_->publish(status); -} - -void AutowareIvObstacleAvoidanceStatePublisher::getObstacleAvoidReadyInfo( - const tier4_planning_msgs::msg::IsAvoidancePossible::ConstSharedPtr & ready_ptr, - tier4_api_msgs::msg::ObstacleAvoidanceStatus * status) -{ - if (!ready_ptr) { - RCLCPP_DEBUG_STREAM_THROTTLE( - logger_, *clock_, 5000 /* ms */, "obstacle_avoidance_ready is nullptr"); - return; - } - - status->obstacle_avoidance_ready = ready_ptr->is_avoidance_possible; -} - -void AutowareIvObstacleAvoidanceStatePublisher::getCandidatePathInfo( - const autoware_auto_planning_msgs::msg::Trajectory::ConstSharedPtr & path_ptr, - tier4_api_msgs::msg::ObstacleAvoidanceStatus * status) -{ - if (!path_ptr) { - RCLCPP_DEBUG_STREAM_THROTTLE( - logger_, *clock_, 5000 /* ms */, "obstacle_avoidance_candidate_path is nullptr"); - return; - } - - using tier4_auto_msgs_converter::convert; - status->candidate_path = convert(*path_ptr); -} - -} // namespace autoware_api diff --git a/awapi/awapi_awiv_adapter/src/awapi_pacmod_util.cpp b/awapi/awapi_awiv_adapter/src/awapi_pacmod_util.cpp deleted file mode 100644 index e77b55cb91b77..0000000000000 --- a/awapi/awapi_awiv_adapter/src/awapi_pacmod_util.cpp +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2020 Tier IV, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "awapi_awiv_adapter/awapi_pacmod_util.hpp" - -namespace autoware_api -{ -namespace pacmod_util -{ -tier4_api_msgs::msg::DoorStatus getDoorStatusMsg( - const pacmod3_msgs::msg::SystemRptInt::ConstSharedPtr & msg_ptr) -{ - using pacmod3_msgs::msg::SystemRptInt; - using tier4_api_msgs::msg::DoorStatus; - DoorStatus door_status; - - if (!msg_ptr) { - door_status.status = DoorStatus::NOT_APPLICABLE; - return door_status; - } - - door_status.status = DoorStatus::UNKNOWN; - - if (msg_ptr->command == SystemRptInt::DOOR_CLOSE && msg_ptr->output == SystemRptInt::DOOR_OPEN) { - // do not used (command & output are always the same value) - door_status.status = DoorStatus::DOOR_CLOSING; - } else if ( // NOLINT - msg_ptr->command == SystemRptInt::DOOR_OPEN && msg_ptr->output == SystemRptInt::DOOR_CLOSE) { - // do not used (command & output are always the same value) - door_status.status = DoorStatus::DOOR_OPENING; - } else if (msg_ptr->output == SystemRptInt::DOOR_CLOSE) { - door_status.status = DoorStatus::DOOR_CLOSED; - } else if (msg_ptr->output == SystemRptInt::DOOR_OPEN) { - door_status.status = DoorStatus::DOOR_OPENED; - } - - return door_status; -} - -pacmod3_msgs::msg::SystemCmdInt createClearOverrideDoorCommand( - const rclcpp::Clock::SharedPtr & clock) -{ - pacmod3_msgs::msg::SystemCmdInt door_cmd; - door_cmd.header.frame_id = "base_link"; - door_cmd.header.stamp = clock->now(); - door_cmd.clear_override = true; - return door_cmd; -} - -pacmod3_msgs::msg::SystemCmdInt createDoorCommand( - const rclcpp::Clock::SharedPtr & clock, - const tier4_api_msgs::msg::DoorControlCommand::ConstSharedPtr & msg_ptr) -{ - using pacmod3_msgs::msg::SystemCmdInt; - - SystemCmdInt door_cmd; - door_cmd.header.frame_id = "base_link"; - door_cmd.header.stamp = clock->now(); - door_cmd.enable = true; - door_cmd.command = SystemCmdInt::DOOR_NEUTRAL; - - if (!msg_ptr) { - return door_cmd; - } - - if (msg_ptr->open) { - door_cmd.command = SystemCmdInt::DOOR_OPEN; - } else { - door_cmd.command = SystemCmdInt::DOOR_CLOSE; - } - return door_cmd; -} - -} // namespace pacmod_util - -} // namespace autoware_api diff --git a/awapi/awapi_awiv_adapter/src/awapi_stop_reason_aggregator.cpp b/awapi/awapi_awiv_adapter/src/awapi_stop_reason_aggregator.cpp deleted file mode 100644 index a43881c7dd904..0000000000000 --- a/awapi/awapi_awiv_adapter/src/awapi_stop_reason_aggregator.cpp +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright 2020 Tier IV, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "awapi_awiv_adapter/awapi_stop_reason_aggregator.hpp" - -#include -#include - -namespace autoware_api -{ -AutowareIvStopReasonAggregator::AutowareIvStopReasonAggregator( - rclcpp::Node & node, const double timeout, const double thresh_dist_to_stop_pose) -: logger_(node.get_logger().get_child("awapi_awiv_stop_reason_aggregator")), - clock_(node.get_clock()), - timeout_(timeout), - thresh_dist_to_stop_pose_(thresh_dist_to_stop_pose) -{ -} - -tier4_planning_msgs::msg::StopReasonArray::ConstSharedPtr -AutowareIvStopReasonAggregator::updateStopReasonArray( - const tier4_planning_msgs::msg::StopReasonArray::ConstSharedPtr & msg_ptr, - const AutowareInfo & aw_info) -{ - applyUpdate(msg_ptr, aw_info); - applyTimeOut(); - return makeStopReasonArray(aw_info); -} - -void AutowareIvStopReasonAggregator::applyUpdate( - const tier4_planning_msgs::msg::StopReasonArray::ConstSharedPtr & msg_ptr, - [[maybe_unused]] const AutowareInfo & aw_info) -{ - /* remove old stop_reason that matches reason with received msg */ - // make reason-matching msg list - - std::vector remove_idx; - if (!stop_reason_array_vec_.empty()) { - for (int i = stop_reason_array_vec_.size() - 1; i >= 0; i--) { - if (checkMatchingReason(msg_ptr, stop_reason_array_vec_.at(i))) { - remove_idx.emplace_back(i); - } - } - } - - // remove reason matching msg - for (const auto idx : remove_idx) { - stop_reason_array_vec_.erase(stop_reason_array_vec_.begin() + idx); - } - - // add new reason msg - stop_reason_array_vec_.emplace_back(*msg_ptr); -} - -bool AutowareIvStopReasonAggregator::checkMatchingReason( - const tier4_planning_msgs::msg::StopReasonArray::ConstSharedPtr & msg_stop_reason_array, - const tier4_planning_msgs::msg::StopReasonArray & stop_reason_array) -{ - for (const auto & msg_stop_reason : msg_stop_reason_array->stop_reasons) { - for (const auto & stop_reason : stop_reason_array.stop_reasons) { - if (msg_stop_reason.reason == stop_reason.reason) { - // find matching reason - return true; - } - } - } - // cannot find matching reason - return false; -} - -void AutowareIvStopReasonAggregator::applyTimeOut() -{ - const auto current_time = clock_->now(); - - // make timeout-msg list - std::vector remove_idx; - if (!stop_reason_array_vec_.empty()) { - for (int i = stop_reason_array_vec_.size() - 1; i >= 0; i--) { - if ( - (current_time - rclcpp::Time(stop_reason_array_vec_.at(i).header.stamp)).seconds() > - timeout_) { - remove_idx.emplace_back(i); - } - } - } - // remove timeout-msg - for (const auto idx : remove_idx) { - stop_reason_array_vec_.erase(stop_reason_array_vec_.begin() + idx); - } -} - -void AutowareIvStopReasonAggregator::appendStopReasonToArray( - const tier4_planning_msgs::msg::StopReason & stop_reason, - tier4_planning_msgs::msg::StopReasonArray * stop_reason_array, const AutowareInfo & aw_info) -{ - // calculate dist_to_stop_pose - const auto stop_reason_with_dist = inputStopDistToStopReason(stop_reason, aw_info); - - // cut stop reason - const auto near_stop_reason = getNearStopReason(stop_reason_with_dist, aw_info); - - // if stop factors is empty, not append - if (near_stop_reason.stop_factors.empty()) { - return; - } - - // if already exists same reason msg in stop_reason_array_msg, append stop_factors to there - for (auto & base_stop_reasons : stop_reason_array->stop_reasons) { - if (base_stop_reasons.reason == near_stop_reason.reason) { - base_stop_reasons.stop_factors.insert( - base_stop_reasons.stop_factors.end(), near_stop_reason.stop_factors.begin(), - near_stop_reason.stop_factors.end()); - return; - } - } - - // if not exist same reason msg, append new stop reason - stop_reason_array->stop_reasons.emplace_back(near_stop_reason); -} - -tier4_planning_msgs::msg::StopReasonArray::ConstSharedPtr -AutowareIvStopReasonAggregator::makeStopReasonArray(const AutowareInfo & aw_info) -{ - tier4_planning_msgs::msg::StopReasonArray stop_reason_array_msg; - // input header - stop_reason_array_msg.header.frame_id = "map"; - stop_reason_array_msg.header.stamp = clock_->now(); - - // input stop reason - for (const auto & stop_reason_array : stop_reason_array_vec_) { - for (const auto & stop_reason : stop_reason_array.stop_reasons) { - appendStopReasonToArray(stop_reason, &stop_reason_array_msg, aw_info); - } - } - return std::make_shared(stop_reason_array_msg); -} - -tier4_planning_msgs::msg::StopReason AutowareIvStopReasonAggregator::inputStopDistToStopReason( - const tier4_planning_msgs::msg::StopReason & stop_reason, const AutowareInfo & aw_info) -{ - if (!aw_info.autoware_planning_traj_ptr || !aw_info.current_pose_ptr) { - // pass through all stop reason - return stop_reason; - } - - auto stop_reason_with_dist = stop_reason; - for (auto & stop_factor : stop_reason_with_dist.stop_factors) { - const auto & trajectory = *aw_info.autoware_planning_traj_ptr; - const auto & current_pose = aw_info.current_pose_ptr->pose; - stop_factor.dist_to_stop_pose = - planning_util::calcDistanceAlongTrajectory(trajectory, current_pose, stop_factor.stop_pose); - } - return stop_reason_with_dist; -} - -tier4_planning_msgs::msg::StopReason AutowareIvStopReasonAggregator::getNearStopReason( - const tier4_planning_msgs::msg::StopReason & stop_reason, const AutowareInfo & aw_info) -{ - if (!aw_info.autoware_planning_traj_ptr || !aw_info.current_pose_ptr) { - // pass through all stop reason - return stop_reason; - } - - tier4_planning_msgs::msg::StopReason near_stop_reason; - near_stop_reason.reason = stop_reason.reason; - for (const auto & stop_factor : stop_reason.stop_factors) { - if (stop_factor.dist_to_stop_pose < thresh_dist_to_stop_pose_) { - // append only near stop factor - near_stop_reason.stop_factors.emplace_back(stop_factor); - } - } - return near_stop_reason; -} - -} // namespace autoware_api diff --git a/awapi/awapi_awiv_adapter/src/awapi_v2x_aggregator.cpp b/awapi/awapi_awiv_adapter/src/awapi_v2x_aggregator.cpp deleted file mode 100644 index 174ee63aeae21..0000000000000 --- a/awapi/awapi_awiv_adapter/src/awapi_v2x_aggregator.cpp +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2021 Tier IV, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "awapi_awiv_adapter/awapi_v2x_aggregator.hpp" - -#include -#include - -namespace autoware_api -{ -namespace -{ -std::string createKey(const Command & command) { return command.type + "-" + command.id; } - -std::string createKey(const State & state) { return state.type + "-" + state.id; } -} // namespace - -AutowareIvV2XAggregator::AutowareIvV2XAggregator(rclcpp::Node & node) -: logger_(node.get_logger().get_child("awapi_awiv_v2x_aggregator")), clock_(node.get_clock()) -{ -} - -CommandArray::ConstSharedPtr AutowareIvV2XAggregator::updateV2XCommand( - const CommandArray::ConstSharedPtr & msg) -{ - // Update data - for (const auto & command : msg->commands) { - const auto key = createKey(command); - command_map_[key] = command; - } - - // Pick valid data - auto output = std::make_shared(); - output->stamp = clock_->now(); - for (const auto & [key, command] : command_map_) { - // Calculate time diff - const auto delay = (clock_->now() - command.stamp).seconds(); - - // Ignore future data considering clock's error - if (delay < -max_clock_error_sec_) { - RCLCPP_DEBUG( - logger_, "future command: delay=%f, max_clock_error=%f", delay, max_clock_error_sec_); - continue; - } - - // Ignore old data - if (delay > max_delay_sec_) { - RCLCPP_DEBUG(logger_, "old command: delay=%f, max_delay_sec=%f", delay, max_delay_sec_); - continue; - } - - output->commands.push_back(command); - } - - return output; -} - -StateArray::ConstSharedPtr AutowareIvV2XAggregator::updateV2XState( - const StateArray::ConstSharedPtr & msg) -{ - // Update data - for (const auto & state : msg->states) { - const auto key = createKey(state); - state_map_[key] = state; - } - - // Pick valid data - auto output = std::make_shared(); - output->stamp = clock_->now(); - for (const auto & [key, state] : state_map_) { - // Calculate time diff - const auto delay = (clock_->now() - state.stamp).seconds(); - - // Ignore future data considering clock's error - if (delay < -max_clock_error_sec_) { - RCLCPP_DEBUG( - logger_, "future state: delay=%f, max_clock_error=%f", delay, max_clock_error_sec_); - continue; - } - - // Ignore old data - if (delay > max_delay_sec_) { - RCLCPP_DEBUG(logger_, "old state: delay=%f, max_delay_sec=%f", delay, max_delay_sec_); - continue; - } - - output->states.push_back(state); - } - - return output; -} - -} // namespace autoware_api diff --git a/awapi/awapi_awiv_adapter/src/awapi_vehicle_state_publisher.cpp b/awapi/awapi_awiv_adapter/src/awapi_vehicle_state_publisher.cpp deleted file mode 100644 index 0de8626df6b38..0000000000000 --- a/awapi/awapi_awiv_adapter/src/awapi_vehicle_state_publisher.cpp +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright 2020 Tier IV, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "awapi_awiv_adapter/awapi_vehicle_state_publisher.hpp" - -#include "tier4_auto_msgs_converter/tier4_auto_msgs_converter.hpp" - -#include -#include - -namespace autoware_api -{ -AutowareIvVehicleStatePublisher::AutowareIvVehicleStatePublisher(rclcpp::Node & node) -: logger_(node.get_logger().get_child("awapi_awiv_vehicle_state_publisher")), - clock_(node.get_clock()), - prev_accel_(0.0) -{ - // publisher - pub_state_ = - node.create_publisher("output/vehicle_status", 1); -} - -void AutowareIvVehicleStatePublisher::statePublisher(const AutowareInfo & aw_info) -{ - tier4_api_msgs::msg::AwapiVehicleStatus status = initVehicleStatus(); - - // input header - status.header.frame_id = "base_link"; - status.header.stamp = clock_->now(); - - // get all info - getPoseInfo(aw_info.current_pose_ptr, &status); - getSteerInfo(aw_info.steer_ptr, &status); - getVehicleCmdInfo(aw_info.vehicle_cmd_ptr, &status); - getTurnSignalInfo(aw_info.turn_indicators_ptr, aw_info.hazard_lights_ptr, &status); - getTwistInfo(aw_info.odometry_ptr, &status); - getGearInfo(aw_info.gear_ptr, &status); - getBatteryInfo(aw_info.battery_ptr, &status); - getGpsInfo(aw_info.nav_sat_ptr, &status); - - // publish info - pub_state_->publish(status); -} - -tier4_api_msgs::msg::AwapiVehicleStatus AutowareIvVehicleStatePublisher::initVehicleStatus() -{ - tier4_api_msgs::msg::AwapiVehicleStatus status; - // set default value - if (std::numeric_limits::has_quiet_NaN) { - status.energy_level = std::numeric_limits::quiet_NaN(); - } - return status; -} - -void AutowareIvVehicleStatePublisher::getPoseInfo( - const std::shared_ptr & pose_ptr, - tier4_api_msgs::msg::AwapiVehicleStatus * status) -{ - if (!pose_ptr) { - RCLCPP_DEBUG_STREAM_THROTTLE(logger_, *clock_, 5000 /* ms */, "current pose is nullptr"); - return; - } - - // get pose - status->pose = pose_ptr->pose; - - // convert quaternion to euler - double yaw, pitch, roll; - tf2::getEulerYPR(pose_ptr->pose.orientation, yaw, pitch, roll); - status->eulerangle.yaw = yaw; - status->eulerangle.pitch = pitch; - status->eulerangle.roll = roll; -} - -void AutowareIvVehicleStatePublisher::getSteerInfo( - const autoware_auto_vehicle_msgs::msg::SteeringReport::ConstSharedPtr & steer_ptr, - tier4_api_msgs::msg::AwapiVehicleStatus * status) -{ - if (!steer_ptr) { - RCLCPP_DEBUG_STREAM_THROTTLE(logger_, *clock_, 5000 /* ms */, "steer is nullptr"); - return; - } - - // get steer - using tier4_auto_msgs_converter::convert; - status->steering = convert(*steer_ptr).data; - - // get steer vel - if (previous_steer_ptr_) { - // calculate steer vel from steer - const double ds = steer_ptr->steering_tire_angle - previous_steer_ptr_->steering_tire_angle; - const double dt = std::max( - (rclcpp::Time(steer_ptr->stamp) - rclcpp::Time(previous_steer_ptr_->stamp)).seconds(), 1e-03); - const double steer_vel = ds / dt; - - // apply lowpass filter - const double lowpass_steer = - lowpass_filter(steer_vel, prev_steer_vel_, steer_vel_lowpass_gain_); - prev_steer_vel_ = lowpass_steer; - status->steering_velocity = lowpass_steer; - } - previous_steer_ptr_ = steer_ptr; -} -void AutowareIvVehicleStatePublisher::getVehicleCmdInfo( - const autoware_auto_control_msgs::msg::AckermannControlCommand::ConstSharedPtr & vehicle_cmd_ptr, - tier4_api_msgs::msg::AwapiVehicleStatus * status) -{ - if (!vehicle_cmd_ptr) { - RCLCPP_DEBUG_STREAM_THROTTLE(logger_, *clock_, 5000 /* ms */, "vehicle cmd is nullptr"); - return; - } - - // get command - status->target_acceleration = vehicle_cmd_ptr->longitudinal.acceleration; - status->target_velocity = vehicle_cmd_ptr->longitudinal.speed; - status->target_steering = vehicle_cmd_ptr->lateral.steering_tire_angle; - status->target_steering_velocity = vehicle_cmd_ptr->lateral.steering_tire_rotation_rate; -} - -void AutowareIvVehicleStatePublisher::getTurnSignalInfo( - const autoware_auto_vehicle_msgs::msg::TurnIndicatorsReport::ConstSharedPtr & turn_indicators_ptr, - const autoware_auto_vehicle_msgs::msg::HazardLightsReport::ConstSharedPtr & hazard_lights_ptr, - tier4_api_msgs::msg::AwapiVehicleStatus * status) -{ - if (!turn_indicators_ptr) { - RCLCPP_DEBUG_STREAM_THROTTLE(logger_, *clock_, 5000 /* ms */, "turn indicators is nullptr"); - return; - } - - if (!hazard_lights_ptr) { - RCLCPP_DEBUG_STREAM_THROTTLE(logger_, *clock_, 5000 /* ms */, "hazard lights is nullptr"); - return; - } - - // get turn signal - using tier4_auto_msgs_converter::convert; - status->turn_signal = convert(*turn_indicators_ptr, *hazard_lights_ptr).data; -} - -void AutowareIvVehicleStatePublisher::getTwistInfo( - const nav_msgs::msg::Odometry::ConstSharedPtr & odometry_ptr, - tier4_api_msgs::msg::AwapiVehicleStatus * status) -{ - if (!odometry_ptr) { - RCLCPP_DEBUG_STREAM_THROTTLE(logger_, *clock_, 5000 /* ms */, "odometry is nullptr"); - return; - } - - // get twist - status->velocity = odometry_ptr->twist.twist.linear.x; - status->angular_velocity = odometry_ptr->twist.twist.angular.z; - - // get accel - if (previous_odometry_ptr_) { - // calculate acceleration from velocity - const double dv = - odometry_ptr->twist.twist.linear.x - previous_odometry_ptr_->twist.twist.linear.x; - const double dt = std::max( - (rclcpp::Time(odometry_ptr->header.stamp) - - rclcpp::Time(previous_odometry_ptr_->header.stamp)) - .seconds(), - 1e-03); - const double accel = dv / dt; - - // apply lowpass filter - const double lowpass_accel = lowpass_filter(accel, prev_accel_, accel_lowpass_gain_); - prev_accel_ = lowpass_accel; - status->acceleration = lowpass_accel; - } - previous_odometry_ptr_ = odometry_ptr; -} - -void AutowareIvVehicleStatePublisher::getGearInfo( - const autoware_auto_vehicle_msgs::msg::GearReport::ConstSharedPtr & gear_ptr, - tier4_api_msgs::msg::AwapiVehicleStatus * status) -{ - if (!gear_ptr) { - RCLCPP_DEBUG_STREAM_THROTTLE(logger_, *clock_, 5000 /* ms */, "gear is nullptr"); - return; - } - - // get gear (shift) - using tier4_auto_msgs_converter::convert; - status->gear = convert(*gear_ptr).shift.data; -} - -void AutowareIvVehicleStatePublisher::getBatteryInfo( - const tier4_vehicle_msgs::msg::BatteryStatus::ConstSharedPtr & battery_ptr, - tier4_api_msgs::msg::AwapiVehicleStatus * status) -{ - if (!battery_ptr) { - RCLCPP_DEBUG_STREAM_THROTTLE(logger_, *clock_, 5000 /* ms */, "battery is nullptr"); - return; - } - - // get battery - status->energy_level = battery_ptr->energy_level; -} - -void AutowareIvVehicleStatePublisher::getGpsInfo( - const sensor_msgs::msg::NavSatFix::ConstSharedPtr & nav_sat_ptr, - tier4_api_msgs::msg::AwapiVehicleStatus * status) -{ - if (!nav_sat_ptr) { - RCLCPP_DEBUG_STREAM_THROTTLE(logger_, *clock_, 5000 /* ms */, "nav_sat(gps) is nullptr"); - return; - } - - // get geo_point - status->geo_point.latitude = nav_sat_ptr->latitude; - status->geo_point.longitude = nav_sat_ptr->longitude; - status->geo_point.altitude = nav_sat_ptr->altitude; -} - -} // namespace autoware_api diff --git a/messages/LICENSE b/messages/LICENSE deleted file mode 100644 index 261eeb9e9f8b2..0000000000000 --- a/messages/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/messages/README.md b/messages/README.md deleted file mode 100644 index eef76f4b5800d..0000000000000 --- a/messages/README.md +++ /dev/null @@ -1 +0,0 @@ -# tier4_autoware_msgs diff --git a/messages/tier4_api_msgs/CMakeLists.txt b/messages/tier4_api_msgs/CMakeLists.txt deleted file mode 100644 index 21ed9254e0582..0000000000000 --- a/messages/tier4_api_msgs/CMakeLists.txt +++ /dev/null @@ -1,43 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(tier4_api_msgs) - -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) -endif() - -find_package(ament_cmake_auto REQUIRED) -ament_auto_find_build_dependencies() - -rosidl_generate_interfaces(${PROJECT_NAME} - "msg/AwapiAutowareStatus.msg" - "msg/AwapiVehicleStatus.msg" - "msg/CrosswalkStatus.msg" - "msg/DoorControlCommand.msg" - "msg/DoorStatus.msg" - "msg/Euler.msg" - "msg/IntersectionStatus.msg" - "msg/LaneChangeStatus.msg" - "msg/ObstacleAvoidanceStatus.msg" - "msg/StopCommand.msg" - "msg/VelocityLimit.msg" - DEPENDENCIES - tier4_planning_msgs - tier4_system_msgs - diagnostic_msgs - geographic_msgs - geometry_msgs - std_msgs -) - -if(BUILD_TESTING) - find_package(ament_lint_auto REQUIRED) - ament_lint_auto_find_test_dependencies() -endif() - -ament_auto_package() diff --git a/messages/tier4_api_msgs/msg/AwapiAutowareStatus.msg b/messages/tier4_api_msgs/msg/AwapiAutowareStatus.msg deleted file mode 100644 index f141467d1993c..0000000000000 --- a/messages/tier4_api_msgs/msg/AwapiAutowareStatus.msg +++ /dev/null @@ -1,12 +0,0 @@ -std_msgs/Header header -string autoware_state -int32 control_mode -int32 gate_mode -bool emergency_stopped -float32 current_max_velocity -tier4_system_msgs/HazardStatusStamped hazard_status -tier4_planning_msgs/StopReasonArray stop_reason -diagnostic_msgs/DiagnosticStatus[] diagnostics -diagnostic_msgs/DiagnosticStatus[] error_diagnostics -bool autonomous_overridden -bool arrived_goal diff --git a/messages/tier4_api_msgs/msg/AwapiVehicleStatus.msg b/messages/tier4_api_msgs/msg/AwapiVehicleStatus.msg deleted file mode 100644 index 9c33cd55ccb85..0000000000000 --- a/messages/tier4_api_msgs/msg/AwapiVehicleStatus.msg +++ /dev/null @@ -1,16 +0,0 @@ -std_msgs/Header header -geometry_msgs/Pose pose -tier4_api_msgs/Euler eulerangle -geographic_msgs/GeoPoint geo_point -float64 velocity -float64 acceleration -float64 steering -float64 steering_velocity -float64 angular_velocity -int32 gear -float32 energy_level -int32 turn_signal -float64 target_velocity -float64 target_acceleration -float64 target_steering -float64 target_steering_velocity diff --git a/messages/tier4_api_msgs/msg/CrosswalkStatus.msg b/messages/tier4_api_msgs/msg/CrosswalkStatus.msg deleted file mode 100644 index 8776f80fe08fb..0000000000000 --- a/messages/tier4_api_msgs/msg/CrosswalkStatus.msg +++ /dev/null @@ -1,6 +0,0 @@ -std_msgs/Header header -int32 status - -int32 STOP = 0 -int32 GO = 1 -int32 SLOWDOWN = 2 diff --git a/messages/tier4_api_msgs/msg/DoorControlCommand.msg b/messages/tier4_api_msgs/msg/DoorControlCommand.msg deleted file mode 100644 index e9e6407d486d3..0000000000000 --- a/messages/tier4_api_msgs/msg/DoorControlCommand.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -bool open diff --git a/messages/tier4_api_msgs/msg/DoorStatus.msg b/messages/tier4_api_msgs/msg/DoorStatus.msg deleted file mode 100644 index 07faf2fedf48b..0000000000000 --- a/messages/tier4_api_msgs/msg/DoorStatus.msg +++ /dev/null @@ -1,8 +0,0 @@ -int32 status - -int32 UNKNOWN = 0 -int32 DOOR_OPENED = 1 -int32 DOOR_CLOSED = 2 -int32 DOOR_OPENING = 3 -int32 DOOR_CLOSING = 4 -int32 NOT_APPLICABLE = 5 diff --git a/messages/tier4_api_msgs/msg/Euler.msg b/messages/tier4_api_msgs/msg/Euler.msg deleted file mode 100644 index c963632f3dafe..0000000000000 --- a/messages/tier4_api_msgs/msg/Euler.msg +++ /dev/null @@ -1,3 +0,0 @@ -float64 roll -float64 pitch -float64 yaw diff --git a/messages/tier4_api_msgs/msg/IntersectionStatus.msg b/messages/tier4_api_msgs/msg/IntersectionStatus.msg deleted file mode 100644 index b4b8e5297e08b..0000000000000 --- a/messages/tier4_api_msgs/msg/IntersectionStatus.msg +++ /dev/null @@ -1,5 +0,0 @@ -std_msgs/Header header -int32 status - -int32 STOP = 0 -int32 GO = 1 diff --git a/messages/tier4_api_msgs/msg/LaneChangeStatus.msg b/messages/tier4_api_msgs/msg/LaneChangeStatus.msg deleted file mode 100644 index 32d794d3ac303..0000000000000 --- a/messages/tier4_api_msgs/msg/LaneChangeStatus.msg +++ /dev/null @@ -1,4 +0,0 @@ -std_msgs/Header header -bool force_lane_change_available -bool lane_change_ready -tier4_planning_msgs/Path candidate_path diff --git a/messages/tier4_api_msgs/msg/ObstacleAvoidanceStatus.msg b/messages/tier4_api_msgs/msg/ObstacleAvoidanceStatus.msg deleted file mode 100644 index 722abcb709f47..0000000000000 --- a/messages/tier4_api_msgs/msg/ObstacleAvoidanceStatus.msg +++ /dev/null @@ -1,3 +0,0 @@ -std_msgs/Header header -bool obstacle_avoidance_ready -tier4_planning_msgs/Trajectory candidate_path diff --git a/messages/tier4_api_msgs/msg/StopCommand.msg b/messages/tier4_api_msgs/msg/StopCommand.msg deleted file mode 100644 index 9b5a475ba0a07..0000000000000 --- a/messages/tier4_api_msgs/msg/StopCommand.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -bool stop diff --git a/messages/tier4_api_msgs/msg/VelocityLimit.msg b/messages/tier4_api_msgs/msg/VelocityLimit.msg deleted file mode 100644 index 4dd98674d858b..0000000000000 --- a/messages/tier4_api_msgs/msg/VelocityLimit.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -float32 max_velocity diff --git a/messages/tier4_api_msgs/package.xml b/messages/tier4_api_msgs/package.xml deleted file mode 100644 index 64687442f06d3..0000000000000 --- a/messages/tier4_api_msgs/package.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - tier4_api_msgs - 0.1.0 - The tier4_api_msgs package - Tomoya Kimura - Apache License 2.0 - - Tomoya Kimura - - ament_cmake_auto - - rosidl_default_generators - - diagnostic_msgs - geographic_msgs - geometry_msgs - std_msgs - tier4_planning_msgs - tier4_system_msgs - - rosidl_default_runtime - - ament_lint_auto - ament_lint_common - - rosidl_interface_packages - - - ament_cmake - - diff --git a/messages/tier4_auto_msgs_converter/CMakeLists.txt b/messages/tier4_auto_msgs_converter/CMakeLists.txt deleted file mode 100644 index 6c4c8bbd768c8..0000000000000 --- a/messages/tier4_auto_msgs_converter/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(tier4_auto_msgs_converter) - -if(NOT CMAKE_CXX_STANDARD) - set(CMAKE_CXX_STANDARD 17) - 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() - -find_package(ament_cmake_auto REQUIRED) -ament_auto_find_build_dependencies() - -if(BUILD_TESTING) - find_package(ament_lint_auto REQUIRED) - ament_lint_auto_find_test_dependencies() -endif() - -ament_auto_package() diff --git a/messages/tier4_auto_msgs_converter/include/tier4_auto_msgs_converter/tier4_auto_msgs_converter.hpp b/messages/tier4_auto_msgs_converter/include/tier4_auto_msgs_converter/tier4_auto_msgs_converter.hpp deleted file mode 100644 index 422623d368535..0000000000000 --- a/messages/tier4_auto_msgs_converter/include/tier4_auto_msgs_converter/tier4_auto_msgs_converter.hpp +++ /dev/null @@ -1,281 +0,0 @@ -// Copyright 2021 Tier IV, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef TIER4_AUTO_MSGS_CONVERTER__TIER4_AUTO_MSGS_CONVERTER_HPP_ -#define TIER4_AUTO_MSGS_CONVERTER__TIER4_AUTO_MSGS_CONVERTER_HPP_ - -#include "autoware_auto_planning_msgs/msg/path.hpp" -#include "autoware_auto_planning_msgs/msg/trajectory.hpp" -#include "autoware_auto_system_msgs/msg/autoware_state.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/gear_report.hpp" -#include "autoware_auto_vehicle_msgs/msg/hazard_lights_command.hpp" -#include "autoware_auto_vehicle_msgs/msg/hazard_lights_report.hpp" -#include "autoware_auto_vehicle_msgs/msg/steering_report.hpp" -#include "autoware_auto_vehicle_msgs/msg/turn_indicators_command.hpp" -#include "autoware_auto_vehicle_msgs/msg/turn_indicators_report.hpp" -#include "tier4_external_api_msgs/msg/gear_shift_stamped.hpp" -#include "tier4_external_api_msgs/msg/turn_signal_stamped.hpp" -#include "tier4_planning_msgs/msg/path.hpp" -#include "tier4_planning_msgs/msg/trajectory.hpp" -#include "tier4_system_msgs/msg/autoware_state.hpp" -#include "tier4_system_msgs/msg/hazard_status_stamped.hpp" -#include "tier4_vehicle_msgs/msg/control_mode.hpp" -#include "tier4_vehicle_msgs/msg/shift_stamped.hpp" -#include "tier4_vehicle_msgs/msg/steering.hpp" -#include "tier4_vehicle_msgs/msg/turn_signal.hpp" - -namespace tier4_auto_msgs_converter -{ -struct LightSignal -{ - autoware_auto_vehicle_msgs::msg::TurnIndicatorsCommand turn_signal; - autoware_auto_vehicle_msgs::msg::HazardLightsCommand hazard_signal; -}; - -inline auto convert(const autoware_auto_system_msgs::msg::AutowareState & state) -{ - tier4_system_msgs::msg::AutowareState iv_state; - switch (state.state) { - case autoware_auto_system_msgs::msg::AutowareState::INITIALIZING: - iv_state.state = tier4_system_msgs::msg::AutowareState::INITIALIZING_VEHICLE; - break; - case autoware_auto_system_msgs::msg::AutowareState::WAITING_FOR_ROUTE: - iv_state.state = tier4_system_msgs::msg::AutowareState::WAITING_FOR_ROUTE; - break; - case autoware_auto_system_msgs::msg::AutowareState::PLANNING: - iv_state.state = tier4_system_msgs::msg::AutowareState::PLANNING; - break; - case autoware_auto_system_msgs::msg::AutowareState::WAITING_FOR_ENGAGE: - iv_state.state = tier4_system_msgs::msg::AutowareState::WAITING_FOR_ENGAGE; - break; - case autoware_auto_system_msgs::msg::AutowareState::DRIVING: - iv_state.state = tier4_system_msgs::msg::AutowareState::DRIVING; - break; - case autoware_auto_system_msgs::msg::AutowareState::ARRIVED_GOAL: - iv_state.state = tier4_system_msgs::msg::AutowareState::ARRIVAL_GOAL; - break; - case autoware_auto_system_msgs::msg::AutowareState::FINALIZING: - iv_state.state = tier4_system_msgs::msg::AutowareState::FINALIZING; - break; - } - return iv_state; -} - -inline auto convert(const autoware_auto_system_msgs::msg::HazardStatusStamped & status) -{ - tier4_system_msgs::msg::HazardStatusStamped iv_status; - iv_status.header.stamp = status.stamp; - iv_status.status.level = status.status.level; - iv_status.status.emergency = status.status.emergency; - iv_status.status.emergency_holding = status.status.emergency_holding; - iv_status.status.diagnostics_nf = status.status.diag_no_fault; - iv_status.status.diagnostics_sf = status.status.diag_safe_fault; - iv_status.status.diagnostics_lf = status.status.diag_latent_fault; - iv_status.status.diagnostics_spf = status.status.diag_single_point_fault; - return iv_status; -} - -inline auto convert(const autoware_auto_planning_msgs::msg::Path & path) -{ - tier4_planning_msgs::msg::Path iv_path; - iv_path.header = path.header; - iv_path.drivable_area = path.drivable_area; - iv_path.points.reserve(path.points.size()); - for (const auto point : path.points) { - tier4_planning_msgs::msg::PathPoint iv_point; - iv_point.pose = point.pose; - iv_point.twist.linear.x = point.longitudinal_velocity_mps; - iv_point.twist.linear.y = point.lateral_velocity_mps; - iv_point.twist.angular.z = point.heading_rate_rps; - iv_point.type = 0; // not used - iv_path.points.push_back(iv_point); - } - return iv_path; -} - -inline auto convert(const autoware_auto_planning_msgs::msg::Trajectory & traj) -{ - tier4_planning_msgs::msg::Trajectory iv_traj; - iv_traj.header = traj.header; - iv_traj.points.reserve(traj.points.size()); - for (const auto point : traj.points) { - tier4_planning_msgs::msg::TrajectoryPoint iv_point; - iv_point.pose = point.pose; - iv_point.accel.linear.x = point.acceleration_mps2; - iv_point.twist.linear.x = point.longitudinal_velocity_mps; - iv_point.twist.linear.y = point.lateral_velocity_mps; - iv_point.twist.angular.z = point.heading_rate_rps; - iv_traj.points.push_back(iv_point); - } - return iv_traj; -} - -inline auto convert(const autoware_auto_vehicle_msgs::msg::ControlModeReport & mode) -{ - tier4_vehicle_msgs::msg::ControlMode iv_mode; - iv_mode.header.stamp = mode.stamp; - switch (mode.mode) { - case autoware_auto_vehicle_msgs::msg::ControlModeReport::MANUAL: - iv_mode.data = tier4_vehicle_msgs::msg::ControlMode::MANUAL; - break; - case autoware_auto_vehicle_msgs::msg::ControlModeReport::AUTONOMOUS: - iv_mode.data = tier4_vehicle_msgs::msg::ControlMode::AUTO; - break; - default: - iv_mode.data = tier4_vehicle_msgs::msg::ControlMode::MANUAL; - break; - } - return iv_mode; -} - -inline auto convert(const autoware_auto_vehicle_msgs::msg::GearReport & gear) -{ - tier4_vehicle_msgs::msg::ShiftStamped iv_shift; - iv_shift.header.stamp = gear.stamp; - switch (gear.report) { - case autoware_auto_vehicle_msgs::msg::GearReport::PARK: - iv_shift.shift.data = tier4_vehicle_msgs::msg::Shift::PARKING; - break; - case autoware_auto_vehicle_msgs::msg::GearReport::REVERSE: - case autoware_auto_vehicle_msgs::msg::GearReport::REVERSE_2: - iv_shift.shift.data = tier4_vehicle_msgs::msg::Shift::REVERSE; - break; - case autoware_auto_vehicle_msgs::msg::GearReport::DRIVE: - case autoware_auto_vehicle_msgs::msg::GearReport::DRIVE_2: - case autoware_auto_vehicle_msgs::msg::GearReport::DRIVE_3: - case autoware_auto_vehicle_msgs::msg::GearReport::DRIVE_4: - case autoware_auto_vehicle_msgs::msg::GearReport::DRIVE_5: - case autoware_auto_vehicle_msgs::msg::GearReport::DRIVE_6: - case autoware_auto_vehicle_msgs::msg::GearReport::DRIVE_7: - case autoware_auto_vehicle_msgs::msg::GearReport::DRIVE_8: - case autoware_auto_vehicle_msgs::msg::GearReport::DRIVE_9: - case autoware_auto_vehicle_msgs::msg::GearReport::DRIVE_10: - case autoware_auto_vehicle_msgs::msg::GearReport::DRIVE_11: - case autoware_auto_vehicle_msgs::msg::GearReport::DRIVE_12: - case autoware_auto_vehicle_msgs::msg::GearReport::DRIVE_13: - case autoware_auto_vehicle_msgs::msg::GearReport::DRIVE_14: - case autoware_auto_vehicle_msgs::msg::GearReport::DRIVE_15: - case autoware_auto_vehicle_msgs::msg::GearReport::DRIVE_16: - case autoware_auto_vehicle_msgs::msg::GearReport::DRIVE_17: - case autoware_auto_vehicle_msgs::msg::GearReport::DRIVE_18: - iv_shift.shift.data = tier4_vehicle_msgs::msg::Shift::DRIVE; - break; - case autoware_auto_vehicle_msgs::msg::GearReport::LOW: - case autoware_auto_vehicle_msgs::msg::GearReport::LOW_2: - iv_shift.shift.data = tier4_vehicle_msgs::msg::Shift::LOW; - break; - default: - iv_shift.shift.data = tier4_vehicle_msgs::msg::Shift::NONE; - break; - } - return iv_shift; -} - -inline auto convert(const tier4_external_api_msgs::msg::GearShiftStamped & shift) -{ - autoware_auto_vehicle_msgs::msg::GearCommand auto_gear; - auto_gear.stamp = shift.stamp; - switch (shift.gear_shift.data) { - case tier4_external_api_msgs::msg::GearShift::PARKING: - auto_gear.command = autoware_auto_vehicle_msgs::msg::GearCommand::PARK; - break; - case tier4_external_api_msgs::msg::GearShift::REVERSE: - auto_gear.command = autoware_auto_vehicle_msgs::msg::GearCommand::REVERSE; - break; - case tier4_external_api_msgs::msg::GearShift::DRIVE: - auto_gear.command = autoware_auto_vehicle_msgs::msg::GearCommand::DRIVE; - break; - case tier4_external_api_msgs::msg::GearShift::LOW: - auto_gear.command = autoware_auto_vehicle_msgs::msg::GearCommand::LOW; - break; - default: - constexpr int default_val = 0; - auto_gear.command = default_val; - break; - } - return auto_gear; -} - -inline auto convert( - const autoware_auto_vehicle_msgs::msg::TurnIndicatorsReport & turn_indicators, - const autoware_auto_vehicle_msgs::msg::HazardLightsReport & hazard_lights) -{ - tier4_vehicle_msgs::msg::TurnSignal iv_turn_signal; - - if (hazard_lights.report == autoware_auto_vehicle_msgs::msg::HazardLightsReport::ENABLE) { - iv_turn_signal.header.stamp = hazard_lights.stamp; - iv_turn_signal.data = tier4_vehicle_msgs::msg::TurnSignal::HAZARD; - return iv_turn_signal; - } - - iv_turn_signal.header.stamp = turn_indicators.stamp; - switch (turn_indicators.report) { - case autoware_auto_vehicle_msgs::msg::TurnIndicatorsReport::ENABLE_LEFT: - iv_turn_signal.data = tier4_vehicle_msgs::msg::TurnSignal::LEFT; - break; - case autoware_auto_vehicle_msgs::msg::TurnIndicatorsReport::ENABLE_RIGHT: - iv_turn_signal.data = tier4_vehicle_msgs::msg::TurnSignal::RIGHT; - break; - default: - iv_turn_signal.data = tier4_vehicle_msgs::msg::TurnSignal::NONE; - break; - } - return iv_turn_signal; -} - -inline auto convert(const tier4_external_api_msgs::msg::TurnSignalStamped & in_signal) -{ - autoware_auto_vehicle_msgs::msg::HazardLightsCommand hazard; - hazard.stamp = in_signal.stamp; - autoware_auto_vehicle_msgs::msg::TurnIndicatorsCommand turn; - turn.stamp = in_signal.stamp; - - switch (in_signal.turn_signal.data) { - case tier4_vehicle_msgs::msg::TurnSignal::HAZARD: - hazard.command = autoware_auto_vehicle_msgs::msg::HazardLightsCommand::ENABLE; - turn.command = autoware_auto_vehicle_msgs::msg::TurnIndicatorsCommand::DISABLE; - break; - case tier4_vehicle_msgs::msg::TurnSignal::LEFT: - hazard.command = autoware_auto_vehicle_msgs::msg::HazardLightsCommand::DISABLE; - turn.command = autoware_auto_vehicle_msgs::msg::TurnIndicatorsCommand::ENABLE_LEFT; - break; - case tier4_vehicle_msgs::msg::TurnSignal::RIGHT: - hazard.command = autoware_auto_vehicle_msgs::msg::HazardLightsCommand::DISABLE; - turn.command = autoware_auto_vehicle_msgs::msg::TurnIndicatorsCommand::ENABLE_RIGHT; - break; - default: - hazard.command = autoware_auto_vehicle_msgs::msg::HazardLightsCommand::DISABLE; - turn.command = autoware_auto_vehicle_msgs::msg::TurnIndicatorsCommand::DISABLE; - } - - LightSignal light_signal; - light_signal.turn_signal = turn; - light_signal.hazard_signal = hazard; - return light_signal; -} - -inline auto convert(const autoware_auto_vehicle_msgs::msg::SteeringReport & steering) -{ - tier4_vehicle_msgs::msg::Steering iv_steering; - iv_steering.header.stamp = steering.stamp; - iv_steering.data = steering.steering_tire_angle; - return iv_steering; -} - -} // namespace tier4_auto_msgs_converter - -#endif // TIER4_AUTO_MSGS_CONVERTER__TIER4_AUTO_MSGS_CONVERTER_HPP_ diff --git a/messages/tier4_auto_msgs_converter/package.xml b/messages/tier4_auto_msgs_converter/package.xml deleted file mode 100644 index 5058c429189e2..0000000000000 --- a/messages/tier4_auto_msgs_converter/package.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - tier4_auto_msgs_converter - 0.0.0 - The tier4_auto_msgs_converter package - Takagi, Isamu - Apache License 2.0 - - ament_cmake_auto - - autoware_auto_planning_msgs - autoware_auto_system_msgs - autoware_auto_vehicle_msgs - tier4_planning_msgs - tier4_system_msgs - tier4_vehicle_msgs - - ament_lint_auto - - - ament_cmake - - - diff --git a/messages/tier4_control_msgs/CMakeLists.txt b/messages/tier4_control_msgs/CMakeLists.txt deleted file mode 100644 index efbb821c929f9..0000000000000 --- a/messages/tier4_control_msgs/CMakeLists.txt +++ /dev/null @@ -1,30 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(tier4_control_msgs) - -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) -endif() - -find_package(ament_cmake_auto REQUIRED) -ament_auto_find_build_dependencies() - -rosidl_generate_interfaces(${PROJECT_NAME} - "msg/GateMode.msg" - "msg/ExternalCommandSelectorMode.msg" - "srv/ExternalCommandSelect.srv" - DEPENDENCIES - std_msgs -) - -if(BUILD_TESTING) - find_package(ament_lint_auto REQUIRED) - ament_lint_auto_find_test_dependencies() -endif() - -ament_auto_package() diff --git a/messages/tier4_control_msgs/msg/ExternalCommandSelectorMode.msg b/messages/tier4_control_msgs/msg/ExternalCommandSelectorMode.msg deleted file mode 100644 index 8ae85ca271ad6..0000000000000 --- a/messages/tier4_control_msgs/msg/ExternalCommandSelectorMode.msg +++ /dev/null @@ -1,4 +0,0 @@ -uint8 NONE=0 -uint8 LOCAL=101 # TODO(Takagi, Isamu): temporary value to check data specified by magic number for migration -uint8 REMOTE=102 # TODO(Takagi, Isamu): temporary value to check data specified by magic number for migration -uint8 data diff --git a/messages/tier4_control_msgs/msg/GateMode.msg b/messages/tier4_control_msgs/msg/GateMode.msg deleted file mode 100644 index d3f8dbeae2a77..0000000000000 --- a/messages/tier4_control_msgs/msg/GateMode.msg +++ /dev/null @@ -1,3 +0,0 @@ -uint8 AUTO = 0 -uint8 EXTERNAL = 1 -uint8 data diff --git a/messages/tier4_control_msgs/package.xml b/messages/tier4_control_msgs/package.xml deleted file mode 100644 index 5a0eaa784be1b..0000000000000 --- a/messages/tier4_control_msgs/package.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - tier4_control_msgs - 0.1.0 - The tier4_control_msgs package - Takamasa Horibe - Apache License 2.0 - - ament_cmake_auto - - rosidl_default_generators - - std_msgs - - rosidl_default_runtime - - ament_lint_auto - ament_lint_common - - rosidl_interface_packages - - - ament_cmake - - diff --git a/messages/tier4_control_msgs/srv/ExternalCommandSelect.srv b/messages/tier4_control_msgs/srv/ExternalCommandSelect.srv deleted file mode 100644 index 478ae1d6486f5..0000000000000 --- a/messages/tier4_control_msgs/srv/ExternalCommandSelect.srv +++ /dev/null @@ -1,4 +0,0 @@ -tier4_control_msgs/ExternalCommandSelectorMode mode ---- -bool success # indicate successful run of triggered service -string message # informational, e.g. for error messages diff --git a/messages/tier4_debug_msgs/CMakeLists.txt b/messages/tier4_debug_msgs/CMakeLists.txt deleted file mode 100644 index e08adfdfb24cf..0000000000000 --- a/messages/tier4_debug_msgs/CMakeLists.txt +++ /dev/null @@ -1,39 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(tier4_debug_msgs) - -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) -endif() - -find_package(ament_cmake_auto REQUIRED) -ament_auto_find_build_dependencies() - -rosidl_generate_interfaces(${PROJECT_NAME} - "msg/MultiArrayDimension.msg" - "msg/MultiArrayLayout.msg" - "msg/BoolStamped.msg" - "msg/Float32Stamped.msg" - "msg/Float32MultiArrayStamped.msg" - "msg/Float64Stamped.msg" - "msg/Float64MultiArrayStamped.msg" - "msg/Int32Stamped.msg" - "msg/Int32MultiArrayStamped.msg" - "msg/Int64Stamped.msg" - "msg/Int64MultiArrayStamped.msg" - "msg/StringStamped.msg" - DEPENDENCIES - builtin_interfaces -) - -if(BUILD_TESTING) - find_package(ament_lint_auto REQUIRED) - ament_lint_auto_find_test_dependencies() -endif() - -ament_auto_package() diff --git a/messages/tier4_debug_msgs/msg/BoolStamped.msg b/messages/tier4_debug_msgs/msg/BoolStamped.msg deleted file mode 100644 index edb7a413edd99..0000000000000 --- a/messages/tier4_debug_msgs/msg/BoolStamped.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -bool data diff --git a/messages/tier4_debug_msgs/msg/Float32MultiArrayStamped.msg b/messages/tier4_debug_msgs/msg/Float32MultiArrayStamped.msg deleted file mode 100644 index fee16cc472ff5..0000000000000 --- a/messages/tier4_debug_msgs/msg/Float32MultiArrayStamped.msg +++ /dev/null @@ -1,3 +0,0 @@ -builtin_interfaces/Time stamp -tier4_debug_msgs/MultiArrayLayout layout -float32[] data diff --git a/messages/tier4_debug_msgs/msg/Float32Stamped.msg b/messages/tier4_debug_msgs/msg/Float32Stamped.msg deleted file mode 100644 index 8d02ab5282df9..0000000000000 --- a/messages/tier4_debug_msgs/msg/Float32Stamped.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -float32 data diff --git a/messages/tier4_debug_msgs/msg/Float64MultiArrayStamped.msg b/messages/tier4_debug_msgs/msg/Float64MultiArrayStamped.msg deleted file mode 100644 index 1019593699790..0000000000000 --- a/messages/tier4_debug_msgs/msg/Float64MultiArrayStamped.msg +++ /dev/null @@ -1,3 +0,0 @@ -builtin_interfaces/Time stamp -tier4_debug_msgs/MultiArrayLayout layout -float64[] data diff --git a/messages/tier4_debug_msgs/msg/Float64Stamped.msg b/messages/tier4_debug_msgs/msg/Float64Stamped.msg deleted file mode 100644 index 97a9447eed094..0000000000000 --- a/messages/tier4_debug_msgs/msg/Float64Stamped.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -float64 data diff --git a/messages/tier4_debug_msgs/msg/Int32MultiArrayStamped.msg b/messages/tier4_debug_msgs/msg/Int32MultiArrayStamped.msg deleted file mode 100644 index ce74accf612cb..0000000000000 --- a/messages/tier4_debug_msgs/msg/Int32MultiArrayStamped.msg +++ /dev/null @@ -1,3 +0,0 @@ -builtin_interfaces/Time stamp -tier4_debug_msgs/MultiArrayLayout layout -int32[] data diff --git a/messages/tier4_debug_msgs/msg/Int32Stamped.msg b/messages/tier4_debug_msgs/msg/Int32Stamped.msg deleted file mode 100644 index 0d548772eea06..0000000000000 --- a/messages/tier4_debug_msgs/msg/Int32Stamped.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -int32 data diff --git a/messages/tier4_debug_msgs/msg/Int64MultiArrayStamped.msg b/messages/tier4_debug_msgs/msg/Int64MultiArrayStamped.msg deleted file mode 100644 index 9e83ab9a71b51..0000000000000 --- a/messages/tier4_debug_msgs/msg/Int64MultiArrayStamped.msg +++ /dev/null @@ -1,3 +0,0 @@ -builtin_interfaces/Time stamp -tier4_debug_msgs/MultiArrayLayout layout -int64[] data diff --git a/messages/tier4_debug_msgs/msg/Int64Stamped.msg b/messages/tier4_debug_msgs/msg/Int64Stamped.msg deleted file mode 100644 index 917edfff7b1bf..0000000000000 --- a/messages/tier4_debug_msgs/msg/Int64Stamped.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -int64 data diff --git a/messages/tier4_debug_msgs/msg/MultiArrayDimension.msg b/messages/tier4_debug_msgs/msg/MultiArrayDimension.msg deleted file mode 100644 index 05bb4d867a21a..0000000000000 --- a/messages/tier4_debug_msgs/msg/MultiArrayDimension.msg +++ /dev/null @@ -1,11 +0,0 @@ -# This is from ros2 common_interfaces. -# https://github.com/ros2/common_interfaces/blob/master/std_msgs/msg/MultiArrayDimension.msg - -# This was originally provided as an example message. -# It is deprecated as of Foxy -# It is recommended to create your own semantically meaningful message. -# However if you would like to continue using this please use the equivalent in example_msgs. - -string label # label of given dimension -uint32 size # size of given dimension (in type units) -uint32 stride # stride of given dimension diff --git a/messages/tier4_debug_msgs/msg/MultiArrayLayout.msg b/messages/tier4_debug_msgs/msg/MultiArrayLayout.msg deleted file mode 100644 index a2d8afb9fb38c..0000000000000 --- a/messages/tier4_debug_msgs/msg/MultiArrayLayout.msg +++ /dev/null @@ -1,34 +0,0 @@ -# This is from ros2 common_interfaces. -# https://github.com/ros2/common_interfaces/blob/master/std_msgs/msg/MultiArrayLayout.msg - -# This was originally provided as an example message. -# It is deprecated as of Foxy -# It is recommended to create your own semantically meaningful message. -# However if you would like to continue using this please use the equivalent in example_msgs. - -# The multiarray declares a generic multi-dimensional array of a -# particular data type. Dimensions are ordered from outer most -# to inner most. -# -# Accessors should ALWAYS be written in terms of dimension stride -# and specified outer-most dimension first. -# -# multiarray(i,j,k) = data[data_offset + dim_stride[1]*i + dim_stride[2]*j + k] -# -# A standard, 3-channel 640x480 image with interleaved color channels -# would be specified as: -# -# dim[0].label = "height" -# dim[0].size = 480 -# dim[0].stride = 3*640*480 = 921600 (note dim[0] stride is just size of image) -# dim[1].label = "width" -# dim[1].size = 640 -# dim[1].stride = 3*640 = 1920 -# dim[2].label = "channel" -# dim[2].size = 3 -# dim[2].stride = 3 -# -# multiarray(i,j,k) refers to the ith row, jth column, and kth channel. - -tier4_debug_msgs/MultiArrayDimension[] dim # Array of dimension properties -uint32 data_offset # padding bytes at front of data diff --git a/messages/tier4_debug_msgs/msg/StringStamped.msg b/messages/tier4_debug_msgs/msg/StringStamped.msg deleted file mode 100644 index a48c85b2cb079..0000000000000 --- a/messages/tier4_debug_msgs/msg/StringStamped.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -string data diff --git a/messages/tier4_debug_msgs/package.xml b/messages/tier4_debug_msgs/package.xml deleted file mode 100644 index 509b7f2edc851..0000000000000 --- a/messages/tier4_debug_msgs/package.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - tier4_debug_msgs - 0.1.0 - The tier4_debug_msgs package - Takamasa Horibe - Apache License 2.0 - - ament_cmake_auto - - rosidl_default_generators - - builtin_interfaces - - rosidl_default_runtime - - ament_lint_auto - ament_lint_common - - rosidl_interface_packages - - - ament_cmake - - diff --git a/messages/tier4_external_api_msgs/CMakeLists.txt b/messages/tier4_external_api_msgs/CMakeLists.txt deleted file mode 100644 index cba69db8f0485..0000000000000 --- a/messages/tier4_external_api_msgs/CMakeLists.txt +++ /dev/null @@ -1,72 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(tier4_external_api_msgs) - -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) -endif() - -find_package(ament_cmake_auto REQUIRED) -ament_auto_find_build_dependencies() - -rosidl_generate_interfaces(${PROJECT_NAME} - msg/ClassifiedDiagnostics.msg - msg/ControlCommand.msg - msg/ControlCommandStamped.msg - msg/DoorStatus.msg - msg/Emergency.msg - msg/EngageStatus.msg - msg/FailSafeState.msg - msg/FailSafeStateStamped.msg - msg/GearShift.msg - msg/GearShiftStamped.msg - msg/Heartbeat.msg - msg/MapHash.msg - msg/MetadataPackages.msg - msg/Observer.msg - msg/Operator.msg - msg/ResponseStatus.msg - msg/Route.msg - msg/RouteSection.msg - msg/Service.msg - msg/TextFile.msg - msg/Steering.msg - msg/TurnSignal.msg - msg/TurnSignalStamped.msg - msg/VehicleCommand.msg - msg/VehicleCommandStamped.msg - msg/VehicleStatus.msg - msg/VehicleStatusStamped.msg - srv/ClearRoute.srv - srv/Engage.srv - srv/GetMetadataPackages.srv - srv/GetTextFile.srv - srv/GetVersion.srv - srv/InitializePose.srv - srv/InitializePoseAuto.srv - srv/PauseDriving.srv - srv/SetDoor.srv - srv/SetObserver.srv - srv/SetOperator.srv - srv/SetEmergency.srv - srv/SetPose.srv - srv/SetRoute.srv - srv/SetService.srv - srv/SetVelocityLimit.srv - DEPENDENCIES - builtin_interfaces - diagnostic_msgs - geometry_msgs -) - -if(BUILD_TESTING) - find_package(ament_lint_auto REQUIRED) - ament_lint_auto_find_test_dependencies() -endif() - -ament_auto_package() diff --git a/messages/tier4_external_api_msgs/msg/ClassifiedDiagnostics.msg b/messages/tier4_external_api_msgs/msg/ClassifiedDiagnostics.msg deleted file mode 100644 index 943546654a1b3..0000000000000 --- a/messages/tier4_external_api_msgs/msg/ClassifiedDiagnostics.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -diagnostic_msgs/DiagnosticStatus[] diagnostics_notice diff --git a/messages/tier4_external_api_msgs/msg/ControlCommand.msg b/messages/tier4_external_api_msgs/msg/ControlCommand.msg deleted file mode 100644 index 8209a16efb163..0000000000000 --- a/messages/tier4_external_api_msgs/msg/ControlCommand.msg +++ /dev/null @@ -1,4 +0,0 @@ -float64 steering_angle -float64 steering_angle_velocity -float64 throttle -float64 brake diff --git a/messages/tier4_external_api_msgs/msg/ControlCommandStamped.msg b/messages/tier4_external_api_msgs/msg/ControlCommandStamped.msg deleted file mode 100644 index 9946c6a59b326..0000000000000 --- a/messages/tier4_external_api_msgs/msg/ControlCommandStamped.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -tier4_external_api_msgs/ControlCommand control diff --git a/messages/tier4_external_api_msgs/msg/DoorStatus.msg b/messages/tier4_external_api_msgs/msg/DoorStatus.msg deleted file mode 100644 index 10428618bd6b0..0000000000000 --- a/messages/tier4_external_api_msgs/msg/DoorStatus.msg +++ /dev/null @@ -1,11 +0,0 @@ -# constants -int8 NOT_SUPPORTED = -1 -int8 UNKNOWN = 0 -int8 OPENED = 1 -int8 CLOSED = 2 -int8 OPENING = 3 -int8 CLOSING = 4 - -# fields -builtin_interfaces/Time stamp -int8 status diff --git a/messages/tier4_external_api_msgs/msg/Emergency.msg b/messages/tier4_external_api_msgs/msg/Emergency.msg deleted file mode 100644 index b6f2933e20c8c..0000000000000 --- a/messages/tier4_external_api_msgs/msg/Emergency.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -bool emergency diff --git a/messages/tier4_external_api_msgs/msg/EngageStatus.msg b/messages/tier4_external_api_msgs/msg/EngageStatus.msg deleted file mode 100644 index c5fe7dc3988b9..0000000000000 --- a/messages/tier4_external_api_msgs/msg/EngageStatus.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -bool engage diff --git a/messages/tier4_external_api_msgs/msg/FailSafeState.msg b/messages/tier4_external_api_msgs/msg/FailSafeState.msg deleted file mode 100644 index f5abbbeb7e82b..0000000000000 --- a/messages/tier4_external_api_msgs/msg/FailSafeState.msg +++ /dev/null @@ -1,9 +0,0 @@ -# constants -uint8 NORMAL = 1 -uint8 OVERRIDE_REQUESTING = 2 -uint8 MRM_OPERATING = 3 -uint8 MRM_SUCCEEDED = 4 -uint8 MRM_FAILED = 5 - -# fields -uint8 state diff --git a/messages/tier4_external_api_msgs/msg/FailSafeStateStamped.msg b/messages/tier4_external_api_msgs/msg/FailSafeStateStamped.msg deleted file mode 100644 index a9ddc6247c42e..0000000000000 --- a/messages/tier4_external_api_msgs/msg/FailSafeStateStamped.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -tier4_external_api_msgs/FailSafeState state diff --git a/messages/tier4_external_api_msgs/msg/GearShift.msg b/messages/tier4_external_api_msgs/msg/GearShift.msg deleted file mode 100644 index a7729854c08ba..0000000000000 --- a/messages/tier4_external_api_msgs/msg/GearShift.msg +++ /dev/null @@ -1,10 +0,0 @@ -# constants -uint8 NONE=0 -uint8 PARKING=1 -uint8 REVERSE=2 -uint8 NEUTRAL=3 -uint8 DRIVE=4 -uint8 LOW=5 - -# fields -uint8 data diff --git a/messages/tier4_external_api_msgs/msg/GearShiftStamped.msg b/messages/tier4_external_api_msgs/msg/GearShiftStamped.msg deleted file mode 100644 index 5cfd875c6b661..0000000000000 --- a/messages/tier4_external_api_msgs/msg/GearShiftStamped.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -tier4_external_api_msgs/GearShift gear_shift diff --git a/messages/tier4_external_api_msgs/msg/Heartbeat.msg b/messages/tier4_external_api_msgs/msg/Heartbeat.msg deleted file mode 100644 index 4b20d3199e5a6..0000000000000 --- a/messages/tier4_external_api_msgs/msg/Heartbeat.msg +++ /dev/null @@ -1 +0,0 @@ -builtin_interfaces/Time stamp diff --git a/messages/tier4_external_api_msgs/msg/MapHash.msg b/messages/tier4_external_api_msgs/msg/MapHash.msg deleted file mode 100644 index 901f5bdc09921..0000000000000 --- a/messages/tier4_external_api_msgs/msg/MapHash.msg +++ /dev/null @@ -1,2 +0,0 @@ -string lanelet -string pcd diff --git a/messages/tier4_external_api_msgs/msg/MetadataPackages.msg b/messages/tier4_external_api_msgs/msg/MetadataPackages.msg deleted file mode 100644 index 638ae995b7e3c..0000000000000 --- a/messages/tier4_external_api_msgs/msg/MetadataPackages.msg +++ /dev/null @@ -1,2 +0,0 @@ -string format -string json diff --git a/messages/tier4_external_api_msgs/msg/Observer.msg b/messages/tier4_external_api_msgs/msg/Observer.msg deleted file mode 100644 index 3f472c8b929d1..0000000000000 --- a/messages/tier4_external_api_msgs/msg/Observer.msg +++ /dev/null @@ -1,7 +0,0 @@ -# constants -# uint8 NONE=1 (reserved) -uint8 LOCAL=2 -uint8 REMOTE=3 - -# fields -uint8 mode diff --git a/messages/tier4_external_api_msgs/msg/Operator.msg b/messages/tier4_external_api_msgs/msg/Operator.msg deleted file mode 100644 index 18d508c615e96..0000000000000 --- a/messages/tier4_external_api_msgs/msg/Operator.msg +++ /dev/null @@ -1,7 +0,0 @@ -# constants -uint8 DRIVER=1 -uint8 AUTONOMOUS=2 -uint8 OBSERVER=3 - -# fields -uint8 mode diff --git a/messages/tier4_external_api_msgs/msg/ResponseStatus.msg b/messages/tier4_external_api_msgs/msg/ResponseStatus.msg deleted file mode 100644 index 440ffcd1f89ed..0000000000000 --- a/messages/tier4_external_api_msgs/msg/ResponseStatus.msg +++ /dev/null @@ -1,9 +0,0 @@ -# constants -uint32 SUCCESS=1 -uint32 IGNORED=2 -uint32 WARN=3 -uint32 ERROR=4 - -# fields -uint32 code -string message diff --git a/messages/tier4_external_api_msgs/msg/Route.msg b/messages/tier4_external_api_msgs/msg/Route.msg deleted file mode 100644 index dc159f43bcf8f..0000000000000 --- a/messages/tier4_external_api_msgs/msg/Route.msg +++ /dev/null @@ -1,2 +0,0 @@ -geometry_msgs/PoseStamped goal_pose -tier4_external_api_msgs/RouteSection[] route_sections diff --git a/messages/tier4_external_api_msgs/msg/RouteSection.msg b/messages/tier4_external_api_msgs/msg/RouteSection.msg deleted file mode 100644 index 9c056b7049735..0000000000000 --- a/messages/tier4_external_api_msgs/msg/RouteSection.msg +++ /dev/null @@ -1,3 +0,0 @@ -int64 preferred_lane_id -int64[] lane_ids -int64[] continued_lane_ids diff --git a/messages/tier4_external_api_msgs/msg/Service.msg b/messages/tier4_external_api_msgs/msg/Service.msg deleted file mode 100644 index 2630a53714e50..0000000000000 --- a/messages/tier4_external_api_msgs/msg/Service.msg +++ /dev/null @@ -1,6 +0,0 @@ -# constants -uint8 NOT_IN_SERVICE=1 -uint8 IN_SERVICE=2 - -# fields -uint8 mode diff --git a/messages/tier4_external_api_msgs/msg/Steering.msg b/messages/tier4_external_api_msgs/msg/Steering.msg deleted file mode 100644 index c4705704f3464..0000000000000 --- a/messages/tier4_external_api_msgs/msg/Steering.msg +++ /dev/null @@ -1 +0,0 @@ -float32 data diff --git a/messages/tier4_external_api_msgs/msg/TextFile.msg b/messages/tier4_external_api_msgs/msg/TextFile.msg deleted file mode 100644 index 7866644a83726..0000000000000 --- a/messages/tier4_external_api_msgs/msg/TextFile.msg +++ /dev/null @@ -1 +0,0 @@ -string text diff --git a/messages/tier4_external_api_msgs/msg/TurnSignal.msg b/messages/tier4_external_api_msgs/msg/TurnSignal.msg deleted file mode 100644 index d2a8eadd4dcdf..0000000000000 --- a/messages/tier4_external_api_msgs/msg/TurnSignal.msg +++ /dev/null @@ -1,8 +0,0 @@ -# constants -uint8 NONE = 0 -uint8 LEFT = 1 -uint8 RIGHT = 2 -uint8 HAZARD = 3 - -# fields -uint8 data diff --git a/messages/tier4_external_api_msgs/msg/TurnSignalStamped.msg b/messages/tier4_external_api_msgs/msg/TurnSignalStamped.msg deleted file mode 100644 index 81866ac45e879..0000000000000 --- a/messages/tier4_external_api_msgs/msg/TurnSignalStamped.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -tier4_external_api_msgs/TurnSignal turn_signal diff --git a/messages/tier4_external_api_msgs/msg/VehicleCommand.msg b/messages/tier4_external_api_msgs/msg/VehicleCommand.msg deleted file mode 100644 index a0a3652f1291a..0000000000000 --- a/messages/tier4_external_api_msgs/msg/VehicleCommand.msg +++ /dev/null @@ -1,2 +0,0 @@ -float64 velocity -float64 acceleration diff --git a/messages/tier4_external_api_msgs/msg/VehicleCommandStamped.msg b/messages/tier4_external_api_msgs/msg/VehicleCommandStamped.msg deleted file mode 100644 index 73a354bd469a1..0000000000000 --- a/messages/tier4_external_api_msgs/msg/VehicleCommandStamped.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -tier4_external_api_msgs/VehicleCommand command diff --git a/messages/tier4_external_api_msgs/msg/VehicleStatus.msg b/messages/tier4_external_api_msgs/msg/VehicleStatus.msg deleted file mode 100644 index 4fa6bee40252e..0000000000000 --- a/messages/tier4_external_api_msgs/msg/VehicleStatus.msg +++ /dev/null @@ -1,4 +0,0 @@ -geometry_msgs/Twist twist -tier4_external_api_msgs/Steering steering -tier4_external_api_msgs/TurnSignal turn_signal -tier4_external_api_msgs/GearShift gear_shift diff --git a/messages/tier4_external_api_msgs/msg/VehicleStatusStamped.msg b/messages/tier4_external_api_msgs/msg/VehicleStatusStamped.msg deleted file mode 100644 index 13cfb2a601b8a..0000000000000 --- a/messages/tier4_external_api_msgs/msg/VehicleStatusStamped.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -tier4_external_api_msgs/VehicleStatus status diff --git a/messages/tier4_external_api_msgs/package.xml b/messages/tier4_external_api_msgs/package.xml deleted file mode 100644 index 4bd3353cafc0e..0000000000000 --- a/messages/tier4_external_api_msgs/package.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - tier4_external_api_msgs - 0.0.0 - The tier4_external_api_msgs package - Takagi, Isamu - Apache License 2.0 - - ament_cmake_auto - - builtin_interfaces - rosidl_default_generators - - builtin_interfaces - rosidl_default_runtime - - diagnostic_msgs - geometry_msgs - - ament_lint_auto - ament_lint_common - - rosidl_interface_packages - - - ament_cmake - - - diff --git a/messages/tier4_external_api_msgs/srv/ClearRoute.srv b/messages/tier4_external_api_msgs/srv/ClearRoute.srv deleted file mode 100644 index 0563cb5b15e64..0000000000000 --- a/messages/tier4_external_api_msgs/srv/ClearRoute.srv +++ /dev/null @@ -1,2 +0,0 @@ ---- -tier4_external_api_msgs/ResponseStatus status diff --git a/messages/tier4_external_api_msgs/srv/Engage.srv b/messages/tier4_external_api_msgs/srv/Engage.srv deleted file mode 100644 index 31918df80bb06..0000000000000 --- a/messages/tier4_external_api_msgs/srv/Engage.srv +++ /dev/null @@ -1,3 +0,0 @@ -bool engage ---- -tier4_external_api_msgs/ResponseStatus status diff --git a/messages/tier4_external_api_msgs/srv/GetMetadataPackages.srv b/messages/tier4_external_api_msgs/srv/GetMetadataPackages.srv deleted file mode 100644 index 7b62e4348b10a..0000000000000 --- a/messages/tier4_external_api_msgs/srv/GetMetadataPackages.srv +++ /dev/null @@ -1,3 +0,0 @@ ---- -tier4_external_api_msgs/ResponseStatus status -tier4_external_api_msgs/MetadataPackages metadata diff --git a/messages/tier4_external_api_msgs/srv/GetTextFile.srv b/messages/tier4_external_api_msgs/srv/GetTextFile.srv deleted file mode 100644 index a341bc5df3fc9..0000000000000 --- a/messages/tier4_external_api_msgs/srv/GetTextFile.srv +++ /dev/null @@ -1,3 +0,0 @@ ---- -tier4_external_api_msgs/ResponseStatus status -tier4_external_api_msgs/TextFile file diff --git a/messages/tier4_external_api_msgs/srv/GetVersion.srv b/messages/tier4_external_api_msgs/srv/GetVersion.srv deleted file mode 100644 index fa9f5fd1cb581..0000000000000 --- a/messages/tier4_external_api_msgs/srv/GetVersion.srv +++ /dev/null @@ -1,3 +0,0 @@ ---- -tier4_external_api_msgs/ResponseStatus status -string version diff --git a/messages/tier4_external_api_msgs/srv/InitializePose.srv b/messages/tier4_external_api_msgs/srv/InitializePose.srv deleted file mode 100644 index 5d27042d421b3..0000000000000 --- a/messages/tier4_external_api_msgs/srv/InitializePose.srv +++ /dev/null @@ -1,3 +0,0 @@ -geometry_msgs/PoseWithCovarianceStamped pose ---- -tier4_external_api_msgs/ResponseStatus status diff --git a/messages/tier4_external_api_msgs/srv/InitializePoseAuto.srv b/messages/tier4_external_api_msgs/srv/InitializePoseAuto.srv deleted file mode 100644 index 0563cb5b15e64..0000000000000 --- a/messages/tier4_external_api_msgs/srv/InitializePoseAuto.srv +++ /dev/null @@ -1,2 +0,0 @@ ---- -tier4_external_api_msgs/ResponseStatus status diff --git a/messages/tier4_external_api_msgs/srv/PauseDriving.srv b/messages/tier4_external_api_msgs/srv/PauseDriving.srv deleted file mode 100644 index 3430334d020b7..0000000000000 --- a/messages/tier4_external_api_msgs/srv/PauseDriving.srv +++ /dev/null @@ -1,3 +0,0 @@ -bool pause ---- -tier4_external_api_msgs/ResponseStatus status diff --git a/messages/tier4_external_api_msgs/srv/SetDoor.srv b/messages/tier4_external_api_msgs/srv/SetDoor.srv deleted file mode 100644 index 6a89566f41f5d..0000000000000 --- a/messages/tier4_external_api_msgs/srv/SetDoor.srv +++ /dev/null @@ -1,3 +0,0 @@ -bool open ---- -tier4_external_api_msgs/ResponseStatus status diff --git a/messages/tier4_external_api_msgs/srv/SetEmergency.srv b/messages/tier4_external_api_msgs/srv/SetEmergency.srv deleted file mode 100644 index 974a259ebc05e..0000000000000 --- a/messages/tier4_external_api_msgs/srv/SetEmergency.srv +++ /dev/null @@ -1,3 +0,0 @@ -bool emergency ---- -tier4_external_api_msgs/ResponseStatus status diff --git a/messages/tier4_external_api_msgs/srv/SetObserver.srv b/messages/tier4_external_api_msgs/srv/SetObserver.srv deleted file mode 100644 index 80b092f925e37..0000000000000 --- a/messages/tier4_external_api_msgs/srv/SetObserver.srv +++ /dev/null @@ -1,3 +0,0 @@ -tier4_external_api_msgs/Observer mode ---- -tier4_external_api_msgs/ResponseStatus status diff --git a/messages/tier4_external_api_msgs/srv/SetOperator.srv b/messages/tier4_external_api_msgs/srv/SetOperator.srv deleted file mode 100644 index 5156c3029f9fe..0000000000000 --- a/messages/tier4_external_api_msgs/srv/SetOperator.srv +++ /dev/null @@ -1,3 +0,0 @@ -tier4_external_api_msgs/Operator mode ---- -tier4_external_api_msgs/ResponseStatus status diff --git a/messages/tier4_external_api_msgs/srv/SetPose.srv b/messages/tier4_external_api_msgs/srv/SetPose.srv deleted file mode 100644 index 898ae8c7544a9..0000000000000 --- a/messages/tier4_external_api_msgs/srv/SetPose.srv +++ /dev/null @@ -1,3 +0,0 @@ -geometry_msgs/PoseStamped pose ---- -tier4_external_api_msgs/ResponseStatus status diff --git a/messages/tier4_external_api_msgs/srv/SetRoute.srv b/messages/tier4_external_api_msgs/srv/SetRoute.srv deleted file mode 100644 index 522541931a094..0000000000000 --- a/messages/tier4_external_api_msgs/srv/SetRoute.srv +++ /dev/null @@ -1,3 +0,0 @@ -tier4_external_api_msgs/Route route ---- -tier4_external_api_msgs/ResponseStatus status diff --git a/messages/tier4_external_api_msgs/srv/SetService.srv b/messages/tier4_external_api_msgs/srv/SetService.srv deleted file mode 100644 index 7ddea0396d8c4..0000000000000 --- a/messages/tier4_external_api_msgs/srv/SetService.srv +++ /dev/null @@ -1,3 +0,0 @@ -tier4_external_api_msgs/Service mode ---- -tier4_external_api_msgs/ResponseStatus status diff --git a/messages/tier4_external_api_msgs/srv/SetVelocityLimit.srv b/messages/tier4_external_api_msgs/srv/SetVelocityLimit.srv deleted file mode 100644 index 9c9b22bc727f3..0000000000000 --- a/messages/tier4_external_api_msgs/srv/SetVelocityLimit.srv +++ /dev/null @@ -1,3 +0,0 @@ -float32 velocity ---- -tier4_external_api_msgs/ResponseStatus status diff --git a/messages/tier4_hmi_msgs/CMakeLists.txt b/messages/tier4_hmi_msgs/CMakeLists.txt deleted file mode 100644 index 61e52856554c0..0000000000000 --- a/messages/tier4_hmi_msgs/CMakeLists.txt +++ /dev/null @@ -1,29 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(tier4_hmi_msgs) - -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) -endif() - -find_package(ament_cmake_auto REQUIRED) -ament_auto_find_build_dependencies() - -rosidl_generate_interfaces(${PROJECT_NAME} - srv/Announce.srv - DEPENDENCIES - builtin_interfaces - tier4_external_api_msgs -) - -if(BUILD_TESTING) - find_package(ament_lint_auto REQUIRED) - ament_lint_auto_find_test_dependencies() -endif() - -ament_auto_package() diff --git a/messages/tier4_hmi_msgs/package.xml b/messages/tier4_hmi_msgs/package.xml deleted file mode 100644 index 35cb492f1c1aa..0000000000000 --- a/messages/tier4_hmi_msgs/package.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - tier4_hmi_msgs - 0.1.0 - The tier4_hmi_msgs package - Kah Hooi Tan - Apache License 2.0 - - ament_cmake_auto - - builtin_interfaces - rosidl_default_generators - - builtin_interfaces - rosidl_default_runtime - - tier4_external_api_msgs - - ament_lint_auto - ament_lint_common - - rosidl_interface_packages - - - ament_cmake - - - diff --git a/messages/tier4_hmi_msgs/srv/Announce.srv b/messages/tier4_hmi_msgs/srv/Announce.srv deleted file mode 100644 index 4e8c4db856e6b..0000000000000 --- a/messages/tier4_hmi_msgs/srv/Announce.srv +++ /dev/null @@ -1,5 +0,0 @@ -uint32 ENGAGE=1 -uint32 RESTART_ENGAGE=2 -uint32 kind ---- -tier4_external_api_msgs/ResponseStatus status diff --git a/messages/tier4_localization_msgs/CMakeLists.txt b/messages/tier4_localization_msgs/CMakeLists.txt deleted file mode 100644 index 2746a245fe473..0000000000000 --- a/messages/tier4_localization_msgs/CMakeLists.txt +++ /dev/null @@ -1,30 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(tier4_localization_msgs) - -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) -endif() - -find_package(ament_cmake_auto REQUIRED) -ament_auto_find_build_dependencies() - -rosidl_generate_interfaces(${PROJECT_NAME} - "msg/PoseInitializationRequest.msg" - "srv/PoseWithCovarianceStamped.srv" - DEPENDENCIES - builtin_interfaces - geometry_msgs -) - -if(BUILD_TESTING) - find_package(ament_lint_auto REQUIRED) - ament_lint_auto_find_test_dependencies() -endif() - -ament_auto_package() diff --git a/messages/tier4_localization_msgs/msg/PoseInitializationRequest.msg b/messages/tier4_localization_msgs/msg/PoseInitializationRequest.msg deleted file mode 100644 index edb7a413edd99..0000000000000 --- a/messages/tier4_localization_msgs/msg/PoseInitializationRequest.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -bool data diff --git a/messages/tier4_localization_msgs/package.xml b/messages/tier4_localization_msgs/package.xml deleted file mode 100644 index 960d37f0d927a..0000000000000 --- a/messages/tier4_localization_msgs/package.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - tier4_localization_msgs - 0.1.0 - The tier4_localization_msgs package - Ryohsuke Mitsudome - Apache License 2.0 - - ament_cmake_auto - - rosidl_default_generators - - builtin_interfaces - geometry_msgs - - rosidl_default_runtime - - ament_lint_auto - ament_lint_common - - rosidl_interface_packages - - - ament_cmake - - diff --git a/messages/tier4_localization_msgs/srv/PoseWithCovarianceStamped.srv b/messages/tier4_localization_msgs/srv/PoseWithCovarianceStamped.srv deleted file mode 100644 index 924c16db51601..0000000000000 --- a/messages/tier4_localization_msgs/srv/PoseWithCovarianceStamped.srv +++ /dev/null @@ -1,7 +0,0 @@ -# A sequence number is included to do primitive error checking -uint32 seq -geometry_msgs/PoseWithCovarianceStamped pose_with_covariance ---- -bool success -uint32 seq -geometry_msgs/PoseWithCovarianceStamped pose_with_covariance diff --git a/messages/tier4_perception_msgs/CMakeLists.txt b/messages/tier4_perception_msgs/CMakeLists.txt deleted file mode 100644 index 7bc8e13c8e8e6..0000000000000 --- a/messages/tier4_perception_msgs/CMakeLists.txt +++ /dev/null @@ -1,41 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(tier4_perception_msgs) - -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) -endif() - -find_package(ament_cmake_auto REQUIRED) -ament_auto_find_build_dependencies() - -rosidl_generate_interfaces(${PROJECT_NAME} - "msg/object_recognition/DetectedObjectWithFeature.msg" - "msg/object_recognition/DetectedObjectsWithFeature.msg" - "msg/object_recognition/DynamicObject.msg" - "msg/object_recognition/DynamicObjectArray.msg" - "msg/object_recognition/Feature.msg" - "msg/object_recognition/PredictedPath.msg" - "msg/object_recognition/Semantic.msg" - "msg/object_recognition/Shape.msg" - "msg/object_recognition/State.msg" - DEPENDENCIES - autoware_auto_perception_msgs - builtin_interfaces - geometry_msgs - sensor_msgs - std_msgs - unique_identifier_msgs -) - -if(BUILD_TESTING) - find_package(ament_lint_auto REQUIRED) - ament_lint_auto_find_test_dependencies() -endif() - -ament_auto_package() diff --git a/messages/tier4_perception_msgs/msg/object_recognition/DetectedObjectWithFeature.msg b/messages/tier4_perception_msgs/msg/object_recognition/DetectedObjectWithFeature.msg deleted file mode 100644 index 08317899e9d0a..0000000000000 --- a/messages/tier4_perception_msgs/msg/object_recognition/DetectedObjectWithFeature.msg +++ /dev/null @@ -1,2 +0,0 @@ -autoware_auto_perception_msgs/DetectedObject object -Feature feature diff --git a/messages/tier4_perception_msgs/msg/object_recognition/DetectedObjectsWithFeature.msg b/messages/tier4_perception_msgs/msg/object_recognition/DetectedObjectsWithFeature.msg deleted file mode 100644 index 62e61387d3a9d..0000000000000 --- a/messages/tier4_perception_msgs/msg/object_recognition/DetectedObjectsWithFeature.msg +++ /dev/null @@ -1,2 +0,0 @@ -std_msgs/Header header -DetectedObjectWithFeature[] feature_objects diff --git a/messages/tier4_perception_msgs/msg/object_recognition/DynamicObject.msg b/messages/tier4_perception_msgs/msg/object_recognition/DynamicObject.msg deleted file mode 100644 index 5b8be8e6aebd2..0000000000000 --- a/messages/tier4_perception_msgs/msg/object_recognition/DynamicObject.msg +++ /dev/null @@ -1,4 +0,0 @@ -unique_identifier_msgs/UUID id -Semantic semantic -State state -Shape shape diff --git a/messages/tier4_perception_msgs/msg/object_recognition/DynamicObjectArray.msg b/messages/tier4_perception_msgs/msg/object_recognition/DynamicObjectArray.msg deleted file mode 100644 index b7ebf9abc3874..0000000000000 --- a/messages/tier4_perception_msgs/msg/object_recognition/DynamicObjectArray.msg +++ /dev/null @@ -1,2 +0,0 @@ -std_msgs/Header header -DynamicObject[] objects diff --git a/messages/tier4_perception_msgs/msg/object_recognition/Feature.msg b/messages/tier4_perception_msgs/msg/object_recognition/Feature.msg deleted file mode 100644 index de9c065ca353b..0000000000000 --- a/messages/tier4_perception_msgs/msg/object_recognition/Feature.msg +++ /dev/null @@ -1,2 +0,0 @@ -sensor_msgs/PointCloud2 cluster -sensor_msgs/RegionOfInterest roi diff --git a/messages/tier4_perception_msgs/msg/object_recognition/PredictedPath.msg b/messages/tier4_perception_msgs/msg/object_recognition/PredictedPath.msg deleted file mode 100644 index c801c981e3288..0000000000000 --- a/messages/tier4_perception_msgs/msg/object_recognition/PredictedPath.msg +++ /dev/null @@ -1,2 +0,0 @@ -geometry_msgs/PoseWithCovarianceStamped[] path -float64 confidence diff --git a/messages/tier4_perception_msgs/msg/object_recognition/Semantic.msg b/messages/tier4_perception_msgs/msg/object_recognition/Semantic.msg deleted file mode 100644 index 272719022ac8d..0000000000000 --- a/messages/tier4_perception_msgs/msg/object_recognition/Semantic.msg +++ /dev/null @@ -1,10 +0,0 @@ -uint8 UNKNOWN=0 -uint8 CAR=1 -uint8 TRUCK=2 -uint8 BUS=3 -uint8 BICYCLE=4 -uint8 MOTORBIKE=5 -uint8 PEDESTRIAN=6 -uint8 ANIMAL=7 -uint32 type -float64 confidence diff --git a/messages/tier4_perception_msgs/msg/object_recognition/Shape.msg b/messages/tier4_perception_msgs/msg/object_recognition/Shape.msg deleted file mode 100644 index b7041fc51346b..0000000000000 --- a/messages/tier4_perception_msgs/msg/object_recognition/Shape.msg +++ /dev/null @@ -1,7 +0,0 @@ -uint8 BOUNDING_BOX=0 -uint8 CYLINDER=1 -uint8 POLYGON=2 - -uint8 type -geometry_msgs/Vector3 dimensions -geometry_msgs/Polygon footprint diff --git a/messages/tier4_perception_msgs/msg/object_recognition/State.msg b/messages/tier4_perception_msgs/msg/object_recognition/State.msg deleted file mode 100644 index 70daef0dfa1d5..0000000000000 --- a/messages/tier4_perception_msgs/msg/object_recognition/State.msg +++ /dev/null @@ -1,7 +0,0 @@ -geometry_msgs/PoseWithCovariance pose_covariance -bool orientation_reliable -geometry_msgs/TwistWithCovariance twist_covariance -bool twist_reliable -geometry_msgs/AccelWithCovariance acceleration_covariance -bool acceleration_reliable -PredictedPath[] predicted_paths diff --git a/messages/tier4_perception_msgs/package.xml b/messages/tier4_perception_msgs/package.xml deleted file mode 100644 index 36776fbb29f8b..0000000000000 --- a/messages/tier4_perception_msgs/package.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - tier4_perception_msgs - 0.1.0 - The tier4_perception_msgs package - Yukihiro Saito - Apache License 2.0 - - ament_cmake_auto - - rosidl_default_generators - - autoware_auto_perception_msgs - builtin_interfaces - geometry_msgs - sensor_msgs - std_msgs - unique_identifier_msgs - - rosidl_default_runtime - - ament_lint_auto - ament_lint_common - - rosidl_interface_packages - - - ament_cmake - - diff --git a/messages/tier4_planning_msgs/CMakeLists.txt b/messages/tier4_planning_msgs/CMakeLists.txt deleted file mode 100644 index 911dcd4a09c9e..0000000000000 --- a/messages/tier4_planning_msgs/CMakeLists.txt +++ /dev/null @@ -1,51 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(tier4_planning_msgs) - -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) -endif() - -find_package(ament_cmake_auto REQUIRED) -ament_auto_find_build_dependencies() - -rosidl_generate_interfaces(${PROJECT_NAME} - "msg/Approval.msg" - "msg/EnableAvoidance.msg" - "msg/ExpandStopRange.msg" - "msg/IsAvoidancePossible.msg" - "msg/LaneChangeCommand.msg" - "msg/LaneChangeStatus.msg" - "msg/LateralOffset.msg" - "msg/Path.msg" - "msg/PathChangeModule.msg" - "msg/PathChangeModuleArray.msg" - "msg/PathChangeModuleId.msg" - "msg/PathPoint.msg" - "msg/Scenario.msg" - "msg/StopFactor.msg" - "msg/StopReason.msg" - "msg/StopReasonArray.msg" - "msg/StopSpeedExceeded.msg" - "msg/Trajectory.msg" - "msg/TrajectoryPoint.msg" - "msg/VelocityLimit.msg" - "msg/VelocityLimitClearCommand.msg" - "msg/VelocityLimitConstraints.msg" - DEPENDENCIES - geometry_msgs - nav_msgs - std_msgs -) - -if(BUILD_TESTING) - find_package(ament_lint_auto REQUIRED) - ament_lint_auto_find_test_dependencies() -endif() - -ament_auto_package() diff --git a/messages/tier4_planning_msgs/msg/Approval.msg b/messages/tier4_planning_msgs/msg/Approval.msg deleted file mode 100644 index c36ce4c9c6852..0000000000000 --- a/messages/tier4_planning_msgs/msg/Approval.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -bool approval diff --git a/messages/tier4_planning_msgs/msg/EnableAvoidance.msg b/messages/tier4_planning_msgs/msg/EnableAvoidance.msg deleted file mode 100644 index df63fdcb97002..0000000000000 --- a/messages/tier4_planning_msgs/msg/EnableAvoidance.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -bool enable_avoidance diff --git a/messages/tier4_planning_msgs/msg/ExpandStopRange.msg b/messages/tier4_planning_msgs/msg/ExpandStopRange.msg deleted file mode 100644 index 085e3d0b15b86..0000000000000 --- a/messages/tier4_planning_msgs/msg/ExpandStopRange.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -float32 expand_stop_range diff --git a/messages/tier4_planning_msgs/msg/IsAvoidancePossible.msg b/messages/tier4_planning_msgs/msg/IsAvoidancePossible.msg deleted file mode 100644 index 71e8b39c03491..0000000000000 --- a/messages/tier4_planning_msgs/msg/IsAvoidancePossible.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -bool is_avoidance_possible diff --git a/messages/tier4_planning_msgs/msg/LaneChangeCommand.msg b/messages/tier4_planning_msgs/msg/LaneChangeCommand.msg deleted file mode 100644 index ed2f7e24db93c..0000000000000 --- a/messages/tier4_planning_msgs/msg/LaneChangeCommand.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -bool command diff --git a/messages/tier4_planning_msgs/msg/LaneChangeStatus.msg b/messages/tier4_planning_msgs/msg/LaneChangeStatus.msg deleted file mode 100644 index 2e798ccc30303..0000000000000 --- a/messages/tier4_planning_msgs/msg/LaneChangeStatus.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -bool status diff --git a/messages/tier4_planning_msgs/msg/LateralOffset.msg b/messages/tier4_planning_msgs/msg/LateralOffset.msg deleted file mode 100644 index 73a7950b3cc38..0000000000000 --- a/messages/tier4_planning_msgs/msg/LateralOffset.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -float32 lateral_offset diff --git a/messages/tier4_planning_msgs/msg/Path.msg b/messages/tier4_planning_msgs/msg/Path.msg deleted file mode 100644 index 0b52c27139d6d..0000000000000 --- a/messages/tier4_planning_msgs/msg/Path.msg +++ /dev/null @@ -1,3 +0,0 @@ -std_msgs/Header header -tier4_planning_msgs/PathPoint[] points -nav_msgs/OccupancyGrid drivable_area diff --git a/messages/tier4_planning_msgs/msg/PathChangeModule.msg b/messages/tier4_planning_msgs/msg/PathChangeModule.msg deleted file mode 100644 index 2ed33a078760d..0000000000000 --- a/messages/tier4_planning_msgs/msg/PathChangeModule.msg +++ /dev/null @@ -1,2 +0,0 @@ -std_msgs/Header header -tier4_planning_msgs/PathChangeModuleId module diff --git a/messages/tier4_planning_msgs/msg/PathChangeModuleArray.msg b/messages/tier4_planning_msgs/msg/PathChangeModuleArray.msg deleted file mode 100644 index 24501f74d834c..0000000000000 --- a/messages/tier4_planning_msgs/msg/PathChangeModuleArray.msg +++ /dev/null @@ -1,2 +0,0 @@ -std_msgs/Header header -tier4_planning_msgs/PathChangeModuleId[] modules diff --git a/messages/tier4_planning_msgs/msg/PathChangeModuleId.msg b/messages/tier4_planning_msgs/msg/PathChangeModuleId.msg deleted file mode 100644 index 569517fdcf4bd..0000000000000 --- a/messages/tier4_planning_msgs/msg/PathChangeModuleId.msg +++ /dev/null @@ -1,8 +0,0 @@ -int32 type - -int32 NONE = 0 -int32 AVOIDANCE = 1 -int32 LANE_CHANGE = 2 -int32 FORCE_LANE_CHANGE = 3 -int32 PULL_OVER = 4 -int32 PULL_OUT = 5 diff --git a/messages/tier4_planning_msgs/msg/PathPoint.msg b/messages/tier4_planning_msgs/msg/PathPoint.msg deleted file mode 100644 index 13f4fe90be4a8..0000000000000 --- a/messages/tier4_planning_msgs/msg/PathPoint.msg +++ /dev/null @@ -1,5 +0,0 @@ -uint8 REFERENCE=0 -uint8 FIXED=1 -geometry_msgs/Pose pose -geometry_msgs/Twist twist -uint8 type diff --git a/messages/tier4_planning_msgs/msg/Scenario.msg b/messages/tier4_planning_msgs/msg/Scenario.msg deleted file mode 100644 index 0a2439d10c849..0000000000000 --- a/messages/tier4_planning_msgs/msg/Scenario.msg +++ /dev/null @@ -1,6 +0,0 @@ -string EMPTY=Empty -string LANEDRIVING=LaneDriving -string PARKING=Parking - -string current_scenario -string[] activating_scenarios diff --git a/messages/tier4_planning_msgs/msg/StopFactor.msg b/messages/tier4_planning_msgs/msg/StopFactor.msg deleted file mode 100644 index 2eefc6f382493..0000000000000 --- a/messages/tier4_planning_msgs/msg/StopFactor.msg +++ /dev/null @@ -1,3 +0,0 @@ -geometry_msgs/Pose stop_pose -float64 dist_to_stop_pose -geometry_msgs/Point[] stop_factor_points diff --git a/messages/tier4_planning_msgs/msg/StopReason.msg b/messages/tier4_planning_msgs/msg/StopReason.msg deleted file mode 100644 index c6a6da8cbaad8..0000000000000 --- a/messages/tier4_planning_msgs/msg/StopReason.msg +++ /dev/null @@ -1,18 +0,0 @@ -string INTERSECTION=Intersection -string MERGE_FROM_PRIVATE_ROAD=MergeFromPrivateRoad -string CROSSWALK=Crosswalk -string WALKWAY=Walkway -string STOP_LINE=StopLine -string DETECTION_AREA=DetectionArea -string NO_STOPPING_AREA=NoStoppingArea -string TRAFFIC_LIGHT=TrafficLight -string OBSTACLE_STOP=ObstacleStop -string SURROUND_OBSTACLE_CHECK=SurroundObstacleCheck -string BLIND_SPOT=BlindSpot -string BLOCKED_BY_OBSTACLE=BlockedByObstacle -string STOPPING_LANE_CHANGE=StoppingLaneChange -string REMOTE_EMERGENCY_STOP=RemoteEmergencyStop -string VIRTUAL_TRAFFIC_LIGHT=VirtualTrafficLight -string reason - -tier4_planning_msgs/StopFactor[] stop_factors diff --git a/messages/tier4_planning_msgs/msg/StopReasonArray.msg b/messages/tier4_planning_msgs/msg/StopReasonArray.msg deleted file mode 100644 index 02eef1f5d08d0..0000000000000 --- a/messages/tier4_planning_msgs/msg/StopReasonArray.msg +++ /dev/null @@ -1,2 +0,0 @@ -std_msgs/Header header -tier4_planning_msgs/StopReason[] stop_reasons diff --git a/messages/tier4_planning_msgs/msg/StopSpeedExceeded.msg b/messages/tier4_planning_msgs/msg/StopSpeedExceeded.msg deleted file mode 100644 index d5ea8d855b3df..0000000000000 --- a/messages/tier4_planning_msgs/msg/StopSpeedExceeded.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -bool stop_speed_exceeded diff --git a/messages/tier4_planning_msgs/msg/Trajectory.msg b/messages/tier4_planning_msgs/msg/Trajectory.msg deleted file mode 100644 index 80d99013ff75d..0000000000000 --- a/messages/tier4_planning_msgs/msg/Trajectory.msg +++ /dev/null @@ -1,2 +0,0 @@ -std_msgs/Header header -tier4_planning_msgs/TrajectoryPoint[] points diff --git a/messages/tier4_planning_msgs/msg/TrajectoryPoint.msg b/messages/tier4_planning_msgs/msg/TrajectoryPoint.msg deleted file mode 100644 index 0fec3ae2ca694..0000000000000 --- a/messages/tier4_planning_msgs/msg/TrajectoryPoint.msg +++ /dev/null @@ -1,3 +0,0 @@ -geometry_msgs/Pose pose -geometry_msgs/Twist twist -geometry_msgs/Accel accel diff --git a/messages/tier4_planning_msgs/msg/VelocityLimit.msg b/messages/tier4_planning_msgs/msg/VelocityLimit.msg deleted file mode 100644 index fa48736533993..0000000000000 --- a/messages/tier4_planning_msgs/msg/VelocityLimit.msg +++ /dev/null @@ -1,7 +0,0 @@ -builtin_interfaces/Time stamp -float32 max_velocity - -bool use_constraints false -tier4_planning_msgs/VelocityLimitConstraints constraints - -string sender diff --git a/messages/tier4_planning_msgs/msg/VelocityLimitClearCommand.msg b/messages/tier4_planning_msgs/msg/VelocityLimitClearCommand.msg deleted file mode 100644 index 881b95c6df22c..0000000000000 --- a/messages/tier4_planning_msgs/msg/VelocityLimitClearCommand.msg +++ /dev/null @@ -1,3 +0,0 @@ -builtin_interfaces/Time stamp -bool command false -string sender diff --git a/messages/tier4_planning_msgs/msg/VelocityLimitConstraints.msg b/messages/tier4_planning_msgs/msg/VelocityLimitConstraints.msg deleted file mode 100644 index ca44d8c321b37..0000000000000 --- a/messages/tier4_planning_msgs/msg/VelocityLimitConstraints.msg +++ /dev/null @@ -1,3 +0,0 @@ -float32 min_acceleration -float32 max_jerk -float32 min_jerk diff --git a/messages/tier4_planning_msgs/package.xml b/messages/tier4_planning_msgs/package.xml deleted file mode 100644 index 13656a875894a..0000000000000 --- a/messages/tier4_planning_msgs/package.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - tier4_planning_msgs - 0.1.0 - The tier4_planning_msgs package - Yukihiro Saito - Apache License 2.0 - - ament_cmake_auto - - rosidl_default_generators - - builtin_interfaces - geometry_msgs - nav_msgs - std_msgs - - rosidl_default_runtime - - ament_lint_auto - ament_lint_common - - rosidl_interface_packages - - - ament_cmake - - diff --git a/messages/tier4_simulation_msgs/CMakeLists.txt b/messages/tier4_simulation_msgs/CMakeLists.txt deleted file mode 100644 index 59adb08a92d60..0000000000000 --- a/messages/tier4_simulation_msgs/CMakeLists.txt +++ /dev/null @@ -1,30 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(tier4_simulation_msgs) - -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) -endif() - -find_package(ament_cmake_auto REQUIRED) -ament_auto_find_build_dependencies() - -rosidl_generate_interfaces(${PROJECT_NAME} - "msg/FaultInjectionEvent.msg" - "msg/SimulationEvents.msg" - DEPENDENCIES - builtin_interfaces - std_msgs -) - -if(BUILD_TESTING) - find_package(ament_lint_auto REQUIRED) - ament_lint_auto_find_test_dependencies() -endif() - -ament_auto_package() diff --git a/messages/tier4_simulation_msgs/msg/FaultInjectionEvent.msg b/messages/tier4_simulation_msgs/msg/FaultInjectionEvent.msg deleted file mode 100644 index e02a99d6e26cc..0000000000000 --- a/messages/tier4_simulation_msgs/msg/FaultInjectionEvent.msg +++ /dev/null @@ -1,7 +0,0 @@ -int8 OK=0 -int8 WARN=1 -int8 ERROR=2 -int8 STALE=3 - -int8 level -string name diff --git a/messages/tier4_simulation_msgs/msg/SimulationEvents.msg b/messages/tier4_simulation_msgs/msg/SimulationEvents.msg deleted file mode 100644 index bab2fc20578bc..0000000000000 --- a/messages/tier4_simulation_msgs/msg/SimulationEvents.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -tier4_simulation_msgs/FaultInjectionEvent[] fault_injection_events diff --git a/messages/tier4_simulation_msgs/package.xml b/messages/tier4_simulation_msgs/package.xml deleted file mode 100644 index 07960d5773e9e..0000000000000 --- a/messages/tier4_simulation_msgs/package.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - tier4_simulation_msgs - 0.1.0 - The tier4_simulation_msgs package - Kenji Miyake - Apache License 2.0 - - ament_cmake_auto - rosidl_default_generators - - - builtin_interfaces - std_msgs - - rosidl_default_runtime - - ament_lint_auto - ament_lint_common - - rosidl_interface_packages - - - ament_cmake - - diff --git a/messages/tier4_system_msgs/CMakeLists.txt b/messages/tier4_system_msgs/CMakeLists.txt deleted file mode 100644 index 66eccce3b37ab..0000000000000 --- a/messages/tier4_system_msgs/CMakeLists.txt +++ /dev/null @@ -1,33 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(tier4_system_msgs) - -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) -endif() - -find_package(ament_cmake_auto REQUIRED) -ament_auto_find_build_dependencies() - -rosidl_generate_interfaces(${PROJECT_NAME} - "msg/AutowareState.msg" - "msg/EmergencyState.msg" - "msg/EmergencyStateStamped.msg" - "msg/HazardStatus.msg" - "msg/HazardStatusStamped.msg" - DEPENDENCIES - diagnostic_msgs - std_msgs -) - -if(BUILD_TESTING) - find_package(ament_lint_auto REQUIRED) - ament_lint_auto_find_test_dependencies() -endif() - -ament_auto_package() diff --git a/messages/tier4_system_msgs/msg/AutowareState.msg b/messages/tier4_system_msgs/msg/AutowareState.msg deleted file mode 100644 index 4a8d1df8f0610..0000000000000 --- a/messages/tier4_system_msgs/msg/AutowareState.msg +++ /dev/null @@ -1,11 +0,0 @@ -string INITIALIZING_VEHICLE=InitializingVehicle -string WAITING_FOR_ROUTE=WaitingForRoute -string PLANNING=Planning -string WAITING_FOR_ENGAGE=WaitingForEngage -string DRIVING=Driving -string ARRIVAL_GOAL=ArrivedGoal -string EMERGENCY=Emergency -string FINALIZING=Finalizing - -string state -string msg diff --git a/messages/tier4_system_msgs/msg/EmergencyState.msg b/messages/tier4_system_msgs/msg/EmergencyState.msg deleted file mode 100644 index 842213396d5f5..0000000000000 --- a/messages/tier4_system_msgs/msg/EmergencyState.msg +++ /dev/null @@ -1,7 +0,0 @@ -uint8 NORMAL = 1 -uint8 OVERRIDE_REQUESTING = 2 -uint8 MRM_OPERATING = 3 -uint8 MRM_SUCCEEDED = 4 -uint8 MRM_FAILED = 5 - -uint8 state diff --git a/messages/tier4_system_msgs/msg/EmergencyStateStamped.msg b/messages/tier4_system_msgs/msg/EmergencyStateStamped.msg deleted file mode 100644 index 5064d8fa0c39c..0000000000000 --- a/messages/tier4_system_msgs/msg/EmergencyStateStamped.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -tier4_system_msgs/EmergencyState state diff --git a/messages/tier4_system_msgs/msg/HazardStatus.msg b/messages/tier4_system_msgs/msg/HazardStatus.msg deleted file mode 100644 index 5bff7be98c6b1..0000000000000 --- a/messages/tier4_system_msgs/msg/HazardStatus.msg +++ /dev/null @@ -1,12 +0,0 @@ -int32 NO_FAULT = 0 -int32 SAFE_FAULT = 1 -int32 LATENT_FAULT = 2 -int32 SINGLE_POINT_FAULT = 3 - -int32 level -bool emergency -bool emergency_holding -diagnostic_msgs/DiagnosticStatus[] diagnostics_nf # diagnostics categorized as no fault -diagnostic_msgs/DiagnosticStatus[] diagnostics_sf # diagnostics categorized as safe fault -diagnostic_msgs/DiagnosticStatus[] diagnostics_lf # diagnostics categorized as latent fault -diagnostic_msgs/DiagnosticStatus[] diagnostics_spf # diagnostics categorized as single point fault diff --git a/messages/tier4_system_msgs/msg/HazardStatusStamped.msg b/messages/tier4_system_msgs/msg/HazardStatusStamped.msg deleted file mode 100644 index cdba05624f6a0..0000000000000 --- a/messages/tier4_system_msgs/msg/HazardStatusStamped.msg +++ /dev/null @@ -1,2 +0,0 @@ -std_msgs/Header header -tier4_system_msgs/HazardStatus status diff --git a/messages/tier4_system_msgs/package.xml b/messages/tier4_system_msgs/package.xml deleted file mode 100644 index 0f61ac5817ff1..0000000000000 --- a/messages/tier4_system_msgs/package.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - tier4_system_msgs - 0.1.0 - The tier4_system_msgs package - Kenji Miyake - Apache License 2.0 - - ament_cmake_auto - - rosidl_default_generators - - diagnostic_msgs - std_msgs - - rosidl_default_runtime - - ament_lint_auto - ament_lint_common - - rosidl_interface_packages - - - ament_cmake - - diff --git a/messages/tier4_v2x_msgs/CMakeLists.txt b/messages/tier4_v2x_msgs/CMakeLists.txt deleted file mode 100644 index 013cabf7bcee8..0000000000000 --- a/messages/tier4_v2x_msgs/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(tier4_v2x_msgs) - -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) -endif() - -find_package(ament_cmake_auto REQUIRED) -ament_auto_find_build_dependencies() - -rosidl_generate_interfaces(${PROJECT_NAME} - "msg/InfrastructureCommand.msg" - "msg/InfrastructureCommandArray.msg" - "msg/KeyValue.msg" - "msg/VirtualTrafficLightState.msg" - "msg/VirtualTrafficLightStateArray.msg" - DEPENDENCIES - std_msgs -) - -if(BUILD_TESTING) - find_package(ament_lint_auto REQUIRED) - ament_lint_auto_find_test_dependencies() -endif() - -ament_auto_package() diff --git a/messages/tier4_v2x_msgs/msg/InfrastructureCommand.msg b/messages/tier4_v2x_msgs/msg/InfrastructureCommand.msg deleted file mode 100644 index f5493d9d20f6d..0000000000000 --- a/messages/tier4_v2x_msgs/msg/InfrastructureCommand.msg +++ /dev/null @@ -1,13 +0,0 @@ -# constants -uint8 NONE=0 -uint8 REQUESTING=1 -uint8 PASSING=2 -uint8 FINALIZING=3 -uint8 FINALIZED=4 - -# fields -builtin_interfaces/Time stamp -string type -string id -tier4_v2x_msgs/KeyValue[] custom_tags # custom tags are set based on the 'type' -uint8 state diff --git a/messages/tier4_v2x_msgs/msg/InfrastructureCommandArray.msg b/messages/tier4_v2x_msgs/msg/InfrastructureCommandArray.msg deleted file mode 100644 index 256de7f9f3f6f..0000000000000 --- a/messages/tier4_v2x_msgs/msg/InfrastructureCommandArray.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -tier4_v2x_msgs/InfrastructureCommand[] commands diff --git a/messages/tier4_v2x_msgs/msg/KeyValue.msg b/messages/tier4_v2x_msgs/msg/KeyValue.msg deleted file mode 100644 index 6f825d5f60c2c..0000000000000 --- a/messages/tier4_v2x_msgs/msg/KeyValue.msg +++ /dev/null @@ -1,2 +0,0 @@ -string key -string value diff --git a/messages/tier4_v2x_msgs/msg/VirtualTrafficLightState.msg b/messages/tier4_v2x_msgs/msg/VirtualTrafficLightState.msg deleted file mode 100644 index e0e9c6269707b..0000000000000 --- a/messages/tier4_v2x_msgs/msg/VirtualTrafficLightState.msg +++ /dev/null @@ -1,5 +0,0 @@ -builtin_interfaces/Time stamp -string type -string id -bool approval -bool is_finalized # if finalization isn't required, always set to true diff --git a/messages/tier4_v2x_msgs/msg/VirtualTrafficLightStateArray.msg b/messages/tier4_v2x_msgs/msg/VirtualTrafficLightStateArray.msg deleted file mode 100644 index b1207ef97045d..0000000000000 --- a/messages/tier4_v2x_msgs/msg/VirtualTrafficLightStateArray.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -tier4_v2x_msgs/VirtualTrafficLightState[] states diff --git a/messages/tier4_v2x_msgs/package.xml b/messages/tier4_v2x_msgs/package.xml deleted file mode 100644 index d39a78e5fc747..0000000000000 --- a/messages/tier4_v2x_msgs/package.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - tier4_v2x_msgs - 0.1.0 - The tier4_v2x_msgs package - Kenji Miyake - Apache License 2.0 - - ament_cmake_auto - - rosidl_default_generators - - builtin_interfaces - std_msgs - - rosidl_default_runtime - - ament_lint_auto - ament_lint_common - - rosidl_interface_packages - - - ament_cmake - - diff --git a/messages/tier4_vehicle_msgs/CMakeLists.txt b/messages/tier4_vehicle_msgs/CMakeLists.txt deleted file mode 100644 index f2d8a6d22dbb5..0000000000000 --- a/messages/tier4_vehicle_msgs/CMakeLists.txt +++ /dev/null @@ -1,37 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(tier4_vehicle_msgs) - -if(NOT CMAKE_CXX_STANDARD) - set(CMAKE_CXX_STANDARD 14) -endif() - -if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") - add_compile_options(-Wall -Wextra -Wpedantic) -endif() - -find_package(ament_cmake_auto REQUIRED) -ament_auto_find_build_dependencies() - -rosidl_generate_interfaces(${PROJECT_NAME} - "msg/ActuationCommand.msg" - "msg/ActuationCommandStamped.msg" - "msg/ActuationStatus.msg" - "msg/ActuationStatusStamped.msg" - "msg/BatteryStatus.msg" - "msg/Shift.msg" - "msg/ShiftStamped.msg" - "msg/ControlMode.msg" - "msg/TurnSignal.msg" - "msg/Steering.msg" - "msg/SteeringWheelStatusStamped.msg" - "msg/VehicleEmergencyStamped.msg" - "srv/UpdateAccelBrakeMap.srv" - DEPENDENCIES std_msgs geometry_msgs tier4_control_msgs -) - -if(BUILD_TESTING) - find_package(ament_lint_auto REQUIRED) - ament_lint_auto_find_test_dependencies() -endif() - -ament_auto_package() diff --git a/messages/tier4_vehicle_msgs/msg/ActuationCommand.msg b/messages/tier4_vehicle_msgs/msg/ActuationCommand.msg deleted file mode 100644 index 2f7205f9dd430..0000000000000 --- a/messages/tier4_vehicle_msgs/msg/ActuationCommand.msg +++ /dev/null @@ -1,3 +0,0 @@ -float64 accel_cmd -float64 brake_cmd -float64 steer_cmd diff --git a/messages/tier4_vehicle_msgs/msg/ActuationCommandStamped.msg b/messages/tier4_vehicle_msgs/msg/ActuationCommandStamped.msg deleted file mode 100644 index dc3c68ab11105..0000000000000 --- a/messages/tier4_vehicle_msgs/msg/ActuationCommandStamped.msg +++ /dev/null @@ -1,2 +0,0 @@ -std_msgs/Header header -tier4_vehicle_msgs/ActuationCommand actuation diff --git a/messages/tier4_vehicle_msgs/msg/ActuationStatus.msg b/messages/tier4_vehicle_msgs/msg/ActuationStatus.msg deleted file mode 100644 index 28c3064c6c1e2..0000000000000 --- a/messages/tier4_vehicle_msgs/msg/ActuationStatus.msg +++ /dev/null @@ -1,3 +0,0 @@ -float64 accel_status -float64 brake_status -float64 steer_status diff --git a/messages/tier4_vehicle_msgs/msg/ActuationStatusStamped.msg b/messages/tier4_vehicle_msgs/msg/ActuationStatusStamped.msg deleted file mode 100644 index c037ef9a60711..0000000000000 --- a/messages/tier4_vehicle_msgs/msg/ActuationStatusStamped.msg +++ /dev/null @@ -1,2 +0,0 @@ -std_msgs/Header header -tier4_vehicle_msgs/ActuationStatus status diff --git a/messages/tier4_vehicle_msgs/msg/BatteryStatus.msg b/messages/tier4_vehicle_msgs/msg/BatteryStatus.msg deleted file mode 100644 index a38a76c07de91..0000000000000 --- a/messages/tier4_vehicle_msgs/msg/BatteryStatus.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -float32 energy_level diff --git a/messages/tier4_vehicle_msgs/msg/ControlMode.msg b/messages/tier4_vehicle_msgs/msg/ControlMode.msg deleted file mode 100644 index 7636c2e4f9752..0000000000000 --- a/messages/tier4_vehicle_msgs/msg/ControlMode.msg +++ /dev/null @@ -1,7 +0,0 @@ -std_msgs/Header header -uint8 MANUAL = 0 -uint8 AUTO = 1 -uint8 AUTO_STEER_ONLY = 2 -uint8 AUTO_PEDAL_ONLY = 3 - -int32 data diff --git a/messages/tier4_vehicle_msgs/msg/Shift.msg b/messages/tier4_vehicle_msgs/msg/Shift.msg deleted file mode 100644 index a7db87dffb9dc..0000000000000 --- a/messages/tier4_vehicle_msgs/msg/Shift.msg +++ /dev/null @@ -1,8 +0,0 @@ -uint8 NONE=0 -uint8 PARKING=1 -uint8 REVERSE=2 -uint8 NEUTRAL=3 -uint8 DRIVE=4 -uint8 LOW=5 - -int32 data diff --git a/messages/tier4_vehicle_msgs/msg/ShiftStamped.msg b/messages/tier4_vehicle_msgs/msg/ShiftStamped.msg deleted file mode 100644 index 33abb5cf2675c..0000000000000 --- a/messages/tier4_vehicle_msgs/msg/ShiftStamped.msg +++ /dev/null @@ -1,2 +0,0 @@ -std_msgs/Header header -tier4_vehicle_msgs/Shift shift diff --git a/messages/tier4_vehicle_msgs/msg/Steering.msg b/messages/tier4_vehicle_msgs/msg/Steering.msg deleted file mode 100644 index 2072419759a45..0000000000000 --- a/messages/tier4_vehicle_msgs/msg/Steering.msg +++ /dev/null @@ -1,2 +0,0 @@ -std_msgs/Header header -float32 data diff --git a/messages/tier4_vehicle_msgs/msg/SteeringWheelStatusStamped.msg b/messages/tier4_vehicle_msgs/msg/SteeringWheelStatusStamped.msg deleted file mode 100644 index 8d02ab5282df9..0000000000000 --- a/messages/tier4_vehicle_msgs/msg/SteeringWheelStatusStamped.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -float32 data diff --git a/messages/tier4_vehicle_msgs/msg/TurnSignal.msg b/messages/tier4_vehicle_msgs/msg/TurnSignal.msg deleted file mode 100644 index b8cade81f7392..0000000000000 --- a/messages/tier4_vehicle_msgs/msg/TurnSignal.msg +++ /dev/null @@ -1,8 +0,0 @@ -std_msgs/Header header - -uint8 NONE = 0 -uint8 LEFT = 1 -uint8 RIGHT = 2 -uint8 HAZARD = 3 - -int32 data diff --git a/messages/tier4_vehicle_msgs/msg/VehicleEmergencyStamped.msg b/messages/tier4_vehicle_msgs/msg/VehicleEmergencyStamped.msg deleted file mode 100644 index b6f2933e20c8c..0000000000000 --- a/messages/tier4_vehicle_msgs/msg/VehicleEmergencyStamped.msg +++ /dev/null @@ -1,2 +0,0 @@ -builtin_interfaces/Time stamp -bool emergency diff --git a/messages/tier4_vehicle_msgs/package.xml b/messages/tier4_vehicle_msgs/package.xml deleted file mode 100644 index 40b1d2c33b134..0000000000000 --- a/messages/tier4_vehicle_msgs/package.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - tier4_vehicle_msgs - 0.1.0 - The tier4_vehicle_msgs package - Takamasa Horibe - Apache License 2.0 - - ament_cmake_auto - - rosidl_default_generators - - geometry_msgs - std_msgs - tier4_control_msgs - - rosidl_default_runtime - - ament_lint_auto - ament_lint_common - - rosidl_interface_packages - - - ament_cmake - - diff --git a/messages/tier4_vehicle_msgs/srv/UpdateAccelBrakeMap.srv b/messages/tier4_vehicle_msgs/srv/UpdateAccelBrakeMap.srv deleted file mode 100644 index ee90ecbe53513..0000000000000 --- a/messages/tier4_vehicle_msgs/srv/UpdateAccelBrakeMap.srv +++ /dev/null @@ -1,4 +0,0 @@ -string path # path to directory the map will be saved ---- -bool success # indicate successful run of triggered service -string message # informational, e.g. for error messages