diff --git a/src/control.cpp b/src/control.cpp index 7ce4e37..242d4c0 100644 --- a/src/control.cpp +++ b/src/control.cpp @@ -12,6 +12,8 @@ using namespace std; class Drone_control { public: + constexpr static float MAX_ANG_VEL = 0.3; + ros::NodeHandle n; ros::Publisher pub_cmd; ros::Publisher pub_takeoff; @@ -58,7 +60,7 @@ class Drone_control { int moy = 0; for (const auto& d : decision_acc) moy += d; - twist.angular.z = moy / (float)NB_ACC * 0.3; + twist.angular.z = moy / (float)NB_ACC * MAX_ANG_VEL; } pub_cmd.publish(twist);