def createParticles(self, n): for i in range(n): # x = np.random.rand()*10-5 # y = np.random.rand()*10-5 # theta = (np.random.rand()*2*np.pi)-np.pi groundTruthStart = self.data.robots[ self.robotId].groundTruthPosition[0] x = groundTruthStart[1] y = groundTruthStart[2] theta = groundTruthStart[3] p = Particle(self.n, [x, y, theta], self.data.map, i) self.particles.append(p.copy())