diff --git a/common/math/arithmetic/CHANGELOG.rst b/common/math/arithmetic/CHANGELOG.rst index 02567f2d4dd..d73a0195446 100644 --- a/common/math/arithmetic/CHANGELOG.rst +++ b/common/math/arithmetic/CHANGELOG.rst @@ -21,6 +21,14 @@ Changelog for package arithmetic * Merge remote-tracking branch 'origin/master' into feature/publish_empty_context * Contributors: Masaya Kataoka +7.4.4 (2025-01-09) +------------------ +* Merge branch 'master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Contributors: Tatsuya Yamasaki, yamacir-kit + 7.4.3 (2025-01-07) ------------------ * Merge branch 'master' into tmp/pc-patch diff --git a/common/math/arithmetic/package.xml b/common/math/arithmetic/package.xml index ea08be22776..8edc48322c4 100644 --- a/common/math/arithmetic/package.xml +++ b/common/math/arithmetic/package.xml @@ -2,7 +2,7 @@ arithmetic - 7.4.3 + 7.4.4 arithmetic library for scenario_simulator_v2 Tatsuya Yamasaki Apache License 2.0 diff --git a/common/math/geometry/CHANGELOG.rst b/common/math/geometry/CHANGELOG.rst index a6f7b5c069e..1f4bca4c951 100644 --- a/common/math/geometry/CHANGELOG.rst +++ b/common/math/geometry/CHANGELOG.rst @@ -21,6 +21,14 @@ Changelog for package geometry * Merge remote-tracking branch 'origin/master' into feature/publish_empty_context * Contributors: Masaya Kataoka +7.4.4 (2025-01-09) +------------------ +* Merge branch 'master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Contributors: Tatsuya Yamasaki, yamacir-kit + 7.4.3 (2025-01-07) ------------------ * Merge branch 'master' into tmp/pc-patch diff --git a/common/math/geometry/package.xml b/common/math/geometry/package.xml index b1b778651e5..fe011da01fa 100644 --- a/common/math/geometry/package.xml +++ b/common/math/geometry/package.xml @@ -2,7 +2,7 @@ geometry - 7.4.3 + 7.4.4 geometry math library for scenario_simulator_v2 application Masaya Kataoka Apache License 2.0 diff --git a/common/scenario_simulator_exception/CHANGELOG.rst b/common/scenario_simulator_exception/CHANGELOG.rst index 7b058931c9b..fa31e09cdb2 100644 --- a/common/scenario_simulator_exception/CHANGELOG.rst +++ b/common/scenario_simulator_exception/CHANGELOG.rst @@ -21,6 +21,14 @@ Changelog for package scenario_simulator_exception * Merge remote-tracking branch 'origin/master' into feature/publish_empty_context * Contributors: Masaya Kataoka +7.4.4 (2025-01-09) +------------------ +* Merge branch 'master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Contributors: Tatsuya Yamasaki, yamacir-kit + 7.4.3 (2025-01-07) ------------------ * Merge branch 'master' into tmp/pc-patch diff --git a/common/scenario_simulator_exception/package.xml b/common/scenario_simulator_exception/package.xml index 91a882fa264..fc6e0a48bab 100644 --- a/common/scenario_simulator_exception/package.xml +++ b/common/scenario_simulator_exception/package.xml @@ -2,7 +2,7 @@ scenario_simulator_exception - 7.4.3 + 7.4.4 Exception types for scenario simulator Tatsuya Yamasaki Apache License 2.0 diff --git a/common/simple_junit/CHANGELOG.rst b/common/simple_junit/CHANGELOG.rst index ba5ef333708..fd039b7a510 100644 --- a/common/simple_junit/CHANGELOG.rst +++ b/common/simple_junit/CHANGELOG.rst @@ -21,6 +21,14 @@ Changelog for package junit_exporter * Merge remote-tracking branch 'origin/master' into feature/publish_empty_context * Contributors: Masaya Kataoka +7.4.4 (2025-01-09) +------------------ +* Merge branch 'master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Contributors: Tatsuya Yamasaki, yamacir-kit + 7.4.3 (2025-01-07) ------------------ * Merge branch 'master' into tmp/pc-patch diff --git a/common/simple_junit/package.xml b/common/simple_junit/package.xml index 7de1075e65a..6519c5cc5bc 100644 --- a/common/simple_junit/package.xml +++ b/common/simple_junit/package.xml @@ -2,7 +2,7 @@ simple_junit - 7.4.3 + 7.4.4 Lightweight JUnit library for ROS 2 Masaya Kataoka Tatsuya Yamasaki diff --git a/common/status_monitor/CHANGELOG.rst b/common/status_monitor/CHANGELOG.rst index 1e876532669..fe9a2976b0f 100644 --- a/common/status_monitor/CHANGELOG.rst +++ b/common/status_monitor/CHANGELOG.rst @@ -21,6 +21,14 @@ Changelog for package status_monitor * Merge remote-tracking branch 'origin/master' into feature/publish_empty_context * Contributors: Masaya Kataoka +7.4.4 (2025-01-09) +------------------ +* Merge branch 'master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Contributors: Tatsuya Yamasaki, yamacir-kit + 7.4.3 (2025-01-07) ------------------ * Merge branch 'master' into tmp/pc-patch diff --git a/common/status_monitor/package.xml b/common/status_monitor/package.xml index eedbbc59161..4f98560d2fa 100644 --- a/common/status_monitor/package.xml +++ b/common/status_monitor/package.xml @@ -2,7 +2,7 @@ status_monitor - 7.4.3 + 7.4.4 none Tatsuya Yamasaki Apache License 2.0 diff --git a/external/concealer/CHANGELOG.rst b/external/concealer/CHANGELOG.rst index a7d1ea1c46b..31eba628dc5 100644 --- a/external/concealer/CHANGELOG.rst +++ b/external/concealer/CHANGELOG.rst @@ -21,6 +21,29 @@ Changelog for package concealer * Merge remote-tracking branch 'origin/master' into feature/publish_empty_context * Contributors: Masaya Kataoka +7.4.4 (2025-01-09) +------------------ +* Merge pull request `#1497 `_ from tier4/refactor/concealer-2 + Refactor/concealer 2 +* Merge branch 'master' into refactor/concealer-2 +* Cleanup member function `FieldOperatorApplication::sendCooperateCommand` +* Move function `isValidCooperateStatus` into `sendCooperateCommand` +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Remove some member accessor from struct `FieldOperatorApplication` +* Remove member function `FieldOperatorApplication::getAutowareStateName` +* Remove data member `FieldOperatorApplication::latest_cooperate_status_array` +* Remove member function `AutowareUniverse::updateVehicleState` +* Remove member function `AutowareUniverse::updateLocalization` +* Cleanup `ControlModeCommand` service callback +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Remove static member function `EgoEntity::makeFieldOperatorApplication` +* Rename class `ServiceWithValidation` to `Service` +* Rename class `SubscriberWrapper` to `Subscriber` +* Lipsticks +* Rename class `PublisherWrapper` to `Publisher` +* Contributors: Tatsuya Yamasaki, yamacir-kit + 7.4.3 (2025-01-07) ------------------ * Merge branch 'master' into tmp/pc-patch diff --git a/external/concealer/include/concealer/autoware_universe.hpp b/external/concealer/include/concealer/autoware_universe.hpp index 34c1bda7afd..3e28ffe89c3 100644 --- a/external/concealer/include/concealer/autoware_universe.hpp +++ b/external/concealer/include/concealer/autoware_universe.hpp @@ -26,8 +26,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -57,19 +57,19 @@ class AutowareUniverse : public rclcpp::Node, using TurnIndicatorsReport = autoware_vehicle_msgs::msg::TurnIndicatorsReport; using VelocityReport = autoware_vehicle_msgs::msg::VelocityReport; - SubscriberWrapper getCommand; - SubscriberWrapper getGearCommand; - SubscriberWrapper getTurnIndicatorsCommand; - SubscriberWrapper getPathWithLaneId; + Subscriber getCommand; + Subscriber getGearCommand; + Subscriber getTurnIndicatorsCommand; + Subscriber getPathWithLaneId; - PublisherWrapper setAcceleration; - PublisherWrapper setOdometry; - PublisherWrapper setPose; - PublisherWrapper setSteeringReport; - PublisherWrapper setGearReport; - PublisherWrapper setControlModeReport; - PublisherWrapper setVelocityReport; - PublisherWrapper setTurnIndicatorsReport; + Publisher setAcceleration; + Publisher setOdometry; + Publisher setPose; + Publisher setSteeringReport; + Publisher setGearReport; + Publisher setControlModeReport; + Publisher setVelocityReport; + Publisher setTurnIndicatorsReport; std::atomic current_acceleration; std::atomic current_pose; @@ -83,7 +83,7 @@ class AutowareUniverse : public rclcpp::Node, const rclcpp::TimerBase::SharedPtr vehicle_state_update_timer; - std::thread localization_and_vehicle_state_update_thread; + std::thread spinner; std::atomic is_stop_requested = false; @@ -100,10 +100,6 @@ class AutowareUniverse : public rclcpp::Node, auto rethrow() -> void; - auto updateLocalization() -> void; - - auto updateVehicleState() -> void; - auto getVehicleCommand() const -> std::tuple; auto getRouteLanelets() const -> std::vector; diff --git a/external/concealer/include/concealer/field_operator_application.hpp b/external/concealer/include/concealer/field_operator_application.hpp index db11a70de50..7118d87fdf7 100644 --- a/external/concealer/include/concealer/field_operator_application.hpp +++ b/external/concealer/include/concealer/field_operator_application.hpp @@ -31,10 +31,9 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include #include #include #include @@ -55,19 +54,6 @@ namespace concealer { -/* ---- NOTE ------------------------------------------------------------------- - * - * The magic class 'FieldOperatorApplication' is a class that makes it easy to work with - * Autoware from C++. The main features of this class are as follows - * - * (1) Launch Autoware in an independent process upon instantiation of the - * class. - * (2) Properly terminates the Autoware process started by the constructor - * upon destruction of the class. - * (3) Probably the simplest instructions to Autoware, consisting of - * initialize, plan, and engage. - * - * -------------------------------------------------------------------------- */ struct FieldOperatorApplication : public rclcpp::Node, public TransitionAssertion { @@ -77,11 +63,9 @@ struct FieldOperatorApplication : public rclcpp::Node, const pid_t process_id = 0; - bool initialize_was_called = false; + bool initialized = false; - std::string autoware_state; - - tier4_rtc_msgs::msg::CooperateStatusArray latest_cooperate_status_array; + std::string autoware_state = "LAUNCHING"; std::string minimum_risk_maneuver_state; @@ -107,26 +91,26 @@ struct FieldOperatorApplication : public rclcpp::Node, using SetVelocityLimit = tier4_external_api_msgs::srv::SetVelocityLimit; using ChangeOperationMode = autoware_adapi_v1_msgs::srv::ChangeOperationMode; - SubscriberWrapper getAutowareState; - SubscriberWrapper getCommand; - SubscriberWrapper getCooperateStatusArray; - SubscriberWrapper getEmergencyState; + Subscriber getAutowareState; + Subscriber getCommand; + Subscriber getCooperateStatusArray; + Subscriber getEmergencyState; #if __has_include() - SubscriberWrapper getLocalizationState; + Subscriber getLocalizationState; #endif - SubscriberWrapper getMrmState; - SubscriberWrapper getPathWithLaneId; - SubscriberWrapper getTrajectory; - SubscriberWrapper getTurnIndicatorsCommand; - - ServiceWithValidation requestClearRoute; - ServiceWithValidation requestCooperateCommands; - ServiceWithValidation requestEngage; - ServiceWithValidation requestInitialPose; - ServiceWithValidation requestSetRoutePoints; - ServiceWithValidation requestSetRtcAutoMode; - ServiceWithValidation requestSetVelocityLimit; - ServiceWithValidation requestEnableAutowareControl; + Subscriber getMrmState; + Subscriber getPathWithLaneId; + Subscriber getTrajectory; + Subscriber getTurnIndicatorsCommand; + + Service requestClearRoute; + Service requestCooperateCommands; + Service requestEngage; + Service requestInitialPose; + Service requestSetRoutePoints; + Service requestSetRtcAutoMode; + Service requestSetVelocityLimit; + Service requestEnableAutowareControl; // clang-format on /* @@ -136,13 +120,7 @@ struct FieldOperatorApplication : public rclcpp::Node, */ TaskQueue task_queue; - CONCEALER_PUBLIC explicit FieldOperatorApplication(const pid_t = 0); - - template - CONCEALER_PUBLIC explicit FieldOperatorApplication(Ts &&... xs) - : FieldOperatorApplication(ros2_launch(std::forward(xs)...)) - { - } + CONCEALER_PUBLIC explicit FieldOperatorApplication(const pid_t); ~FieldOperatorApplication(); @@ -160,18 +138,8 @@ struct FieldOperatorApplication : public rclcpp::Node, auto clearRoute() -> void; - auto getAutowareStateName() const { return autoware_state; } - - auto getMinimumRiskManeuverBehaviorName() const { return minimum_risk_maneuver_behavior; } - - auto getMinimumRiskManeuverStateName() const { return minimum_risk_maneuver_state; } - - auto getEmergencyStateName() const { return minimum_risk_maneuver_state; } - auto getWaypoints() const -> traffic_simulator_msgs::msg::WaypointsArray; - auto initialized() const noexcept { return initialize_was_called; } - auto requestAutoModeForCooperation(const std::string &, bool) -> void; auto rethrow() const { task_queue.rethrow(); } diff --git a/external/concealer/include/concealer/publisher_wrapper.hpp b/external/concealer/include/concealer/publisher.hpp similarity index 55% rename from external/concealer/include/concealer/publisher_wrapper.hpp rename to external/concealer/include/concealer/publisher.hpp index 472ae028c8f..aeb323084e4 100644 --- a/external/concealer/include/concealer/publisher_wrapper.hpp +++ b/external/concealer/include/concealer/publisher.hpp @@ -12,33 +12,32 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CONCEALER__PUBLISHER_WRAPPER_HPP_ -#define CONCEALER__PUBLISHER_WRAPPER_HPP_ +#ifndef CONCEALER__PUBLISHER_HPP_ +#define CONCEALER__PUBLISHER_HPP_ #include #include namespace concealer { -template -class PublisherWrapper +template +class Publisher { -private: - typename rclcpp::Publisher::SharedPtr publisher; + typename rclcpp::Publisher::SharedPtr publisher; public: - auto operator()(const MessageType & message) const -> decltype(auto) + template + explicit Publisher(const std::string & topic, Node & node) + : publisher(node.template create_publisher(topic, rclcpp::QoS(1).reliable())) { - return publisher->publish(message); } - template - explicit PublisherWrapper(std::string topic, NodeInterface & autoware_interface) - : publisher( - autoware_interface.template create_publisher(topic, rclcpp::QoS(1).reliable())) + template + auto operator()(Ts &&... xs) const -> decltype(auto) { + return publisher->publish(std::forward(xs)...); } }; } // namespace concealer -#endif // CONCEALER__PUBLISHER_WRAPPER_HPP_ +#endif // CONCEALER__PUBLISHER_HPP_ diff --git a/external/concealer/include/concealer/service_with_validation.hpp b/external/concealer/include/concealer/service.hpp similarity index 92% rename from external/concealer/include/concealer/service_with_validation.hpp rename to external/concealer/include/concealer/service.hpp index 6b49df8d0f0..171cad0e729 100644 --- a/external/concealer/include/concealer/service_with_validation.hpp +++ b/external/concealer/include/concealer/service.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CONCEALER__SERVICE_WITH_VALIDATION_HPP_ -#define CONCEALER__SERVICE_WITH_VALIDATION_HPP_ +#ifndef CONCEALER__SERVICE_HPP_ +#define CONCEALER__SERVICE_HPP_ #include #include @@ -28,7 +28,7 @@ namespace concealer { template -class ServiceWithValidation +class Service { const std::string service_name; @@ -39,13 +39,13 @@ class ServiceWithValidation rclcpp::WallRate validation_rate; public: - template - explicit ServiceWithValidation( - const std::string & service_name, FieldOperatorApplication & autoware, + template + explicit Service( + const std::string & service_name, Node & node, const std::chrono::nanoseconds validation_interval = std::chrono::seconds(1)) : service_name(service_name), - logger(autoware.get_logger()), - client(autoware.template create_client(service_name, rmw_qos_profile_default)), + logger(node.get_logger()), + client(node.template create_client(service_name, rmw_qos_profile_default)), validation_rate(validation_interval) { } @@ -142,4 +142,4 @@ class ServiceWithValidation }; } // namespace concealer -#endif //CONCEALER__SERVICE_WITH_VALIDATION_HPP_ +#endif //CONCEALER__SERVICE_HPP_ diff --git a/external/concealer/include/concealer/subscriber_wrapper.hpp b/external/concealer/include/concealer/subscriber.hpp similarity index 89% rename from external/concealer/include/concealer/subscriber_wrapper.hpp rename to external/concealer/include/concealer/subscriber.hpp index eb4fde75af0..e08c74cf7b0 100644 --- a/external/concealer/include/concealer/subscriber_wrapper.hpp +++ b/external/concealer/include/concealer/subscriber.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CONCEALER__SUBSCRIBER_WRAPPER_HPP_ -#define CONCEALER__SUBSCRIBER_WRAPPER_HPP_ +#ifndef CONCEALER__SUBSCRIBER_HPP_ +#define CONCEALER__SUBSCRIBER_HPP_ #include #include @@ -21,17 +21,16 @@ namespace concealer { template -class SubscriberWrapper +struct Subscriber { typename Message::ConstSharedPtr current_value = std::make_shared(); typename rclcpp::Subscription::SharedPtr subscription; -public: auto operator()() const -> const auto & { return *std::atomic_load(¤t_value); } template - explicit SubscriberWrapper( + explicit Subscriber( const std::string & topic, const rclcpp::QoS & quality_of_service, Autoware & autoware, const Callback & callback) : subscription(autoware.template create_subscription( @@ -45,7 +44,7 @@ class SubscriberWrapper } template - explicit SubscriberWrapper( + explicit Subscriber( const std::string & topic, const rclcpp::QoS & quality_of_service, Autoware & autoware) : subscription(autoware.template create_subscription( topic, quality_of_service, [this](const typename Message::ConstSharedPtr & message) { @@ -56,4 +55,4 @@ class SubscriberWrapper }; } // namespace concealer -#endif // CONCEALER__SUBSCRIBER_WRAPPER_HPP_ +#endif // CONCEALER__SUBSCRIBER_HPP_ diff --git a/external/concealer/package.xml b/external/concealer/package.xml index 62be863d443..33bd949556b 100644 --- a/external/concealer/package.xml +++ b/external/concealer/package.xml @@ -2,7 +2,7 @@ concealer - 7.4.3 + 7.4.4 Provides a class 'Autoware' to conceal miscellaneous things to simplify Autoware management of the simulator. Tatsuya Yamasaki Apache License 2.0 diff --git a/external/concealer/src/autoware_universe.cpp b/external/concealer/src/autoware_universe.cpp index 7467290ce20..b67bdbe7fd1 100644 --- a/external/concealer/src/autoware_universe.cpp +++ b/external/concealer/src/autoware_universe.cpp @@ -46,26 +46,110 @@ AutowareUniverse::AutowareUniverse(bool simulate_localization) [this]( const ControlModeCommand::Request::SharedPtr request, ControlModeCommand::Response::SharedPtr response) { - if (request->mode == ControlModeCommand::Request::AUTONOMOUS) { - current_control_mode.store(ControlModeReport::AUTONOMOUS); - response->success = true; - } else if (request->mode == ControlModeCommand::Request::MANUAL) { - /* - NOTE: MANUAL request will come when a remote override is triggered. - But scenario_simulator_v2 don't support a remote override for now. - */ - response->success = false; - } else { - response->success = false; + switch (request->mode) { + case ControlModeCommand::Request::AUTONOMOUS: + current_control_mode.store(ControlModeReport::AUTONOMOUS); + response->success = true; + break; + case ControlModeCommand::Request::MANUAL: + /* + NOTE: MANUAL request will come when a remote override is + triggered. But scenario_simulator_v2 don't support a remote + override for now. + */ + response->success = false; + break; + default: + response->success = false; + break; } })), - localization_update_timer( - rclcpp::create_timer( // Autoware.Universe requires localization topics to send data at 50Hz - this, get_clock(), std::chrono::milliseconds(20), [this]() { updateLocalization(); })), - vehicle_state_update_timer( - rclcpp::create_timer( // Autoware.Universe requires vehicle state topics to send data at 30Hz - this, get_clock(), std::chrono::milliseconds(33), [this]() { updateVehicleState(); })), - localization_and_vehicle_state_update_thread(std::thread([this]() { + localization_update_timer(rclcpp::create_timer( + this, get_clock(), + std::chrono::milliseconds( + 20), // Autoware.Universe requires localization topics to send data at 50Hz + [this]() { + setAcceleration([this]() { + AccelWithCovarianceStamped message; + message.header.stamp = get_clock()->now(); + message.header.frame_id = "/base_link"; + message.accel.accel = current_acceleration.load(); + message.accel.covariance.at(6 * 0 + 0) = 0.001; // linear x + message.accel.covariance.at(6 * 1 + 1) = 0.001; // linear y + message.accel.covariance.at(6 * 2 + 2) = 0.001; // linear z + message.accel.covariance.at(6 * 3 + 3) = 0.001; // angular x + message.accel.covariance.at(6 * 4 + 4) = 0.001; // angular y + message.accel.covariance.at(6 * 5 + 5) = 0.001; // angular z + return message; + }()); + + setOdometry([this]() { + Odometry message; + message.header.stamp = get_clock()->now(); + message.header.frame_id = "map"; + message.pose.pose = current_pose.load(); + message.pose.covariance = {}; + message.twist.twist = current_twist.load(); + return message; + }()); + + setPose([this]() { + // See https://github.com/tier4/autoware.universe/blob/45ab20af979c5663e5a8d4dda787b1dea8d6e55b/simulator/simple_planning_simulator/src/simple_planning_simulator/simple_planning_simulator_core.cpp#L785-L803 + PoseWithCovarianceStamped message; + message.header.stamp = get_clock()->now(); + message.header.frame_id = "map"; + message.pose.pose = current_pose.load(); + message.pose.covariance.at(6 * 0 + 0) = 0.0225; // XYZRPY_COV_IDX::X_X + message.pose.covariance.at(6 * 1 + 1) = 0.0225; // XYZRPY_COV_IDX::Y_Y + message.pose.covariance.at(6 * 2 + 2) = 0.0225; // XYZRPY_COV_IDX::Z_Z + message.pose.covariance.at(6 * 3 + 3) = 0.000625; // XYZRPY_COV_IDX::ROLL_ROLL + message.pose.covariance.at(6 * 4 + 4) = 0.000625; // XYZRPY_COV_IDX::PITCH_PITCH + message.pose.covariance.at(6 * 5 + 5) = 0.000625; // XYZRPY_COV_IDX::YAW_YAW + return message; + }()); + + setTransform(current_pose.load()); + })), + vehicle_state_update_timer(rclcpp::create_timer( + this, get_clock(), + std::chrono::milliseconds( + 33), // Autoware.Universe requires vehicle state topics to send data at 30Hz + [this]() { + setControlModeReport(getControlModeReport()); + + setGearReport([this]() { + GearReport message; + message.stamp = get_clock()->now(); + message.report = getGearCommand().command; + return message; + }()); + + setSteeringReport([this]() { + SteeringReport message; + message.stamp = get_clock()->now(); + message.steering_tire_angle = getCommand().lateral.steering_tire_angle; + return message; + }()); + + setVelocityReport([this]() { + const auto twist = current_twist.load(); + VelocityReport message; + message.header.stamp = get_clock()->now(); + message.header.frame_id = "base_link"; + message.longitudinal_velocity = twist.linear.x; + message.lateral_velocity = twist.linear.y; + message.heading_rate = twist.angular.z; + return message; + }()); + + setTurnIndicatorsReport([this]() { + TurnIndicatorsReport message; + message.stamp = get_clock()->now(); + message.report = getTurnIndicatorsCommand().command; + return message; + }()); + })), + spinner(std::thread([this]() { try { while (rclcpp::ok() and not is_stop_requested.load()) { rclcpp::spin_some(get_node_base_interface()); @@ -81,7 +165,7 @@ AutowareUniverse::AutowareUniverse(bool simulate_localization) AutowareUniverse::~AutowareUniverse() { is_stop_requested.store(true); - localization_and_vehicle_state_update_thread.join(); + spinner.join(); } auto AutowareUniverse::rethrow() -> void @@ -91,87 +175,6 @@ auto AutowareUniverse::rethrow() -> void } } -auto AutowareUniverse::updateLocalization() -> void -{ - setAcceleration([this]() { - AccelWithCovarianceStamped message; - message.header.stamp = get_clock()->now(); - message.header.frame_id = "/base_link"; - message.accel.accel = current_acceleration.load(); - message.accel.covariance.at(6 * 0 + 0) = 0.001; // linear x - message.accel.covariance.at(6 * 1 + 1) = 0.001; // linear y - message.accel.covariance.at(6 * 2 + 2) = 0.001; // linear z - message.accel.covariance.at(6 * 3 + 3) = 0.001; // angular x - message.accel.covariance.at(6 * 4 + 4) = 0.001; // angular y - message.accel.covariance.at(6 * 5 + 5) = 0.001; // angular z - return message; - }()); - - setOdometry([this]() { - Odometry message; - message.header.stamp = get_clock()->now(); - message.header.frame_id = "map"; - message.pose.pose = current_pose.load(); - message.pose.covariance = {}; - message.twist.twist = current_twist.load(); - return message; - }()); - - setPose([this]() { - // See https://github.com/tier4/autoware.universe/blob/45ab20af979c5663e5a8d4dda787b1dea8d6e55b/simulator/simple_planning_simulator/src/simple_planning_simulator/simple_planning_simulator_core.cpp#L785-L803 - PoseWithCovarianceStamped message; - message.header.stamp = get_clock()->now(); - message.header.frame_id = "map"; - message.pose.pose = current_pose.load(); - message.pose.covariance.at(6 * 0 + 0) = 0.0225; // XYZRPY_COV_IDX::X_X - message.pose.covariance.at(6 * 1 + 1) = 0.0225; // XYZRPY_COV_IDX::Y_Y - message.pose.covariance.at(6 * 2 + 2) = 0.0225; // XYZRPY_COV_IDX::Z_Z - message.pose.covariance.at(6 * 3 + 3) = 0.000625; // XYZRPY_COV_IDX::ROLL_ROLL - message.pose.covariance.at(6 * 4 + 4) = 0.000625; // XYZRPY_COV_IDX::PITCH_PITCH - message.pose.covariance.at(6 * 5 + 5) = 0.000625; // XYZRPY_COV_IDX::YAW_YAW - return message; - }()); - - setTransform(current_pose.load()); -} - -auto AutowareUniverse::updateVehicleState() -> void -{ - setControlModeReport(getControlModeReport()); - - setGearReport([this]() { - GearReport message; - message.stamp = get_clock()->now(); - message.report = getGearCommand().command; - return message; - }()); - - setSteeringReport([this]() { - SteeringReport message; - message.stamp = get_clock()->now(); - message.steering_tire_angle = getCommand().lateral.steering_tire_angle; - return message; - }()); - - setVelocityReport([this]() { - const auto twist = current_twist.load(); - VelocityReport message; - message.header.stamp = get_clock()->now(); - message.header.frame_id = "base_link"; - message.longitudinal_velocity = twist.linear.x; - message.lateral_velocity = twist.linear.y; - message.heading_rate = twist.angular.z; - return message; - }()); - - setTurnIndicatorsReport([this]() { - TurnIndicatorsReport message; - message.stamp = get_clock()->now(); - message.report = getTurnIndicatorsCommand().command; - return message; - }()); -} - auto AutowareUniverse::getVehicleCommand() const -> std::tuple { const auto control_command = getCommand(); diff --git a/external/concealer/src/field_operator_application.cpp b/external/concealer/src/field_operator_application.cpp index 1c7cf0d04e7..5e42344bf14 100644 --- a/external/concealer/src/field_operator_application.cpp +++ b/external/concealer/src/field_operator_application.cpp @@ -76,34 +76,6 @@ auto toModuleType(const std::string & module_name) } } -template -bool isValidCooperateStatus( - const CooperateStatusType & cooperate_status, std::uint8_t command_type, std::uint8_t module_type) -{ - /** - * NOTE1: the finish_distance filter is set to over -20.0, - * because some valid rtc statuses has negative finish_distance due to the errors of - * localization or numerical calculation. This threshold is advised by a member of TIER IV - * planning and control team. - */ - - /** - * NOTE2: The difference in the variable referred as a distance is the impact of the - * message specification changes in the following URL. - * This was also decided after consulting with a member of TIER IV planning and control team. - * ref: https://github.com/tier4/tier4_autoware_msgs/commit/8b85e6e43aa48cf4a439c77bf4bf6aee2e70c3ef - */ - if constexpr (DetectMember_distance::value) { - return cooperate_status.module.type == module_type && - command_type != cooperate_status.command_status.type && - cooperate_status.distance >= -20.0; - } else { - return cooperate_status.module.type == module_type && - command_type != cooperate_status.command_status.type && - cooperate_status.finish_distance >= -20.0; - } -} - // clang-format off FieldOperatorApplication::FieldOperatorApplication(const pid_t pid) : rclcpp::Node("concealer_user", "simulation", rclcpp::NodeOptions().use_global_arguments(false)), @@ -133,7 +105,7 @@ FieldOperatorApplication::FieldOperatorApplication(const pid_t pid) autoware_state = state_name_of(message.state); }), getCommand("/control/command/control_cmd", rclcpp::QoS(1), *this), - getCooperateStatusArray("/api/external/get/rtc_status", rclcpp::QoS(1), *this, [this](const auto & v) { latest_cooperate_status_array = v; }), + getCooperateStatusArray("/api/external/get/rtc_status", rclcpp::QoS(1), *this), getEmergencyState("/api/external/get/emergency", rclcpp::QoS(1), *this, [this](const auto & message) { if (message.emergency) { throw common::Error("Emergency state received"); @@ -348,7 +320,7 @@ auto FieldOperatorApplication::getWaypoints() const -> traffic_simulator_msgs::m auto FieldOperatorApplication::initialize(const geometry_msgs::msg::Pose & initial_pose) -> void { - if (not std::exchange(initialize_was_called, true)) { + if (not std::exchange(initialized, true)) { task_queue.delay([this, initial_pose]() { waitForAutowareStateToBe_WAITING_FOR_ROUTE([&]() { #if __has_include() @@ -446,18 +418,15 @@ auto FieldOperatorApplication::requestAutoModeForCooperation( auto FieldOperatorApplication::sendCooperateCommand( const std::string & module_name, const std::string & command) -> void { - auto to_command_type = [](const auto & command) { - static const std::unordered_map command_type_map = { - {"ACTIVATE", tier4_rtc_msgs::msg::Command::ACTIVATE}, - {"DEACTIVATE", tier4_rtc_msgs::msg::Command::DEACTIVATE}, - }; - if (const auto command_type = command_type_map.find(command); - command_type == command_type_map.end()) { - throw common::Error("Unexpected command for tier4_rtc_msgs::msg::Command: ", command, "."); + const auto command_type = [&]() { + if (command == "ACTIVATE") { + return tier4_rtc_msgs::msg::Command::ACTIVATE; + } else if (command == "DEACTIVATE") { + return tier4_rtc_msgs::msg::Command::DEACTIVATE; } else { - return command_type->second; + throw common::Error("Unexpected command for tier4_rtc_msgs::msg::Command: ", command, "."); } - }; + }(); /* NOTE: Used cooperate statuses will be deleted correctly in Autoware side @@ -480,17 +449,40 @@ auto FieldOperatorApplication::sendCooperateCommand( }) != used_cooperate_statuses.end(); }; + auto is_valid_cooperate_status = + [](const auto & cooperate_status, auto command_type, auto module_type) { + /** + The finish_distance filter is set to over -20.0, because some valid rtc + statuses has negative finish_distance due to the errors of localization or + numerical calculation. This threshold is advised by a member of TIER IV + planning and control team. + + The difference in the variable referred as a distance is the impact of the + message specification changes in the following URL. This was also decided + after consulting with a member of TIER IV planning and control team. ref: + https://github.com/tier4/tier4_autoware_msgs/commit/8b85e6e43aa48cf4a439c77bf4bf6aee2e70c3ef + */ + if constexpr (DetectMember_distance::value) { + return cooperate_status.module.type == module_type && + command_type != cooperate_status.command_status.type && + cooperate_status.distance >= -20.0; + } else { + return cooperate_status.module.type == module_type && + command_type != cooperate_status.command_status.type && + cooperate_status.finish_distance >= -20.0; + } + }; + + const auto cooperate_status_array = getCooperateStatusArray(); + if (const auto cooperate_status = std::find_if( - latest_cooperate_status_array.statuses.begin(), - latest_cooperate_status_array.statuses.end(), - [module_type = toModuleType(module_name), - command_type = to_command_type(command), - is_used_cooperate_status](const auto & cooperate_status) { - return isValidCooperateStatus( - cooperate_status, command_type, module_type) && + cooperate_status_array.statuses.begin(), cooperate_status_array.statuses.end(), + [&, module_type = toModuleType(module_name)]( + const auto & cooperate_status) { + return is_valid_cooperate_status(cooperate_status, command_type, module_type) && not is_used_cooperate_status(cooperate_status); }); - cooperate_status == latest_cooperate_status_array.statuses.end()) { + cooperate_status == cooperate_status_array.statuses.end()) { std::stringstream what; what << "Failed to send a cooperate command: Cannot find a valid request to cooperate for module " @@ -501,10 +493,10 @@ auto FieldOperatorApplication::sendCooperateCommand( tier4_rtc_msgs::msg::CooperateCommand cooperate_command; cooperate_command.module = cooperate_status->module; cooperate_command.uuid = cooperate_status->uuid; - cooperate_command.command.type = to_command_type(command); + cooperate_command.command.type = command_type; auto request = std::make_shared(); - request->stamp = latest_cooperate_status_array.stamp; + request->stamp = cooperate_status_array.stamp; request->commands.push_back(cooperate_command); task_queue.delay([this, request]() { requestCooperateCommands(request, 1); }); diff --git a/external/embree_vendor/CHANGELOG.rst b/external/embree_vendor/CHANGELOG.rst index 7e0f6431a9f..c5d55055bf5 100644 --- a/external/embree_vendor/CHANGELOG.rst +++ b/external/embree_vendor/CHANGELOG.rst @@ -24,6 +24,14 @@ Changelog for package embree_vendor * Merge remote-tracking branch 'origin/master' into feature/publish_empty_context * Contributors: Masaya Kataoka +7.4.4 (2025-01-09) +------------------ +* Merge branch 'master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Contributors: Tatsuya Yamasaki, yamacir-kit + 7.4.3 (2025-01-07) ------------------ * Merge branch 'master' into tmp/pc-patch diff --git a/external/embree_vendor/package.xml b/external/embree_vendor/package.xml index 39dfff17653..6460aa9273e 100644 --- a/external/embree_vendor/package.xml +++ b/external/embree_vendor/package.xml @@ -2,7 +2,7 @@ embree_vendor - 7.4.3 + 7.4.4 vendor packages for intel raytracing kernel library masaya Apache 2.0 diff --git a/map/kashiwanoha_map/CHANGELOG.rst b/map/kashiwanoha_map/CHANGELOG.rst index 5f4decd04b2..2ac1a425776 100644 --- a/map/kashiwanoha_map/CHANGELOG.rst +++ b/map/kashiwanoha_map/CHANGELOG.rst @@ -21,6 +21,14 @@ Changelog for package kashiwanoha_map * Merge remote-tracking branch 'origin/master' into feature/publish_empty_context * Contributors: Masaya Kataoka +7.4.4 (2025-01-09) +------------------ +* Merge branch 'master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Contributors: Tatsuya Yamasaki, yamacir-kit + 7.4.3 (2025-01-07) ------------------ * Merge branch 'master' into tmp/pc-patch diff --git a/map/kashiwanoha_map/package.xml b/map/kashiwanoha_map/package.xml index 667e0c0aa7a..00c2bdd3546 100644 --- a/map/kashiwanoha_map/package.xml +++ b/map/kashiwanoha_map/package.xml @@ -2,7 +2,7 @@ kashiwanoha_map - 7.4.3 + 7.4.4 map package for kashiwanoha Masaya Kataoka Apache License 2.0 diff --git a/map/simple_cross_map/CHANGELOG.rst b/map/simple_cross_map/CHANGELOG.rst index 68db8f01508..0285fd67898 100644 --- a/map/simple_cross_map/CHANGELOG.rst +++ b/map/simple_cross_map/CHANGELOG.rst @@ -9,6 +9,14 @@ Changelog for package simple_cross_map * Merge branch 'master' into feature/publish_empty_context * Contributors: Masaya Kataoka +7.4.4 (2025-01-09) +------------------ +* Merge branch 'master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Contributors: Tatsuya Yamasaki, yamacir-kit + 7.4.3 (2025-01-07) ------------------ * Merge branch 'master' into tmp/pc-patch diff --git a/map/simple_cross_map/package.xml b/map/simple_cross_map/package.xml index 2a575167113..5174685f8fc 100644 --- a/map/simple_cross_map/package.xml +++ b/map/simple_cross_map/package.xml @@ -2,7 +2,7 @@ simple_cross_map - 7.4.3 + 7.4.4 map package for simple cross Masaya Kataoka Apache License 2.0 diff --git a/mock/cpp_mock_scenarios/CHANGELOG.rst b/mock/cpp_mock_scenarios/CHANGELOG.rst index bd335760fdb..bb413f169bb 100644 --- a/mock/cpp_mock_scenarios/CHANGELOG.rst +++ b/mock/cpp_mock_scenarios/CHANGELOG.rst @@ -21,6 +21,14 @@ Changelog for package cpp_mock_scenarios * Merge remote-tracking branch 'origin/master' into feature/publish_empty_context * Contributors: Masaya Kataoka +7.4.4 (2025-01-09) +------------------ +* Merge branch 'master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Contributors: Tatsuya Yamasaki, yamacir-kit + 7.4.3 (2025-01-07) ------------------ * Merge branch 'master' into tmp/pc-patch diff --git a/mock/cpp_mock_scenarios/package.xml b/mock/cpp_mock_scenarios/package.xml index cf7e468eb46..2f245c3aa20 100644 --- a/mock/cpp_mock_scenarios/package.xml +++ b/mock/cpp_mock_scenarios/package.xml @@ -2,7 +2,7 @@ cpp_mock_scenarios - 7.4.3 + 7.4.4 C++ mock scenarios masaya Apache License 2.0 diff --git a/openscenario/openscenario_experimental_catalog/CHANGELOG.rst b/openscenario/openscenario_experimental_catalog/CHANGELOG.rst index 21c90adb6f2..f7d13232bce 100644 --- a/openscenario/openscenario_experimental_catalog/CHANGELOG.rst +++ b/openscenario/openscenario_experimental_catalog/CHANGELOG.rst @@ -21,6 +21,14 @@ Changelog for package openscenario_experimental_catalog * Merge remote-tracking branch 'origin/master' into feature/publish_empty_context * Contributors: Masaya Kataoka +7.4.4 (2025-01-09) +------------------ +* Merge branch 'master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Contributors: Tatsuya Yamasaki, yamacir-kit + 7.4.3 (2025-01-07) ------------------ * Merge branch 'master' into tmp/pc-patch diff --git a/openscenario/openscenario_experimental_catalog/package.xml b/openscenario/openscenario_experimental_catalog/package.xml index 7f27593e01d..44aa60ea871 100644 --- a/openscenario/openscenario_experimental_catalog/package.xml +++ b/openscenario/openscenario_experimental_catalog/package.xml @@ -2,7 +2,7 @@ openscenario_experimental_catalog - 7.4.3 + 7.4.4 TIER IV experimental catalogs for OpenSCENARIO Tatsuya Yamasaki Apache License 2.0 diff --git a/openscenario/openscenario_interpreter/CHANGELOG.rst b/openscenario/openscenario_interpreter/CHANGELOG.rst index e680005c3ad..3c1ccb5d42c 100644 --- a/openscenario/openscenario_interpreter/CHANGELOG.rst +++ b/openscenario/openscenario_interpreter/CHANGELOG.rst @@ -32,6 +32,17 @@ Changelog for package openscenario_interpreter * add publish_empty_context parameter * Contributors: Masaya Kataoka +7.4.4 (2025-01-09) +------------------ +* Merge pull request `#1497 `_ from tier4/refactor/concealer-2 + Refactor/concealer 2 +* Merge branch 'master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Remove some member accessor from struct `FieldOperatorApplication` +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Contributors: Tatsuya Yamasaki, yamacir-kit + 7.4.3 (2025-01-07) ------------------ * Merge branch 'master' into tmp/pc-patch diff --git a/openscenario/openscenario_interpreter/package.xml b/openscenario/openscenario_interpreter/package.xml index 9655cc3c824..5a0a829902f 100644 --- a/openscenario/openscenario_interpreter/package.xml +++ b/openscenario/openscenario_interpreter/package.xml @@ -2,7 +2,7 @@ openscenario_interpreter - 7.4.3 + 7.4.4 OpenSCENARIO 1.2.0 interpreter package for Autoware Tatsuya Yamasaki Apache License 2.0 diff --git a/openscenario/openscenario_interpreter/src/syntax/user_defined_value_condition.cpp b/openscenario/openscenario_interpreter/src/syntax/user_defined_value_condition.cpp index b9cfae284bc..93e2a126cfb 100644 --- a/openscenario/openscenario_interpreter/src/syntax/user_defined_value_condition.cpp +++ b/openscenario/openscenario_interpreter/src/syntax/user_defined_value_condition.cpp @@ -131,18 +131,19 @@ UserDefinedValueCondition::UserDefinedValueCondition(const pugi::xml_node & node "currentMinimumRiskManeuverState.behavior", [result]() { return make( - asFieldOperatorApplication(result.str(1)).getMinimumRiskManeuverBehaviorName()); + asFieldOperatorApplication(result.str(1)).minimum_risk_maneuver_behavior); }), std::make_pair( "currentMinimumRiskManeuverState.state", [result]() { return make( - asFieldOperatorApplication(result.str(1)).getMinimumRiskManeuverStateName()); + asFieldOperatorApplication(result.str(1)).minimum_risk_maneuver_state); }), std::make_pair( "currentEmergencyState", [result]() { - return make(asFieldOperatorApplication(result.str(1)).getEmergencyStateName()); + return make( + asFieldOperatorApplication(result.str(1)).minimum_risk_maneuver_state); }), std::make_pair( "currentTurnIndicatorsState", diff --git a/openscenario/openscenario_interpreter_example/CHANGELOG.rst b/openscenario/openscenario_interpreter_example/CHANGELOG.rst index d647475f447..eac7181aec4 100644 --- a/openscenario/openscenario_interpreter_example/CHANGELOG.rst +++ b/openscenario/openscenario_interpreter_example/CHANGELOG.rst @@ -21,6 +21,14 @@ Changelog for package openscenario_interpreter_example * Merge remote-tracking branch 'origin/master' into feature/publish_empty_context * Contributors: Masaya Kataoka +7.4.4 (2025-01-09) +------------------ +* Merge branch 'master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Contributors: Tatsuya Yamasaki, yamacir-kit + 7.4.3 (2025-01-07) ------------------ * Merge branch 'master' into tmp/pc-patch diff --git a/openscenario/openscenario_interpreter_example/package.xml b/openscenario/openscenario_interpreter_example/package.xml index 5a62ec1d856..766e35cc1de 100644 --- a/openscenario/openscenario_interpreter_example/package.xml +++ b/openscenario/openscenario_interpreter_example/package.xml @@ -3,7 +3,7 @@ openscenario_interpreter_example - 7.4.3 + 7.4.4 Examples for some TIER IV OpenSCENARIO Interpreter's features Tatsuya Yamasaki Apache License 2.0 diff --git a/openscenario/openscenario_interpreter_msgs/CHANGELOG.rst b/openscenario/openscenario_interpreter_msgs/CHANGELOG.rst index 8c395f6fc4f..20de5b163fe 100644 --- a/openscenario/openscenario_interpreter_msgs/CHANGELOG.rst +++ b/openscenario/openscenario_interpreter_msgs/CHANGELOG.rst @@ -21,6 +21,14 @@ Changelog for package openscenario_interpreter_msgs * Merge remote-tracking branch 'origin/master' into feature/publish_empty_context * Contributors: Masaya Kataoka +7.4.4 (2025-01-09) +------------------ +* Merge branch 'master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Contributors: Tatsuya Yamasaki, yamacir-kit + 7.4.3 (2025-01-07) ------------------ * Merge branch 'master' into tmp/pc-patch diff --git a/openscenario/openscenario_interpreter_msgs/package.xml b/openscenario/openscenario_interpreter_msgs/package.xml index 6639a9e341a..8836de5a2cc 100644 --- a/openscenario/openscenario_interpreter_msgs/package.xml +++ b/openscenario/openscenario_interpreter_msgs/package.xml @@ -2,7 +2,7 @@ openscenario_interpreter_msgs - 7.4.3 + 7.4.4 ROS message types for package openscenario_interpreter Yamasaki Tatsuya Apache License 2.0 diff --git a/openscenario/openscenario_preprocessor/CHANGELOG.rst b/openscenario/openscenario_preprocessor/CHANGELOG.rst index b312906195f..335e4634843 100644 --- a/openscenario/openscenario_preprocessor/CHANGELOG.rst +++ b/openscenario/openscenario_preprocessor/CHANGELOG.rst @@ -21,6 +21,14 @@ Changelog for package openscenario_preprocessor * Merge remote-tracking branch 'origin/master' into feature/publish_empty_context * Contributors: Masaya Kataoka +7.4.4 (2025-01-09) +------------------ +* Merge branch 'master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Contributors: Tatsuya Yamasaki, yamacir-kit + 7.4.3 (2025-01-07) ------------------ * Merge branch 'master' into tmp/pc-patch diff --git a/openscenario/openscenario_preprocessor/package.xml b/openscenario/openscenario_preprocessor/package.xml index 22cd293452c..389e227f57b 100644 --- a/openscenario/openscenario_preprocessor/package.xml +++ b/openscenario/openscenario_preprocessor/package.xml @@ -3,7 +3,7 @@ openscenario_preprocessor - 7.4.3 + 7.4.4 Example package for TIER IV OpenSCENARIO Interpreter Kotaro Yoshimoto Apache License 2.0 diff --git a/openscenario/openscenario_preprocessor_msgs/CHANGELOG.rst b/openscenario/openscenario_preprocessor_msgs/CHANGELOG.rst index 9b99e5f376c..c0fe7c8f9e4 100644 --- a/openscenario/openscenario_preprocessor_msgs/CHANGELOG.rst +++ b/openscenario/openscenario_preprocessor_msgs/CHANGELOG.rst @@ -21,6 +21,14 @@ Changelog for package openscenario_preprocessor_msgs * Merge remote-tracking branch 'origin/master' into feature/publish_empty_context * Contributors: Masaya Kataoka +7.4.4 (2025-01-09) +------------------ +* Merge branch 'master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Contributors: Tatsuya Yamasaki, yamacir-kit + 7.4.3 (2025-01-07) ------------------ * Merge branch 'master' into tmp/pc-patch diff --git a/openscenario/openscenario_preprocessor_msgs/package.xml b/openscenario/openscenario_preprocessor_msgs/package.xml index de9cb4310fb..f497f649f7b 100644 --- a/openscenario/openscenario_preprocessor_msgs/package.xml +++ b/openscenario/openscenario_preprocessor_msgs/package.xml @@ -2,7 +2,7 @@ openscenario_preprocessor_msgs - 7.4.3 + 7.4.4 ROS message types for package openscenario_preprocessor Kotaro Yoshimoto Apache License 2.0 diff --git a/openscenario/openscenario_utility/CHANGELOG.rst b/openscenario/openscenario_utility/CHANGELOG.rst index a5deade40e9..095bf2cb312 100644 --- a/openscenario/openscenario_utility/CHANGELOG.rst +++ b/openscenario/openscenario_utility/CHANGELOG.rst @@ -24,6 +24,14 @@ Changelog for package openscenario_utility * Merge remote-tracking branch 'origin/master' into feature/publish_empty_context * Contributors: Masaya Kataoka +7.4.4 (2025-01-09) +------------------ +* Merge branch 'master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Contributors: Tatsuya Yamasaki, yamacir-kit + 7.4.3 (2025-01-07) ------------------ * Merge branch 'master' into tmp/pc-patch diff --git a/openscenario/openscenario_utility/package.xml b/openscenario/openscenario_utility/package.xml index 61916bc11d2..2b1f12ef0c8 100644 --- a/openscenario/openscenario_utility/package.xml +++ b/openscenario/openscenario_utility/package.xml @@ -2,7 +2,7 @@ openscenario_utility - 7.4.3 + 7.4.4 Utility tools for ASAM OpenSCENARIO 1.2.0 Tatsuya Yamasaki Apache License 2.0 diff --git a/openscenario/openscenario_validator/CHANGELOG.rst b/openscenario/openscenario_validator/CHANGELOG.rst index 6a4d5e65062..77d4d7d0889 100644 --- a/openscenario/openscenario_validator/CHANGELOG.rst +++ b/openscenario/openscenario_validator/CHANGELOG.rst @@ -10,6 +10,14 @@ Changelog for package openscenario_validator * Merge remote-tracking branch 'origin/master' into feature/publish_empty_context * Contributors: Masaya Kataoka +7.4.4 (2025-01-09) +------------------ +* Merge branch 'master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Contributors: Tatsuya Yamasaki, yamacir-kit + 7.4.3 (2025-01-07) ------------------ * Merge branch 'master' into tmp/pc-patch diff --git a/openscenario/openscenario_validator/package.xml b/openscenario/openscenario_validator/package.xml index 6996fc78aeb..4b9a1150b44 100644 --- a/openscenario/openscenario_validator/package.xml +++ b/openscenario/openscenario_validator/package.xml @@ -2,7 +2,7 @@ openscenario_validator - 7.4.3 + 7.4.4 Validator for OpenSCENARIO 1.3 Kotaro Yoshimoto Apache License 2.0 diff --git a/rviz_plugins/openscenario_visualization/CHANGELOG.rst b/rviz_plugins/openscenario_visualization/CHANGELOG.rst index 0b4f309e4e8..7f1e16a1131 100644 --- a/rviz_plugins/openscenario_visualization/CHANGELOG.rst +++ b/rviz_plugins/openscenario_visualization/CHANGELOG.rst @@ -21,6 +21,14 @@ Changelog for package openscenario_visualization * Merge remote-tracking branch 'origin/master' into feature/publish_empty_context * Contributors: Masaya Kataoka +7.4.4 (2025-01-09) +------------------ +* Merge branch 'master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Contributors: Tatsuya Yamasaki, yamacir-kit + 7.4.3 (2025-01-07) ------------------ * Merge branch 'master' into tmp/pc-patch diff --git a/rviz_plugins/openscenario_visualization/package.xml b/rviz_plugins/openscenario_visualization/package.xml index fefe1d5506d..74dd3634073 100644 --- a/rviz_plugins/openscenario_visualization/package.xml +++ b/rviz_plugins/openscenario_visualization/package.xml @@ -2,7 +2,7 @@ openscenario_visualization - 7.4.3 + 7.4.4 Visualization tools for simulation results Masaya Kataoka Kyoichi Sugahara diff --git a/rviz_plugins/real_time_factor_control_rviz_plugin/CHANGELOG.rst b/rviz_plugins/real_time_factor_control_rviz_plugin/CHANGELOG.rst index 4c60a41bc07..0ce3089d87a 100644 --- a/rviz_plugins/real_time_factor_control_rviz_plugin/CHANGELOG.rst +++ b/rviz_plugins/real_time_factor_control_rviz_plugin/CHANGELOG.rst @@ -21,6 +21,14 @@ Changelog for package real_time_factor_control_rviz_plugin * Merge remote-tracking branch 'origin/master' into feature/publish_empty_context * Contributors: Masaya Kataoka +7.4.4 (2025-01-09) +------------------ +* Merge branch 'master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Contributors: Tatsuya Yamasaki, yamacir-kit + 7.4.3 (2025-01-07) ------------------ * Merge branch 'master' into tmp/pc-patch diff --git a/rviz_plugins/real_time_factor_control_rviz_plugin/package.xml b/rviz_plugins/real_time_factor_control_rviz_plugin/package.xml index e48865525a2..a3dc099a0fd 100644 --- a/rviz_plugins/real_time_factor_control_rviz_plugin/package.xml +++ b/rviz_plugins/real_time_factor_control_rviz_plugin/package.xml @@ -2,7 +2,7 @@ real_time_factor_control_rviz_plugin - 7.4.3 + 7.4.4 Slider controlling real time factor value. PaweÅ‚ Lech Apache License 2.0 diff --git a/scenario_simulator_v2/CHANGELOG.rst b/scenario_simulator_v2/CHANGELOG.rst index f74e0972ac1..8950340e47c 100644 --- a/scenario_simulator_v2/CHANGELOG.rst +++ b/scenario_simulator_v2/CHANGELOG.rst @@ -21,6 +21,14 @@ Changelog for package scenario_simulator_v2 * Merge remote-tracking branch 'origin/master' into feature/publish_empty_context * Contributors: Masaya Kataoka +7.4.4 (2025-01-09) +------------------ +* Merge branch 'master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Contributors: Tatsuya Yamasaki, yamacir-kit + 7.4.3 (2025-01-07) ------------------ * Merge branch 'master' into tmp/pc-patch diff --git a/scenario_simulator_v2/package.xml b/scenario_simulator_v2/package.xml index b3037b41ddd..bd31d14b145 100644 --- a/scenario_simulator_v2/package.xml +++ b/scenario_simulator_v2/package.xml @@ -2,7 +2,7 @@ scenario_simulator_v2 - 7.4.3 + 7.4.4 scenario testing framework for Autoware Masaya Kataoka Apache License 2.0 diff --git a/simulation/behavior_tree_plugin/CHANGELOG.rst b/simulation/behavior_tree_plugin/CHANGELOG.rst index 3989f9fc29c..ae68e0aa286 100644 --- a/simulation/behavior_tree_plugin/CHANGELOG.rst +++ b/simulation/behavior_tree_plugin/CHANGELOG.rst @@ -21,6 +21,14 @@ Changelog for package behavior_tree_plugin * Merge remote-tracking branch 'origin/master' into feature/publish_empty_context * Contributors: Masaya Kataoka +7.4.4 (2025-01-09) +------------------ +* Merge branch 'master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Contributors: Tatsuya Yamasaki, yamacir-kit + 7.4.3 (2025-01-07) ------------------ * Merge branch 'master' into tmp/pc-patch diff --git a/simulation/behavior_tree_plugin/package.xml b/simulation/behavior_tree_plugin/package.xml index e9e71a46541..b1801ce4a92 100644 --- a/simulation/behavior_tree_plugin/package.xml +++ b/simulation/behavior_tree_plugin/package.xml @@ -2,7 +2,7 @@ behavior_tree_plugin - 7.4.3 + 7.4.4 Behavior tree plugin for traffic_simulator masaya Apache 2.0 diff --git a/simulation/do_nothing_plugin/CHANGELOG.rst b/simulation/do_nothing_plugin/CHANGELOG.rst index f0392f0d05e..b7aef449270 100644 --- a/simulation/do_nothing_plugin/CHANGELOG.rst +++ b/simulation/do_nothing_plugin/CHANGELOG.rst @@ -21,6 +21,14 @@ Changelog for package do_nothing_plugin * Merge remote-tracking branch 'origin/master' into feature/publish_empty_context * Contributors: Masaya Kataoka +7.4.4 (2025-01-09) +------------------ +* Merge branch 'master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Contributors: Tatsuya Yamasaki, yamacir-kit + 7.4.3 (2025-01-07) ------------------ * Merge branch 'master' into tmp/pc-patch diff --git a/simulation/do_nothing_plugin/package.xml b/simulation/do_nothing_plugin/package.xml index e4224b56c77..cc98dca2858 100644 --- a/simulation/do_nothing_plugin/package.xml +++ b/simulation/do_nothing_plugin/package.xml @@ -2,7 +2,7 @@ do_nothing_plugin - 7.4.3 + 7.4.4 Behavior plugin for do nothing Masaya Kataoka Apache 2.0 diff --git a/simulation/simple_sensor_simulator/CHANGELOG.rst b/simulation/simple_sensor_simulator/CHANGELOG.rst index d0bbc3e98a1..71cf317e260 100644 --- a/simulation/simple_sensor_simulator/CHANGELOG.rst +++ b/simulation/simple_sensor_simulator/CHANGELOG.rst @@ -21,6 +21,14 @@ Changelog for package simple_sensor_simulator * Merge remote-tracking branch 'origin/master' into feature/publish_empty_context * Contributors: Masaya Kataoka +7.4.4 (2025-01-09) +------------------ +* Merge branch 'master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Contributors: Tatsuya Yamasaki, yamacir-kit + 7.4.3 (2025-01-07) ------------------ * Merge branch 'master' into tmp/pc-patch diff --git a/simulation/simple_sensor_simulator/package.xml b/simulation/simple_sensor_simulator/package.xml index 38d98991aae..4a368af0fd7 100644 --- a/simulation/simple_sensor_simulator/package.xml +++ b/simulation/simple_sensor_simulator/package.xml @@ -1,7 +1,7 @@ simple_sensor_simulator - 7.4.3 + 7.4.4 simple_sensor_simulator package masaya kataoka diff --git a/simulation/simulation_interface/CHANGELOG.rst b/simulation/simulation_interface/CHANGELOG.rst index fe7d88a7c4e..c0ce6a8ab1c 100644 --- a/simulation/simulation_interface/CHANGELOG.rst +++ b/simulation/simulation_interface/CHANGELOG.rst @@ -21,6 +21,14 @@ Changelog for package simulation_interface * Merge remote-tracking branch 'origin/master' into feature/publish_empty_context * Contributors: Masaya Kataoka +7.4.4 (2025-01-09) +------------------ +* Merge branch 'master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Contributors: Tatsuya Yamasaki, yamacir-kit + 7.4.3 (2025-01-07) ------------------ * Merge branch 'master' into tmp/pc-patch diff --git a/simulation/simulation_interface/package.xml b/simulation/simulation_interface/package.xml index 77ad18192c5..00ca0b70f73 100644 --- a/simulation/simulation_interface/package.xml +++ b/simulation/simulation_interface/package.xml @@ -2,7 +2,7 @@ simulation_interface - 7.4.3 + 7.4.4 packages to define interface between simulator and scenario interpreter Masaya Kataoka Apache License 2.0 diff --git a/simulation/traffic_simulator/CHANGELOG.rst b/simulation/traffic_simulator/CHANGELOG.rst index 459321e5668..708151b301c 100644 --- a/simulation/traffic_simulator/CHANGELOG.rst +++ b/simulation/traffic_simulator/CHANGELOG.rst @@ -21,6 +21,22 @@ Changelog for package traffic_simulator * Merge remote-tracking branch 'origin/master' into feature/publish_empty_context * Contributors: Masaya Kataoka +7.4.4 (2025-01-09) +------------------ +* Merge pull request `#1497 `_ from tier4/refactor/concealer-2 + Refactor/concealer 2 +* Merge branch 'master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Remove some member accessor from struct `FieldOperatorApplication` +* Remove member function `FieldOperatorApplication::getAutowareStateName` +* Cleanup `ControlModeCommand` service callback +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Update `EgoEntity` to have `FieldOperatorApplication` as its base class +* Update `EgoEntity` to have `FieldOperatorApplication` as non-pointer +* Remove static member function `EgoEntity::makeFieldOperatorApplication` +* Contributors: Tatsuya Yamasaki, yamacir-kit + 7.4.3 (2025-01-07) ------------------ * Merge pull request `#1499 `_ from tier4/tmp/pc-patch diff --git a/simulation/traffic_simulator/include/traffic_simulator/entity/ego_entity.hpp b/simulation/traffic_simulator/include/traffic_simulator/entity/ego_entity.hpp index 91cab0f7f97..44f2e23601e 100644 --- a/simulation/traffic_simulator/include/traffic_simulator/entity/ego_entity.hpp +++ b/simulation/traffic_simulator/include/traffic_simulator/entity/ego_entity.hpp @@ -31,14 +31,8 @@ namespace traffic_simulator { namespace entity { -class EgoEntity : public VehicleEntity +class EgoEntity : public VehicleEntity, private concealer::FieldOperatorApplication { - const std::unique_ptr field_operator_application; - - static auto makeFieldOperatorApplication( - const Configuration &, const rclcpp::node_interfaces::NodeParametersInterface::SharedPtr &) - -> std::unique_ptr; - bool is_controlled_by_simulator_{false}; std::optional target_speed_; traffic_simulator_msgs::msg::BehaviorParameter behavior_parameter_; @@ -63,7 +57,7 @@ class EgoEntity : public VehicleEntity auto operator=(const EgoEntity &) -> EgoEntity & = delete; - auto asFieldOperatorApplication() const -> concealer::FieldOperatorApplication & override; + auto asFieldOperatorApplication() -> concealer::FieldOperatorApplication & override; auto getCurrentAction() const -> std::string override; @@ -84,7 +78,7 @@ class EgoEntity : public VehicleEntity auto getWaypoints() -> const traffic_simulator_msgs::msg::WaypointsArray override; - auto updateFieldOperatorApplication() const -> void; + auto updateFieldOperatorApplication() -> void; void onUpdate(double current_time, double step_time) override; diff --git a/simulation/traffic_simulator/include/traffic_simulator/entity/entity_base.hpp b/simulation/traffic_simulator/include/traffic_simulator/entity/entity_base.hpp index 1bf628fb474..07ebecd6de2 100644 --- a/simulation/traffic_simulator/include/traffic_simulator/entity/entity_base.hpp +++ b/simulation/traffic_simulator/include/traffic_simulator/entity/entity_base.hpp @@ -58,7 +58,7 @@ class EntityBase virtual void appendDebugMarker(visualization_msgs::msg::MarkerArray & /*unused*/); - virtual auto asFieldOperatorApplication() const -> concealer::FieldOperatorApplication &; + virtual auto asFieldOperatorApplication() -> concealer::FieldOperatorApplication &; virtual void cancelRequest(); @@ -144,7 +144,7 @@ class EntityBase virtual void requestLaneChange(const lanelet::Id) { /** - * @note There are Entities such as MiscObjectEntity for which lane change is not possible, + * @note There are Entities such as MiscObjectEntity for which lane change is not possible, * and since it is necessary to implement appropriate overrides for each Entity, no operation is performed on the base type. */ } @@ -152,7 +152,7 @@ class EntityBase virtual void requestLaneChange(const traffic_simulator::lane_change::Parameter &) { /** - * @note There are Entities such as MiscObjectEntity for which lane change is not possible, + * @note There are Entities such as MiscObjectEntity for which lane change is not possible, * and since it is necessary to implement appropriate overrides for each Entity, no operation is performed on the base type. */ } @@ -182,7 +182,7 @@ class EntityBase virtual void requestClearRoute() { /** - * @note Since there are Entities such as MiscObjectEntity that do not perform routing, + * @note Since there are Entities such as MiscObjectEntity that do not perform routing, * and routing methods differ from Entity to Entity, this function performs no operation in the base type. */ } diff --git a/simulation/traffic_simulator/package.xml b/simulation/traffic_simulator/package.xml index e9abc0fdfa1..3d1738fcdcb 100644 --- a/simulation/traffic_simulator/package.xml +++ b/simulation/traffic_simulator/package.xml @@ -1,7 +1,7 @@ traffic_simulator - 7.4.3 + 7.4.4 control traffic flow masaya kataoka diff --git a/simulation/traffic_simulator/src/entity/ego_entity.cpp b/simulation/traffic_simulator/src/entity/ego_entity.cpp index e4f9560c180..abb85f7885f 100644 --- a/simulation/traffic_simulator/src/entity/ego_entity.cpp +++ b/simulation/traffic_simulator/src/entity/ego_entity.cpp @@ -14,6 +14,7 @@ #include #include +#include #include #include #include @@ -32,63 +33,51 @@ namespace traffic_simulator { namespace entity { -auto EgoEntity::makeFieldOperatorApplication( - const Configuration & configuration, - const rclcpp::node_interfaces::NodeParametersInterface::SharedPtr & node_parameters) - -> std::unique_ptr -{ - if (const auto architecture_type = - getParameter(node_parameters, "architecture_type", "awf/universe/20240605"); - architecture_type.find("awf/universe") != std::string::npos) { - auto parameters = getParameter>(node_parameters, "autoware.", {}); - - // clang-format off - parameters.push_back("map_path:=" + configuration.map_path.string()); - parameters.push_back("lanelet2_map_file:=" + configuration.getLanelet2MapFile()); - parameters.push_back("pointcloud_map_file:=" + configuration.getPointCloudMapFile()); - parameters.push_back("sensor_model:=" + getParameter(node_parameters, "sensor_model")); - parameters.push_back("vehicle_model:=" + getParameter(node_parameters, "vehicle_model")); - parameters.push_back("rviz_config:=" + getParameter(node_parameters, "rviz_config")); - parameters.push_back("scenario_simulation:=true"); - parameters.push_back("use_foa:=false"); - parameters.push_back("perception/enable_traffic_light:=" + std::string(architecture_type >= "awf/universe/20230906" ? "true" : "false")); - parameters.push_back("use_sim_time:=" + std::string(getParameter(node_parameters, "use_sim_time", false) ? "true" : "false")); - parameters.push_back("localization_sim_mode:=" + std::string(getParameter(node_parameters, "simulate_localization") ? "api" : "pose_twist_estimator")); - // clang-format on - - return getParameter(node_parameters, "launch_autoware", true) - ? std::make_unique( - getParameter(node_parameters, "autoware_launch_package"), - getParameter(node_parameters, "autoware_launch_file"), parameters) - : std::make_unique(); - } else { - throw common::SemanticError( - "Unexpected architecture_type ", std::quoted(architecture_type), " was given."); - } -} - EgoEntity::EgoEntity( const std::string & name, const CanonicalizedEntityStatus & entity_status, const std::shared_ptr & hdmap_utils_ptr, const traffic_simulator_msgs::msg::VehicleParameters & parameters, const Configuration & configuration, const rclcpp::node_interfaces::NodeParametersInterface::SharedPtr & node_parameters) -: VehicleEntity(name, entity_status, hdmap_utils_ptr, parameters), - field_operator_application(makeFieldOperatorApplication(configuration, node_parameters)) +: VehicleEntity(name, entity_status, hdmap_utils_ptr, parameters), FieldOperatorApplication([&]() { + if (const auto architecture_type = + getParameter(node_parameters, "architecture_type", "awf/universe/20240605"); + architecture_type.find("awf/universe") != std::string::npos) { + auto parameters = getParameter>(node_parameters, "autoware.", {}); + + // clang-format off + parameters.push_back("map_path:=" + configuration.map_path.string()); + parameters.push_back("lanelet2_map_file:=" + configuration.getLanelet2MapFile()); + parameters.push_back("pointcloud_map_file:=" + configuration.getPointCloudMapFile()); + parameters.push_back("sensor_model:=" + getParameter(node_parameters, "sensor_model")); + parameters.push_back("vehicle_model:=" + getParameter(node_parameters, "vehicle_model")); + parameters.push_back("rviz_config:=" + getParameter(node_parameters, "rviz_config")); + parameters.push_back("scenario_simulation:=true"); + parameters.push_back("use_foa:=false"); + parameters.push_back("perception/enable_traffic_light:=" + std::string(architecture_type >= "awf/universe/20230906" ? "true" : "false")); + parameters.push_back("use_sim_time:=" + std::string(getParameter(node_parameters, "use_sim_time", false) ? "true" : "false")); + parameters.push_back("localization_sim_mode:=" + std::string(getParameter(node_parameters, "simulate_localization") ? "api" : "pose_twist_estimator")); + // clang-format on + + return getParameter(node_parameters, "launch_autoware", true) + ? concealer::ros2_launch( + getParameter(node_parameters, "autoware_launch_package"), + getParameter(node_parameters, "autoware_launch_file"), parameters) + : 0; + } else { + throw common::SemanticError( + "Unexpected architecture_type ", std::quoted(architecture_type), " was given."); + } + }()) { } -auto EgoEntity::asFieldOperatorApplication() const -> concealer::FieldOperatorApplication & +auto EgoEntity::asFieldOperatorApplication() -> concealer::FieldOperatorApplication & { - assert(field_operator_application); - return *field_operator_application; + return *this; } -auto EgoEntity::getCurrentAction() const -> std::string -{ - const auto state = field_operator_application->getAutowareStateName(); - return state.empty() ? "Launching" : state; -} +auto EgoEntity::getCurrentAction() const -> std::string { return autoware_state; } auto EgoEntity::getBehaviorParameter() const -> traffic_simulator_msgs::msg::BehaviorParameter { @@ -113,12 +102,8 @@ auto EgoEntity::getRouteLanelets(double /*unused horizon*/) -> lanelet::Ids { lanelet::Ids ids{}; - if (const auto universe = - dynamic_cast(field_operator_application.get()); - universe) { - for (const auto & point : universe->getPathWithLaneId().points) { - ids += point.lane_ids; - } + for (const auto & point : getPathWithLaneId().points) { + ids += point.lane_ids; } return ids; @@ -131,13 +116,13 @@ auto EgoEntity::getCurrentPose() const -> const geometry_msgs::msg::Pose & auto EgoEntity::getWaypoints() -> const traffic_simulator_msgs::msg::WaypointsArray { - return field_operator_application->getWaypoints(); + return FieldOperatorApplication::getWaypoints(); } -void EgoEntity::updateFieldOperatorApplication() const +void EgoEntity::updateFieldOperatorApplication() { - field_operator_application->rethrow(); - field_operator_application->spinSome(); + rethrow(); + spinSome(); } void EgoEntity::onUpdate(double current_time, double step_time) @@ -155,7 +140,7 @@ void EgoEntity::onUpdate(double current_time, double step_time) // prefer current lanelet on ss2 side setStatus(non_canonicalized_updated_status.value(), status_->getLaneletIds()); } else { - field_operator_application->enableAutowareControl(); + enableAutowareControl(); is_controlled_by_simulator_ = false; } } @@ -202,13 +187,13 @@ void EgoEntity::requestAssignRoute(const std::vector & route.push_back(pose_stamped); } - if (not field_operator_application->initialized()) { - field_operator_application->initialize(getMapPose()); - field_operator_application->plan(route); + if (not initialized) { + initialize(getMapPose()); + plan(route); // NOTE: engage() will be executed at simulation-time 0. } else { - field_operator_application->plan(route); - field_operator_application->engage(); + plan(route); + engage(); } } @@ -254,7 +239,7 @@ auto EgoEntity::requestSpeedChange( "purposes only."); } -void EgoEntity::requestClearRoute() { field_operator_application->clearRoute(); } +void EgoEntity::requestClearRoute() { clearRoute(); } auto EgoEntity::getDefaultDynamicConstraints() const -> const traffic_simulator_msgs::msg::DynamicConstraints & @@ -288,7 +273,7 @@ auto EgoEntity::requestSpeedChange( auto EgoEntity::setVelocityLimit(double value) -> void // { behavior_parameter_.dynamic_constraints.max_speed = value; - field_operator_application->setVelocityLimit(value); + FieldOperatorApplication::setVelocityLimit(value); } auto EgoEntity::setMapPose(const geometry_msgs::msg::Pose & map_pose) -> void diff --git a/simulation/traffic_simulator/src/entity/entity_base.cpp b/simulation/traffic_simulator/src/entity/entity_base.cpp index 0b1d7af890a..139fbd51a2d 100644 --- a/simulation/traffic_simulator/src/entity/entity_base.cpp +++ b/simulation/traffic_simulator/src/entity/entity_base.cpp @@ -68,7 +68,7 @@ EntityBase::EntityBase( void EntityBase::appendDebugMarker(visualization_msgs::msg::MarkerArray & /*unused*/) {} -auto EntityBase::asFieldOperatorApplication() const -> concealer::FieldOperatorApplication & +auto EntityBase::asFieldOperatorApplication() -> concealer::FieldOperatorApplication & { throw common::Error( "An operation was requested for Entity ", std::quoted(name), diff --git a/simulation/traffic_simulator/src/entity/entity_manager.cpp b/simulation/traffic_simulator/src/entity/entity_manager.cpp index 4211cc33c93..f38b2f9e740 100644 --- a/simulation/traffic_simulator/src/entity/entity_manager.cpp +++ b/simulation/traffic_simulator/src/entity/entity_manager.cpp @@ -354,7 +354,7 @@ auto EntityManager::updateNpcLogic( // Update npc completely if logic has started, otherwise update Autoware only - if it is Ego if (npc_logic_started_) { entity->onUpdate(current_time, step_time); - } else if (const auto ego_entity = std::dynamic_pointer_cast(entity)) { + } else if (const auto ego_entity = std::dynamic_pointer_cast(entity)) { ego_entity->updateFieldOperatorApplication(); } return entity->getCanonicalizedStatus(); diff --git a/simulation/traffic_simulator_msgs/CHANGELOG.rst b/simulation/traffic_simulator_msgs/CHANGELOG.rst index 16838eaa328..c076ce15ff3 100644 --- a/simulation/traffic_simulator_msgs/CHANGELOG.rst +++ b/simulation/traffic_simulator_msgs/CHANGELOG.rst @@ -21,6 +21,14 @@ Changelog for package openscenario_msgs * Merge remote-tracking branch 'origin/master' into feature/publish_empty_context * Contributors: Masaya Kataoka +7.4.4 (2025-01-09) +------------------ +* Merge branch 'master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Contributors: Tatsuya Yamasaki, yamacir-kit + 7.4.3 (2025-01-07) ------------------ * Merge branch 'master' into tmp/pc-patch diff --git a/simulation/traffic_simulator_msgs/package.xml b/simulation/traffic_simulator_msgs/package.xml index c1b7a6ce985..998d9cf2583 100644 --- a/simulation/traffic_simulator_msgs/package.xml +++ b/simulation/traffic_simulator_msgs/package.xml @@ -2,7 +2,7 @@ traffic_simulator_msgs - 7.4.3 + 7.4.4 ROS messages for openscenario Masaya Kataoka Apache License 2.0 diff --git a/test_runner/random_test_runner/CHANGELOG.rst b/test_runner/random_test_runner/CHANGELOG.rst index ee9c4dc511a..e7507b2c0f7 100644 --- a/test_runner/random_test_runner/CHANGELOG.rst +++ b/test_runner/random_test_runner/CHANGELOG.rst @@ -21,6 +21,14 @@ Changelog for package random_test_runner * Merge remote-tracking branch 'origin/master' into feature/publish_empty_context * Contributors: Masaya Kataoka +7.4.4 (2025-01-09) +------------------ +* Merge branch 'master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Contributors: Tatsuya Yamasaki, yamacir-kit + 7.4.3 (2025-01-07) ------------------ * Merge branch 'master' into tmp/pc-patch diff --git a/test_runner/random_test_runner/package.xml b/test_runner/random_test_runner/package.xml index 778f401b0b6..5f492e1b79f 100644 --- a/test_runner/random_test_runner/package.xml +++ b/test_runner/random_test_runner/package.xml @@ -2,7 +2,7 @@ random_test_runner - 7.4.3 + 7.4.4 Random behavior test runner piotr-zyskowski-rai Apache License 2.0 diff --git a/test_runner/scenario_test_runner/CHANGELOG.rst b/test_runner/scenario_test_runner/CHANGELOG.rst index da81e61b038..115342b4014 100644 --- a/test_runner/scenario_test_runner/CHANGELOG.rst +++ b/test_runner/scenario_test_runner/CHANGELOG.rst @@ -35,6 +35,14 @@ Changelog for package scenario_test_runner * Merge remote-tracking branch 'origin/master' into feature/publish_empty_context * Contributors: Masaya Kataoka +7.4.4 (2025-01-09) +------------------ +* Merge branch 'master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Merge remote-tracking branch 'origin/master' into refactor/concealer-2 +* Contributors: Tatsuya Yamasaki, yamacir-kit + 7.4.3 (2025-01-07) ------------------ * Merge branch 'master' into tmp/pc-patch diff --git a/test_runner/scenario_test_runner/package.xml b/test_runner/scenario_test_runner/package.xml index 29e7d0b7630..ed9554ddb63 100644 --- a/test_runner/scenario_test_runner/package.xml +++ b/test_runner/scenario_test_runner/package.xml @@ -2,7 +2,7 @@ scenario_test_runner - 7.4.3 + 7.4.4 scenario test runner package Tatsuya Yamasaki Apache License 2.0