Better control config
This commit is contained in:
parent
77d16e098a
commit
e18683fd42
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue