List of commits:
Subject Hash Author Date (UTC)
Particle wall collision handling a7edc6daa1df476867c54b7eb312e0d40dcaddae B.Sc. Moczalla, Rafael 2017-05-30 12:21:56
noise changed before while excution - add_little_noise -> add_noise 81531985e65cf67c83ec823e31c2050763cb8cbf B.Sc. Moczalla, Rafael 2017-05-29 15:19:07
index bug weight_sum = 0 22c7cdeeb0a07ad61d9681cb78d63a1e99937fad B.Sc. Moczalla, Rafael 2017-05-29 15:04:12
Dennis Wagners work 1c13a0f9f68878d43b2721dea5d85520addff374 B.Sc. Moczalla, Rafael 2017-05-27 11:07:40
README added 1ebabdde437e516282d5984ab46e24696ca5b5f8 B.Sc. Moczalla, Rafael 2017-05-25 11:54:21
first push 69514078177c368ef34ebcb0ea20f3cc853dd78e B.Sc. Moczalla, Rafael 2017-05-25 11:29:50
Commit a7edc6daa1df476867c54b7eb312e0d40dcaddae - Particle wall collision handling
Author: B.Sc. Moczalla, Rafael
Author date (UTC): 2017-05-30 12:21
Committer name: B.Sc. Moczalla, Rafael
Committer date (UTC): 2017-05-30 12:21
Parent(s): 81531985e65cf67c83ec823e31c2050763cb8cbf
Signing key:
Tree: 68698758ec7f0d213af0c72f63cca9296b62077b
File Lines added Lines deleted
particle_filter.py 27 10
File particle_filter.py changed (mode: 100644) (index 9b6d803..437bb0d)
... ... while True:
210 210
211 211 weight_sum = 0 weight_sum = 0
212 212
213 new_particles = []
213 good_particles = []
214 bad_particles = []
214 215
215 216 # Loop over all particles # Loop over all particles
216 217 for i in range(len(particles)): for i in range(len(particles)):
 
... ... while True:
226 227 # Sample the new particle with some noise and increment the sum for the next particle # Sample the new particle with some noise and increment the sum for the next particle
227 228 x, y = add_noise(0.02, *p.xy) x, y = add_noise(0.02, *p.xy)
228 229
229 # Resample particle with increasing noise to avoid sampling points inside a wall or outside world
230 c = 2
231 while not world.is_free(x, y):
232 x, y = add_noise(c*0.02, *p.xy)
233 c += 1
230 # Decide whether particle good or bad
231 if world.is_free(x, y):
232 good_particles.append(Particle(x, y, p.h, p.w, True))
233 else:
234 bad_particles.append(p)
234 235
235 new_particles.append(Particle(x, y, p.h, p.w, True))
236 236 new_part_weitgh_d += dp new_part_weitgh_d += dp
237 237
238 weight_sum = 0
239 current_particle_index = 0
238 if len(good_particles) == 0:
239 # Resample all particles random
240 particles = Particle.create_random(PARTICLE_COUNT, world)
241 elif len(bad_particles) > 0:
242 # Put all particles near center of mass
243 for bad in bad_particles:
244 x, y, schmeiszweg = compute_mean_point(good_particles)
245 new_particle = Particle(x, y, bad.h)
246 new_particle.w = w_gauss(new_particle.read_sensor(world), r_d)
240 247
241 particles = new_particles
248 i = 1;
249
250 # Check whether particle in wall or not
251 while not world.is_free(x, y):
252 x, y = add_noise(i * 0.02, *new_particle.xy)
253 i += 1
254
255 # Add new good particle
256 good_particles.append(Particle(x, y, new_particle.h, new_particle.w, True))
257
258 particles = good_particles
242 259
243 260 # ---------- Move things ---------- # ---------- Move things ----------
244 261 old_heading = nao.h old_heading = nao.h
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/bscmoczallarafael/kogrob-ha03

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/bscmoczallarafael/kogrob-ha03

Clone this repository using git:
git clone git://git.rocketgit.com/user/bscmoczallarafael/kogrob-ha03

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main