DemoController.yaml 5.75 KB
Newer Older
1
# Mass of the crazyflie
2
mass : 29
3
4

# Frequency of the controller, in hertz
5
vicon_frequency : 200
6
7
8
9
10
11
12
13
14
control_frequency : 200

# Quadratic motor regression equation (a0, a1, a2)
motorPoly : [5.484560e-4, 1.032633e-6, 2.130295e-11]

# Boolean for whether to execute the convert into body frame function
shouldPerformConvertIntoBodyFrame : true

# Boolean indiciating whether the (x,y,z,yaw) of this agent should be published or not
15
shouldPublishCurrent_xyz_yaw : true
16
17
18
19
20
21
22
23
24

# Boolean indicating whether the (x,y,z,yaw) setpoint of this agent should adapted in
# an attempt to follow the "my_current_xyz_yaw_topic" from another agent
shouldFollowAnotherAgent : false

# The order in which agents should follow eachother
# > This parameter is a vector of integers that specifies  agent ID's
# > The order of the agent ID's is the ordering of the line formation
# > i.e., the first ID is the leader, the second ID should follow the first ID, and so on
25
follow_in_a_line_agentIDs : [5, 6, 7]
26
27

# Boolean indiciating whether the "Debug Message" of this agent should be published or not
28
shouldPublishDebugMessage : true
29
30

# Boolean indiciating whether the debugging ROS_INFO_STREAM should be displayed or not
31
shouldDisplayDebugInfo : false
32

33

34
35
36
# A flag for which controller mode to use, defined as:
# 1 CONTROLLER_MODE_LQR_MOTOR
#    -  LQR controller based on the state vector: [position,velocity,angles,angular velocity]
37
#       commands per motor thrusts
38
39
# 2 CONTROLLER_MODE_LQR_ACTUATOR
#    -  LQR controller based on the state vector: [position,velocity,angles,angular velocity]
40
#       commands actuators of total force and bodz torques
41
42
43
44
45
46
47
48
49
50
# 3 CONTROLLER_MODE_LQR_RATE
#    -  LQR controller based on the state vector: [position,velocity,angles]
# 4 CONTROLLER_MODE_LQR_ANGLE
#    -  LQR controller based on the state vector: [position,velocity]
# 5 CONTROLLER_MODE_LQR_ANGLE_RATE_NESTED
#    -  LQR Nested angle and rate controller
# 6 CONTROLLER_MODE_ANGLE_RESPONSE_TEST
#    -  Swaps between pitch set-points to test angle set-point response time
#       i.e., this controller test the assumption that "the inner loop is infinitely fast"
#
mastefan's avatar
mastefan committed
51
controller_mode : 6
52
53
54
55
56
57
58
59
60
61
62
63


# A flag for which estimator to use, defined as:
# 1  -  Finite Different Method,
#       Takes the poisition and angles directly as measured,
#       and estimates the velocities as a finite different to the
#       previous measurement
# 2  -  Point Mass Per Dimension Method
#       Uses a 2nd order random walk estimator independently for
#       each of (x,y,z,roll,pitch,yaw)
# 3  -  Quad-rotor Model Based Method
#       Uses the model of the quad-rotor and the previous inputs
64
estimator_method : 1
65
66


67
# The LQR Controller parameters for "mode = 1"
68
69
70
71
gainMatrixMotor1                    :  [ -0.0180, 0.0180, 0.0350,-0.0110, 0.0110, 0.0260,-0.0220,-0.0220,-0.0110,-0.00024,-0.00024,-0.00045]
gainMatrixMotor2                    :  [  0.0180, 0.0180, 0.0350, 0.0110, 0.0110, 0.0260,-0.0220, 0.0220, 0.0110,-0.00024, 0.00024, 0.00045]
gainMatrixMotor3                    :  [  0.0180,-0.0180, 0.0350, 0.0110,-0.0110, 0.0260, 0.0220, 0.0220,-0.0110, 0.00024, 0.00024,-0.00045]
gainMatrixMotor4                    :  [ -0.0180,-0.0180, 0.0350,-0.0110,-0.0110, 0.0260, 0.0220,-0.0220, 0.0110, 0.00024,-0.00024, 0.00045]
72

73
# The LQR Controller parameters for "mode = 2"
74
75
76
77
gainMatrixThrust_TwelveStateVector  :  [ 0.0000, 0.0000, 0.9800, 0.0000, 0.0000, 0.25, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000]
gainMatrixRollTorque                :  [ 0.0000,-0.0017, 0.0000, 0.0000,-0.0009, 0.00, 0.0019, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000]
gainMatrixPitchTorque               :  [ 0.0017, 0.0000, 0.0000, 0.0009, 0.0000, 0.00, 0.0000, 0.0019, 0.0000, 0.0000, 0.0000, 0.0000]
gainMatrixYawTorque                 :  [ 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.00, 0.0000, 0.0000, 0.0002, 0.0000, 0.0000, 0.0000]
78
79
80

# The LQR Controller parameters for "mode = 3"
gainMatrixThrust_NineStateVector    :  [ 0.00, 0.00, 0.98, 0.00, 0.00, 0.25, 0.00, 0.00, 0.00]
81
82
gainMatrixRollRate                  :  [ 0.00,-6.20, 0.00, 0.00,-3.00, 0.00, 5.20, 0.00, 0.00]
gainMatrixPitchRate                 :  [ 6.20, 0.00, 0.00, 3.00, 0.00, 0.00, 0.00, 5.20, 0.00]
83
84
85
gainMatrixYawRate                   :  [ 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 2.30]

# The LQR Controller parameters for "mode = 4"
86
gainMatrixThrust_SixStateVector     :  [ 0.00, 0.00, 0.98, 0.00, 0.00, 0.25]
87
88
89
90
gainMatrixRollAngle                 :  [ 0.00,-0.20, 0.00, 0.00,-0.20, 0.00]
gainMatrixPitchAngle                :  [ 0.20, 0.00, 0.00, 0.20, 0.00, 0.00]


91
92
93
94
95
96
97
98
99
# The LQR Controller parameters for "mode = 5"
gainMatrixThrust_SixStateVector_50Hz:  [ 0.00, 0.00, 0.82, 0.00, 0.00, 0.22]
gainMatrixRollAngle_50Hz            :  [ 0.00,-0.31, 0.00, 0.00,-0.25, 0.00]
gainMatrixPitchAngle_50Hz           :  [ 0.31, 0.00, 0.00, 0.25, 0.00, 0.00]

gainMatrixRollRate_Nested           :  [ 4.00, 0.00, 0.00]
gainMatrixPitchRate_Nested          :  [ 0.00, 4.00, 0.00]
gainMatrixYawRate_Nested            :  [ 0.00, 0.00, 2.30]

100
101

# The paramters for the "Angle Reponse Test" controller mode
102
angleResponseTest_pitchAngle_degrees : 7
103
104
105
106
107
angleResponseTest_distance_meters    : 0.02




108
109
# The max and minimum thrust for a 16-bit command
command_sixteenbit_min : 1000
110
111
112
113
114
115
116
117
command_sixteenbit_max : 60000


# THE POINT MASS KALMAN FILTER (PMKF) GAINS AND ERROR EVOLUATION
# > For the (x,y,z) position
PMKF_Ahat_row1_for_positions  :  [  0.6723, 0.0034]
PMKF_Ahat_row2_for_positions  :  [-12.9648, 0.9352]
PMKF_Kinf_for_positions       :  [  0.3277,12.9648]
118
119


120
# > For the (roll,pitch,yaw) angles
121
122
123
PMKF_Ahat_row1_for_angles     :  [  0.6954, 0.0035]
PMKF_Ahat_row2_for_angles     :  [-11.0342, 0.9448]
PMKF_Kinf_for_angles          :  [  0.3046,11.0342]
124

125
126
#PMKF_Ahat_row1_for_angles     :  [  0.6723, 0.0034]
#PMKF_Ahat_row2_for_angles     :  [-12.9648, 0.9352]
mastefan's avatar
mastefan committed
127
#PMKF_Kinf_for_angles          :  [  0.3277,12.9648]