From d55e5cbf4aa840329e6ad13eb7edb295c080f11e Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Wed, 17 Apr 2024 15:23:00 +0200 Subject: [PATCH] Add SetVelocity --- Propulsion.cpp | 2 ++ Propulsion.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Propulsion.cpp b/Propulsion.cpp index 37e83f6..f7a80a0 100644 --- a/Propulsion.cpp +++ b/Propulsion.cpp @@ -35,6 +35,8 @@ void Propulsion::SetTwistSpeed(Vector2 linear, float yaw) {} void Propulsion::SetTwistSpeed(Vector3 linear, float yaw, float pitch, float roll) {} +void Propulsion::SetVelocity(Polar velocity) {} + Polar Propulsion::GetVelocity() { return Polar(0, 0); } float Propulsion::GetAngularVelocity() { return 0; } \ No newline at end of file diff --git a/Propulsion.h b/Propulsion.h index 605f1af..bac840a 100644 --- a/Propulsion.h +++ b/Propulsion.h @@ -59,6 +59,8 @@ public: virtual void SetTwistSpeed(Vector3 linear, float yaw = 0.0F, float pitch = 0.0F, float roll = 0.0F); + virtual void SetVelocity(Polar velocity); + /// @brief Retrieve the current velocity of the roboid /// @return The velocity in polar coordinates /// The actual units of the velocity depend on the implementation