DroneXController.yaml 4.77 KB
Newer Older
1
# Mass of the crazyflie
2
mass_CF : 31 #28 #32
3
4
5


# Max setpoint change per second
6
max_setpoint_change_per_second_horizontal  :  1.00 # [meters]
mastefan's avatar
mastefan committed
7
max_setpoint_change_per_second_vertical    :  0.6 #0.8 # [meters]
8
9
max_setpoint_change_per_second_yaw_degrees : 90.00 # [degrees]

10
# max absolute value for integrator
11
integrator_max : [0.4, 0.4, 0.4] #[1.0, 1.0, 1.0]
12

13
14
15
16
17
# Frequency of the controller, in hertz
vicon_frequency : 200



mastefan's avatar
mastefan committed
18
# controller_mode : 0: Basic Controller
mastefan's avatar
mastefan committed
19
20
# controller_mode : 1: Angle Controller, Trajectory Controller
controller_mode : 1
21
22


maruggv's avatar
maruggv committed
23
24
25
26
# parameters for trajectory:

# lookahead times
trajectory_deltaT_position: 0.0
mastefan's avatar
mastefan committed
27
trajectory_deltaT_velocity: 0.45 #0.5 #0.35
maruggv's avatar
maruggv committed
28
29
30
# distance to first point on trajectory
xm1_x_distance: 0.5
# distance from MS to second point on trajectory
mastefan's avatar
mastefan committed
31
32
xm2_distance_to_ms: 1.0 #0.6
xm2_height_over_ms: 0.5 #0.3
mastefan's avatar
mastefan committed
33

34
xm1_height: 0.6
mastefan's avatar
mastefan committed
35

maruggv's avatar
maruggv committed
36
# velocity of trajctory
37
trajectory_velocity_of_CF : 2.0
mastefan's avatar
mastefan committed
38
trajectory_velocity_of_CF_init : 1.0
39
40
xm1_normalizing_factor : 3   # normalize the difference between xcf0 and xms
xm1_scaling_factor : 0.6     # Scale in the direction of the the difference between xcf0 and xms
maruggv's avatar
maruggv committed
41

42
43
xm2_distance_to_ms_at_zero_velocity : 0.6   # xm2 distance behind the mothership when mothership velocity is 0
xm2_distance_to_ms_scaling_factor : 1       # Scale in direction of the mothership velocity
maruggv's avatar
maruggv committed
44
45

# tolerances
46
tol_takeoff:  [0.07, 0.07, 0.07] #[0.07, 0.07, 0.07]
mastefan's avatar
mastefan committed
47
tol_approach: [0.3, 0.3, 0.1]
48
49
tol_land:     [0.05, 0.05, 0.05] #[0.01, 0.01, 0.05]
land_height:  0.03 #0.3
50
start_height: 0.6
maruggv's avatar
maruggv committed
51

52
pickupmode: 0 # 0=land directly; 1=hover to pickup chocolate
maruggv's avatar
maruggv committed
53

54
55
56
57
58
59
60





# THE FOLLOWING PARAMETERS ARE USED
# FOR THE LOW-LEVEL CONTROLLER
61
62
63
64

# Frequency of the controller, in hertz
control_frequency : 200

65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# 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
shouldPublishCurrent_xyz_yaw : true

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

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

# 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
estimator_method : 1


mastefan's avatar
mastefan committed
93

94
95
96
97
98
99
100
101
102
103
104
105
106


# The max and minimum thrust for a 16-bit command
command_sixteenbit_min : 1000
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]

107

108
109
110
111
# > For the (roll,pitch,yaw) angles
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]
112

113
114
115
#PMKF_Ahat_row1_for_angles     :  [  0.6723, 0.0034]
#PMKF_Ahat_row2_for_angles     :  [-12.9648, 0.9352]
#PMKF_Kinf_for_angles          :  [  0.3277,12.9648]
116
117

# for our integrator (so far just random values)
118
gainIntegratorRate :                [-0.20, 0.20, 0.20]      # [roll, pitch, z]
mastefan's avatar
mastefan committed
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
gainIntegratorAngle :               [-0.20, 0.20, 0.20]      # [roll, pitch, z]

# The LQR Controller
gainMatrixThrust_NineStateVector    :  [ 0.00, 0.00, 0.98, 0.00, 0.00, 0.25, 0.00, 0.00, 0.00]
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]
gainMatrixYawRate                   :  [ 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 2.30]







# LQR: get Angles from position error
gainMatrixThrust_SixStateVector:  [ 0.00, 0.00, 0.82, 0.00, 0.00, 0.22]
gainMatrixRollAngle            :  [ 0.00,-0.31, 0.00, 0.00,-0.25, 0.00]
gainMatrixPitchAngle           :  [ 0.31, 0.00, 0.00, 0.25, 0.00, 0.00]

138

maruggv's avatar
maruggv committed
139
# LQR: get Rates from Angle error
mastefan's avatar
mastefan committed
140
141
gainMatrixRollRatefromAngle           :  [ 4.00, 0.00, 0.00]
gainMatrixPitchRatefromAngle          :  [ 0.00, 4.00, 0.00]
maruggv's avatar
maruggv committed
142
143
144
gainMatrixYawRatefromAngle            :  [ 0.00, 0.00, 2.30]


145
146
147
# LQR: get baseline Angle from Velocity for feedforward (roll, pitch)
# [-20°,20°]=[-0.34906585, 0.34906585]
# [15°, 15°]=[-0.261799388, 0.261799388]
mastefan's avatar
mastefan committed
148
# [10°, 10°]=[-0.174532925, 0.174532925]
149
gainFeedforwardAnglefromVelocity: [-0.261799388, 0.261799388]