From 55457af5ce4787c2afc00e28061406cc27cb6922 Mon Sep 17 00:00:00 2001 From: Moju Zhao Date: Mon, 28 Mar 2022 02:49:24 +0900 Subject: [PATCH] Refine the rate definition to enable zero rate --- .../include/aerial_robot_simulation/rotor_handle.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aerial_robot_simulation/include/aerial_robot_simulation/rotor_handle.h b/aerial_robot_simulation/include/aerial_robot_simulation/rotor_handle.h index 909d9280b..9f8803fbe 100644 --- a/aerial_robot_simulation/include/aerial_robot_simulation/rotor_handle.h +++ b/aerial_robot_simulation/include/aerial_robot_simulation/rotor_handle.h @@ -77,7 +77,7 @@ namespace hardware_interface motor_nh.param("rotor_force_noise", rotor_force_noise_, 0.0); // N motor_nh.param("dual_rotor_moment_noise", dual_rotor_moment_noise_, 0.0); - motor_nh.param("speed_rate", speed_rate_, 1.0); // N/(rad/s) , this is a virtual linear rate of speed-f + motor_nh.param("speed_rate", speed_rate_, 1.0); // rad/s/N , this is a virtual linear rate of speed-f } inline std::string getName() const {return name_;} @@ -105,7 +105,7 @@ namespace hardware_interface inline double getSpeed() const { - return *force_ / speed_rate_; + return *force_ * speed_rate_; } private: