-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from gsilano/fix/controller
CrazyS improvements and bug fixing into the control architecture
- Loading branch information
Showing
49 changed files
with
1,662 additions
and
1,738 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
<package> | ||
<name>rotors_comm</name> | ||
<version>2.1.1</version> | ||
<version>4.0.3</version> | ||
<description>RotorS specific messages and services.</description> | ||
|
||
<maintainer email="[email protected]">Giuseppe Silano</maintainer> | ||
<maintainer email="[email protected]">Luigi Iannelli</maintainer> | ||
|
||
<author>Fadri Furrer</author> | ||
<author>Michael Burri</author> | ||
<author>Mina Kamel</author> | ||
<author>Janosch Nikolic</author> | ||
<author>Markus Achtelik</author> | ||
<author>Giuseppe Silano</author> | ||
<author>Emanuele Aucone</author> | ||
<author>Benjamin Rodriguez</author> | ||
<author>Luigi Iannelli</author> | ||
|
||
<license>ASL 2.0</license> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
rotors_control/include/rotors_control/controller_parameters.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/* | ||
* Copyright 2018 Giuseppe Silano, University of Sannio in Benevento, Italy | ||
* Copyright 2018 Emanuele Aucone, University of Sannio in Benevento, Italy | ||
* Copyright 2018 Benjamin Rodriguez, MIT, USA | ||
* Copyright 2018 Luigi Iannelli, University of Sannio in Benevento, Italy | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#ifndef CONTROLLER_PARAMETERS_H | ||
#define CONTROLLER_PARAMETERS_H | ||
|
||
// Default values for the position controller of the Crazyflie2. XYController [x,y], AttitudeController [phi,theta] | ||
//RateController [p,q,r], YawController[yaw], HoveringController[z] | ||
static const Eigen::Vector2f kPDefaultXYController = Eigen::Vector2f(15, -15); | ||
static const Eigen::Vector2f kIDefaultXYController = Eigen::Vector2f(1, -1); | ||
|
||
static const Eigen::Vector2f kPDefaultAttitudeController = Eigen::Vector2f(3.5, 3.5); | ||
static const Eigen::Vector2f kIDefaultAttitudeController = Eigen::Vector2f(2, 2); | ||
|
||
static const Eigen::Vector3f kPDefaultRateController = Eigen::Vector3f(110, 110, 110); | ||
static const Eigen::Vector3f kIDefaultRateController = Eigen::Vector3f(0, 0, 16.7); | ||
|
||
static const double kPDefaultYawController = 3; | ||
static const double kIDefaultYawController = 1; | ||
|
||
static const double kPDefaultHoveringController = 14000; | ||
static const double kIDefaultHoveringController = 15000; | ||
static const double kDDefaultHoveringController = 20000; | ||
|
||
namespace rotors_control { | ||
|
||
class PositionControllerParameters { | ||
public: | ||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW | ||
PositionControllerParameters() | ||
: xy_gain_kp_(kPDefaultXYController), | ||
xy_gain_ki_(kIDefaultXYController), | ||
attitude_gain_kp_(kPDefaultAttitudeController), | ||
attitude_gain_ki_(kIDefaultAttitudeController), | ||
rate_gain_kp_(kPDefaultRateController), | ||
rate_gain_ki_(kIDefaultRateController), | ||
yaw_gain_kp_(kPDefaultYawController), | ||
yaw_gain_ki_(kIDefaultYawController), | ||
hovering_gain_kp_(kPDefaultHoveringController), | ||
hovering_gain_ki_(kIDefaultHoveringController), | ||
hovering_gain_kd_(kDDefaultHoveringController) { | ||
} | ||
|
||
Eigen::Vector2f xy_gain_kp_; | ||
Eigen::Vector2f xy_gain_ki_; | ||
|
||
Eigen::Vector2f attitude_gain_kp_; | ||
Eigen::Vector2f attitude_gain_ki_; | ||
|
||
Eigen::Vector3f rate_gain_kp_; | ||
Eigen::Vector3f rate_gain_ki_; | ||
|
||
double yaw_gain_kp_; | ||
double yaw_gain_ki_; | ||
|
||
double hovering_gain_kp_; | ||
double hovering_gain_ki_; | ||
double hovering_gain_kd_; | ||
}; | ||
|
||
} | ||
|
||
#endif // CONTROLLER_PARAMETERS_H |
Oops, something went wrong.