38namespace surface_vehicle {
47template <
typename Derived>
55 _default_cruising_speed_m_s = cruising_speed_m_s;
56 return static_cast<Derived&
>(*this);
64 _default_arrival_speed_m_s = arrival_speed_m_s;
65 return static_cast<Derived&
>(*this);
68 inline std::optional<float> getDefaultCruisingSpeed()
const {
69 return _default_cruising_speed_m_s;
71 inline float getDefaultArrivalSpeed()
const {
return _default_arrival_speed_m_s; }
74 std::optional<float> _default_cruising_speed_m_s{};
75 float _default_arrival_speed_m_s{0.f};
81template <
typename Derived>
90 _cruising_speed_m_s = cruising_speed_m_s;
91 return static_cast<Derived&
>(*this);
101 _arrival_speed_m_s = arrival_speed_m_s;
102 return static_cast<Derived&
>(*this);
105 inline std::optional<float> getCruisingSpeed()
const {
return _cruising_speed_m_s; }
106 inline std::optional<float> getArrivalSpeed()
const {
return _arrival_speed_m_s; }
109 std::optional<float> _cruising_speed_m_s{};
110 std::optional<float> _arrival_speed_m_s{};
Mode-wide defaults shared by the surface vehicle position setpoint types.
Definition position_setpoint_common.hpp:48
Derived & withDefaultArrivalSpeed(float arrival_speed_m_s)
Sets the default speed the vehicle has when it reaches the target [m/s]. Default is 0,...
Definition position_setpoint_common.hpp:63
Derived & withDefaultCruisingSpeed(float cruising_speed_m_s)
Sets the default cruising speed [m/s]. Negative drives to the target in reverse. Unset means the vehi...
Definition position_setpoint_common.hpp:54
Speed settings shared by the surface vehicle position setpoint types.
Definition position_setpoint_common.hpp:82
Derived & withCruisingSpeed(float cruising_speed_m_s)
Sets the speed to drive at on the way to the target [m/s].
Definition position_setpoint_common.hpp:89
Derived & withArrivalSpeed(float arrival_speed_m_s)
Sets the speed the vehicle has when it reaches the target [m/s].
Definition position_setpoint_common.hpp:100