diff --git a/simulation/do_nothing_plugin/src/plugin.cpp b/simulation/do_nothing_plugin/src/plugin.cpp index 8cc19f6a727..c47663ddd41 100644 --- a/simulation/do_nothing_plugin/src/plugin.cpp +++ b/simulation/do_nothing_plugin/src/plugin.cpp @@ -152,7 +152,10 @@ auto interpolateEntityStatusFromPolylineTrajectory( } // namespace follow_trajectory } // namespace do_nothing_behavior -void DoNothingBehavior::configure(const rclcpp::Logger &) {} +void DoNothingBehavior::configure(const rclcpp::Logger &) +{ + /// @note The do nothing plugin currently does not use rclcpp::Logger and the configure function is no operation. +} void DoNothingBehavior::update(double current_time, double step_time) { 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 8614ed3fd1d..059a8150752 100644 --- a/simulation/traffic_simulator/include/traffic_simulator/entity/entity_base.hpp +++ b/simulation/traffic_simulator/include/traffic_simulator/entity/entity_base.hpp @@ -141,9 +141,21 @@ class EntityBase virtual void requestAssignRoute(const std::vector &) = 0; - virtual void requestLaneChange(const lanelet::Id) {} - - virtual void requestLaneChange(const traffic_simulator::lane_change::Parameter &){}; + virtual void requestLaneChange(const lanelet::Id) + { + /** + * @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. + */ + } + + virtual void requestLaneChange(const traffic_simulator::lane_change::Parameter &) + { + /** + * @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. + */ + } /* */ void requestLaneChange( const lane_change::AbsoluteTarget &, const lane_change::TrajectoryShape, @@ -164,7 +176,13 @@ class EntityBase virtual void requestSpeedChange(const speed_change::RelativeTargetSpeed &, bool); - virtual void requestClearRoute() {} + virtual void requestClearRoute() + { + /** + * @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. + */ + } virtual auto isControlledBySimulator() const -> bool; diff --git a/simulation/traffic_simulator/include/traffic_simulator/entity/misc_object_entity.hpp b/simulation/traffic_simulator/include/traffic_simulator/entity/misc_object_entity.hpp index 27ac070dc13..148359e8d70 100644 --- a/simulation/traffic_simulator/include/traffic_simulator/entity/misc_object_entity.hpp +++ b/simulation/traffic_simulator/include/traffic_simulator/entity/misc_object_entity.hpp @@ -95,15 +95,30 @@ class MiscObjectEntity : public EntityBase void setBehaviorParameter(const traffic_simulator_msgs::msg::BehaviorParameter &) override; - void setVelocityLimit(double) override{}; + void setVelocityLimit(double) override + { + /// @note Misc object entity does not move, so this function is no operation. + } - void setAccelerationLimit(double) override {} + void setAccelerationLimit(double) override + { + /// @note Misc object entity does not move, so this function is no operation. + } - void setAccelerationRateLimit(double) override {} + void setAccelerationRateLimit(double) override + { + /// @note Misc object entity does not move, so this function is no operation. + } - void setDecelerationLimit(double) override {} + void setDecelerationLimit(double) override + { + /// @note Misc object entity does not move, so this function is no operation. + } - void setDecelerationRateLimit(double) override {} + void setDecelerationRateLimit(double) override + { + /// @note Misc object entity does not move, so this function is no operation. + } auto getMaxAcceleration() const -> double override {