Better control config

This commit is contained in:
lhark 2016-06-17 03:44:30 +02:00
parent 77d16e098a
commit e18683fd42

View file

@ -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);