diff --git a/include/MantleAPI/Traffic/i_entity.h b/include/MantleAPI/Traffic/i_entity.h index f3ce582c58813d9ec93a51f538df5f9396230899..b6aaf3d79c6560dceccb3be4a9870c51fd1a6721 100644 --- a/include/MantleAPI/Traffic/i_entity.h +++ b/include/MantleAPI/Traffic/i_entity.h @@ -59,7 +59,7 @@ public: /// @param inert_pos Position of the scenario entity virtual void SetPosition(const Vec3<units::length::meter_t>& inert_pos) = 0; - /// @brief Gets the position of the scenario entity + /// @brief Get the position of the scenario entity /// /// @return Position of the scenario entity [[nodiscard]] virtual Vec3<units::length::meter_t> GetPosition() const = 0; @@ -69,7 +69,7 @@ public: /// @param velocity Velocity vector (Forward, Sideward, Upward) virtual void SetVelocity(const Vec3<units::velocity::meters_per_second_t>& velocity) = 0; - /// @brief Gets the velocity of the scenario entity + /// @brief Get the velocity of the scenario entity /// /// @return Velocity vector (Forward, Sideward, Upward) [[nodiscard]] virtual Vec3<units::velocity::meters_per_second_t> GetVelocity() const = 0; @@ -79,7 +79,7 @@ public: /// @param acceleration Acceleration vector (Forward, Sideward, Upward) virtual void SetAcceleration(const Vec3<units::acceleration::meters_per_second_squared_t>& acceleration) = 0; - /// @brief Gets the acceleration of the scenario entity + /// @brief Get the acceleration of the scenario entity /// /// @return Acceleration vector (Forward, Sideward, Upward) [[nodiscard]] virtual Vec3<units::acceleration::meters_per_second_squared_t> GetAcceleration() const = 0; @@ -89,7 +89,7 @@ public: /// @param orientation 3D representation of orientation using yaw, pitch, and roll angles virtual void SetOrientation(const Orientation3<units::angle::radian_t>& orientation) = 0; - /// @brief Gets the orientation of the scenario entity + /// @brief Get the orientation of the scenario entity /// /// @return 3D representation of orientation using yaw, pitch, and roll angles [[nodiscard]] virtual Orientation3<units::angle::radian_t> GetOrientation() const = 0; @@ -100,7 +100,7 @@ public: virtual void SetOrientationRate( const Orientation3<units::angular_velocity::radians_per_second_t>& orientation_rate) = 0; - /// @brief Gets the orientation rate (angular velocity) of the scenario entity + /// @brief Get the orientation rate (angular velocity) of the scenario entity /// /// @return Rate at which yaw, pitch, and roll angles are changing with respect to time [[nodiscard]] virtual Orientation3<units::angular_velocity::radians_per_second_t> GetOrientationRate() const = 0; @@ -111,7 +111,7 @@ public: virtual void SetOrientationAcceleration( const Orientation3<units::angular_acceleration::radians_per_second_squared_t>& orientation_acceleration) = 0; - /// @brief Gets the orientation acceleration (angular acceleration) of the scenario entity + /// @brief Get the orientation acceleration (angular acceleration) of the scenario entity /// /// @return Orientation acceleration (angular acceleration) [[nodiscard]] virtual Orientation3<units::angular_acceleration::radians_per_second_squared_t> GetOrientationAcceleration() @@ -122,7 +122,7 @@ public: /// @param properties Basic properties that describe scenario entity virtual void SetProperties(std::unique_ptr<mantle_api::EntityProperties> properties) = 0; - /// @brief Gets the properties that describe scenario entity + /// @brief Get the properties that describe scenario entity /// /// @return Basic properties that describe scenario entity [[nodiscard]] virtual EntityProperties* GetProperties() const = 0; @@ -132,7 +132,7 @@ public: /// @param assigned_lane_ids The IDs of the lanes that scenario entity is assigned to virtual void SetAssignedLaneIds(const std::vector<std::uint64_t>& assigned_lane_ids) = 0; - /// @brief Gets the IDs of the lanes that scenario entity is assigned to + /// @brief Get the IDs of the lanes that scenario entity is assigned to /// /// @return IDs of the lanes that scenario entity is assigned to [[nodiscard]] virtual std::vector<std::uint64_t> GetAssignedLaneIds() const = 0; @@ -142,7 +142,7 @@ public: /// @param visibility Visibility of the scenario entity virtual void SetVisibility(const EntityVisibilityConfig& visibility) = 0; - /// @brief Gets the visibility of the scenario entity + /// @brief Get the visibility of the scenario entity /// /// @return Visibility of the scenario entity [[nodiscard]] virtual EntityVisibilityConfig GetVisibility() const = 0; @@ -152,7 +152,7 @@ public: class IVehicle : public virtual IEntity { public: - /// @brief Gets the additional properties for entity object of type vehicle + /// @brief Get the additional properties for entity object of type vehicle /// /// @return Additional properties that describe scenario entity object of type vehicle [[nodiscard]] VehicleProperties* GetProperties() const override = 0; @@ -162,20 +162,27 @@ public: /// @param state State of the indicator virtual void SetIndicatorState(IndicatorState state) = 0; - /// @brief Gets the indicator's state + /// @brief Get the indicator's state /// /// @return State of the indicator [[nodiscard]] virtual IndicatorState GetIndicatorState() const = 0; - // virtual bool IsHost() const = 0; - // virtual void SetHost() = 0; + /// Set the steering wheel angle + /// + /// @param steering_wheel_angle Angle of the steering wheel + virtual void SetSteeringWheelAngle(units::angle::radian_t steering_wheel_angle) = 0; + + /// Get the steering wheel angle + /// + /// @return Angle of the steering wheel + [[nodiscard]] virtual units::angle::radian_t GetSteeringWheelAngle() const = 0; }; /// Interface for scenario entities of pedestrian type class IPedestrian : public virtual IEntity { public: - /// @brief Gets the additional properties for entity object of type pedestrian + /// @brief Get the additional properties for entity object of type pedestrian /// /// @return Additional properties that describe scenario entity object of type pedestrian [[nodiscard]] PedestrianProperties* GetProperties() const override = 0; @@ -185,7 +192,7 @@ public: class IStaticObject : public virtual IEntity { public: - /// @brief Gets the additional properties for static scenario entity + /// @brief Get the additional properties for static scenario entity /// /// @return Additional properties that describe static scenario entity [[nodiscard]] StaticObjectProperties* GetProperties() const override = 0; diff --git a/test/MantleAPI/Test/test_utils.h b/test/MantleAPI/Test/test_utils.h index 902bddf569da39d0556bde0863684fbe6e734dec..d9b79fcc099cc86da3b4ad59d3591bc853bf9135 100644 --- a/test/MantleAPI/Test/test_utils.h +++ b/test/MantleAPI/Test/test_utils.h @@ -123,6 +123,9 @@ public: void SetIndicatorState(mantle_api::IndicatorState state) override { std::ignore = state; } mantle_api::IndicatorState GetIndicatorState() const override { return mantle_api::IndicatorState::kUnknown; } + MOCK_METHOD(void, SetSteeringWheelAngle, (units::angle::radian_t steering_wheel_angle), (override)); + MOCK_METHOD(units::angle::radian_t, GetSteeringWheelAngle, (), (const, override)); + private: std::string name_{}; std::unique_ptr<mantle_api::EntityProperties> properties_{std::make_unique<mantle_api::VehicleProperties>()};