Closed benenaes closed 6 years ago
Thank you for the very detailed feedback and solution suggestion! The current quiz set (coding and concept quizzes) is intended to build familiarity with Bayesian filters through the combination of hand calculations and realization of those calculations in code. As such we did not pursue overlap and boundaries. It may be worth implementing at some point and we will consider that.
With respect to this item:
The function assumes that control_stdev == 1, because only the positions immediately next to a landmark are initialized with 1.0 / normalization_term
The control_stdev is not an assumption but is rather defined 1.0 for purposes of this example. That dictates initialization at a landmark +/- 1.0/normalization term. Does tha make sense?
OK, but maybe this could be pointed out in the comments. Because if control_stdev would be e.g. 2, then:
priors[landmark_center] = 1.0f/normalization_term;
priors[landmark_center - 1] = 1.0f/normalization_term;
priors[landmark_center + 1] = 1.0f/normalization_term;
would have to become:
priors[landmark_center] = 1.0f/normalization_term;
priors[landmark_center - 2] = 1.0f/normalization_term;
priors[landmark_center + 2] = 1.0f/normalization_term;
priors[landmark_center - 1] = 1.0f/normalization_term;
priors[landmark_center + 1] = 1.0f/normalization_term;
That is a good point. A better approach for the solution would probably be initializing priors based on the control standard deviation.
A note has been added to the quiz solution.
Please check my query on the same topic here , as it still have errors https://carnd.slack.com/files/U8Q0TD085/FA1E1CQR2/Term2_-_Markov_Localization___control_stdev_vs_position_stdev
https://discussions.udacity.com/t/control-standard-deviation-vs-position-standard-deviation/655523
Fix it if I am correct.
The given solution is not correct.
A better solution would be:
std::vector initialize_priors(
int map_size,
std::vector landmark_positions,
float control_stdev)
{
std::vector priors(map_size, 0);
//initialize priors assumimg vehicle at landmark +/- 1.0 meters position stdev
}