WaterlooRobotics / mobilerobotics

Matlab and Robot code for MTE 544: Autonomous Mobile Robotics at the University of Waterloo
66 stars 38 forks source link

I5 bayes filter #40

Closed rickeywang closed 7 years ago

rickeywang commented 8 years ago

Addressing #5 Not sure if the re-organization I've done so far is sufficient, or how the existing example can be simplified down. If anyone's got a better ideas please let me know. Thanks.

bjkomer commented 8 years ago

Works very well, great job!

One improvement that would be nice is an option to slow down the video in bayes_filter_example.m as it goes by so fast it is hard to see what is going on. Another option would be to have a key to step forward/backward through the animation. It would also be helpful to have a legend showing what the colours mean (e.g. which dot is true state, and which dot is belief, and what the shaded colours mean) and/or mention the colour scheme in the comments near the top.

For bayes_filter_example_simple.m it would be good to have checks to see that the prompt input is correct (only allow 0 or 1). It would also be helpful to have a comment at the top of the file explaining how the example works (i.e. that it has prompts that take inputs for specific things). Most other examples don't use the command window, so someone who has it closed or minimized might not know they need it.

LordBismaya commented 8 years ago

As Brent mentioned,

  1. Instructions in the Comments section will be useful for the user in the Door Example
  2. Legends in the plots would also help in Histogram Example. Also,
  3. In addition to the backstepping feature as suggested by Brent, another way could be to join the center of the squares that would result in some sort of a trajectory to keep track of the motions.
  4. For the Door opening example, mistyped cases are not handled. (if by mistake the user enters something other than 0 or 1).
  5. An interesting addition to the code that I can think of, is adding in the history in the prompt. So essentially, each time the prompt can be cleared to reflect the time, past measurements, inputs and beliefs. Such as this:

TIME: 0 1 2 3 4 5 6 7 MEAS:0 0 1 0 1 0 1 0 INPUT:0 1 0 1 0 1 0 1 BEL :0.2 0.3 0.9 0.91 ENTER next input/meas: (0:YES 1:NO q: EXIT):

Essentially, the screen would be cleared in each iteration and the appended meas/input could be reflected. This would add in information about the change in belief over time in one screen.Simple use of fprintf with proper spacing and rounding off should suffice.

The rest of the code is organised well. Good work.