|
The code seen on the solution video and the code in the quiz skeleton code seem to be different.
This seems to be dead code, though. Not sure if there are any differences that would affect the result but it's a bit confusing. aspa |
|
In the original code, move and sense calls were done once before the loop that initialized the particles and particle noise. They were immediately after "myrobot = robot()". In the solution, the calls were moved after the particle initialization loop, ending up as the first items in the loop used to repeat the move, sense, calculate, resample cycle. Its not dead code, since the robot and particles are [to be] moved again [each time through loop] based on the previous calculated results. That moving is what actually [eventually] gets the orientation values to converge. |
|
I think because you have to sense a list of N=1000 particles, you don't create Z, but use the sense method directly with each particle. Or perhaps it is dead code which wrongly stood there... |
|
not sure if i understand. in the skeleton code both myrobot and Z set but they're not used anywhere after that. |
|
ok, myrobot is the robot position that's used later on e.g. in u3-23. |
|
missed the measurement_prob() call that compares the robot and particle positions. |