- The likelihood function might not correctly implemented or is returning the same value for all particles.
- You could also try plotting the likelihood of each particle given the measurement to see if there are any patterns or issues with the calculation of the likelihood.
- The measurement noise variance is set too low, which could result in all particles having similar likelihood values and hence similar weights.
- If the resampling is not correctly performed, it could lead to all particles having the same weight.
Particle Weight update does not seem to work
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
I have implemented a 2D occupancy map and a robot model. The robot will move through the map. It is equipped with a simulated Lidar sensor. If I let the Monte Carlo Localization function of Matlab run, my code works. The particles converge to the robot's position. However, if I check the particle weights during the process, they are all the same. If I have 2000 particles, all 2000 particles always have the same weights. Does someone know why this is or what the problem might be?
I am assuming that the code works correctly since it does converge. So the weights have to be changing in the background without my knowledge.
The main part of the code is this in a loop for each time step. At the end Vehiclepose will be updated for the next time step.
[ranges,angles] = lidar(Vehiclepose,map);
scan = lidarScan(ranges,angles);
[isUpdated,estimatedPose, estimatedCovariance] = mcl(Vehiclepose, scan);
[particles,weights] = getParticles(mcl);
Thank you.
0 Kommentare
Antworten (1)
Gokul Nath S J
am 19 Apr. 2023
Bearbeitet: Gokul Nath S J
am 19 Apr. 2023
Hi DarZim,
Based on my understanding, it seems that the particles weights are uniform throughout the simulation.
If all 2000 particles have the same weight throughout the Monte Carlo Localization process, then it's possible that there is an error in your implementation of the particle weights update step.
Note that the particle weights are updated based on the likelihood of the measurement given the particle's position. Some possible explanation for why the the particles are having same weights are listed below,
Thanks,
Gokul Nath S J
2 Kommentare
Albert Llufriu López
am 18 Mai 2024
Hello, it's been a year and I see no one has been able to help you. Have you found the problem? I think I'm having the same issue, I have basically the same code as you and I have no idea why I'm unable to update the particles, it's just a few lines of code, I don't know where I'm wrong.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!