Skip to content

Commit 007f991

Browse files
committed
changed motion equations
1 parent 2851f28 commit 007f991

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

EKF/ekf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def get_mu_bar(prev_mu, v, w, angle, dt):
108108
########################################################################################
109109
############################## DEFINE PARAMETERS HERE ##################################
110110
########################################################################################
111-
use_mat_data = False
111+
use_mat_data = True
112112
# noise in the command velocities (translational and rotational)
113113
alpha_1 = .1
114114
alpha_2 = .01
@@ -137,7 +137,7 @@ def get_mu_bar(prev_mu, v, w, angle, dt):
137137
num_landmarks = len(lm_x)
138138

139139
# noise free inputs (NOT ground truth)
140-
v_c = 1 + (.5*cos(2*np.pi*.2*t))
140+
v_c = 1 + (.5*sin(2*np.pi*.2*t))
141141
om_c = -.2 + (2*cos(2*np.pi*.6*t))
142142

143143
# ground truth

EKF_SLAM/ekf_slam.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def wrap(angle):
184184
F_x[0:3,0:3] = np.identity(3)
185185

186186
# noise free inputs (NOT ground truth)
187-
v_c = 1 + (.5*cos(2*np.pi*.2*t))
187+
v_c = 1 + (.5*sin(2*np.pi*.2*t))
188188
om_c = -.2 + (2*cos(2*np.pi*.6*t))
189189

190190
# ground truth

Fast_SLAM/fast_slam.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def animate(true_states, pose_particles, markers, lm_pred_uncertainty,
5050
next_lm_unceratinty, = ax.plot([], [], color='r')
5151
lm_uncertanties.append(next_lm_unceratinty)
5252
vision_beam = Wedge((x_tr[0],y_tr[0]), 1000, np.rad2deg(th_tr[0] - fov_bound),
53-
np.rad2deg(th_tr[0] + fov_bound), zorder=-5, alpha=.1, color='m')
53+
np.rad2deg(th_tr[0] + fov_bound), zorder=-5, alpha=.15, color='m')
5454
ax.add_artist(vision_beam)
5555
ax.legend(loc='upper left', bbox_to_anchor=(1, 1))
5656

@@ -186,13 +186,13 @@ def get_avg_uncertainty(lm_uncertainty_matrix):
186186
alpha_2 = .01
187187
alpha_3 = .01
188188
alpha_4 = .1
189-
alpha_5 = .01
190-
alpha_6 = .01
189+
alpha_5 = .001
190+
alpha_6 = .001
191191
# std deviation of range and bearing sensor noise for each landmark
192192
std_dev_range = .1
193193
std_dev_bearing = .05
194194
# sensor field of view (in degrees)
195-
FOV = 90
195+
FOV = 120
196196
# number of landmarks
197197
num_landmarks = 10
198198
########################################################################################
@@ -220,8 +220,8 @@ def get_avg_uncertainty(lm_uncertainty_matrix):
220220
lm_y = world_markers[1,:]
221221

222222
# control inputs - noise free (NOT ground truth)
223-
v_c = 1 + (.5*cos(2*np.pi*.2*t))
224-
om_c = -.2 + (2*cos(2*np.pi*.6*t))
223+
v_c = 1 + (.1*sin(2*np.pi*.3*t))
224+
om_c = -.2 + (.1*cos(2*np.pi*.2*t))
225225
# om_c = -.2 + (1*cos(2*np.pi*.2*t))
226226

227227
# ground truth inputs (with noise)

UKF/ukf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def get_mu_and_sig_bar(dimensionality_bound, w_m, w_c, chi_b_x):
162162
num_landmarks = len(lm_x)
163163

164164
# noise free inputs (NOT ground truth)
165-
v_c = 1 + (.5*cos(2*np.pi*.2*t))
165+
v_c = 1 + (.5*sin(2*np.pi*.2*t))
166166
om_c = -.2 + (2*cos(2*np.pi*.6*t))
167167

168168
# ground truth

0 commit comments

Comments
 (0)