Wednesday, December 20, 2017

The Mysterious Teal Cloud!

Found something interesting yesterday: after color-coding the particle weights, it appears that the timesteps following kidnapping events and select actions like turning a corner result in a particle cloud in which all the weights are assigned to a bright lime green.


SIDEBAR:
One thing I'm wondering about: do the particle weights/weight distributions vary depending on things like the map or the route? I would want whatever threshold I come up with to be based on ...a specific rule or calculation, not a specific number. 
SIDEBAR OVER.

Anyway, back to the Mysterious Teal Cloud:
There's a beautiful shade of teal that ONLY surfaces in the particle clouds in the 5-8 seconds after a kidnapping incident.  It occurs in 12/13 of my datasets.  Hallelujah!

Observe:  Kidnapping event at 45 seconds.  At 52 seconds, there's this glorious swath of teal in the particle cloud.  In the timestep following it (53 seconds), we see the lime green:






In the "Normal", non-kidnapping datasets, the green cloud is preceded by a rainbow cloud:




Another variable I'd like to track is the difference between AMCL message arrivals. 


TODO List:
-See if there's a noticeable difference in the AMCL message frequency in kidnapping or non-kidnapping examples
-Fix colormap scale


P.S. Part of my "teaching philosophy" that I developed in the SLU CUTS program is the benefits of including reflection as part of the learning process. The experience of writing this blog post forced me to go through the process of explaining what I think is going on, and caused me to re-think a couple things and come to a better understanding of the data. 

Sunday, December 17, 2017

Plot Comparison

Finally learned how to plot (x, y, angle) data in Matlab with the quiver() function, while also setting the arrows' colors individually to correspond with the particle weight.  I re-visited the joys of For Loop vs. matrix operations performance, learned about the num2cell() and cellfun() functions, and questioned my sanity over figure holds and resets.

Turns out, Matlab has built-in color schemes, and I used these to denote the particle's weight. 

Dark Blue = low weight
Green = high weight


Here is what a "normal" drive looks like over time. 





Here is what the drive looks like when there is a "major" kidnapping event as the robot approaches (0, -2) - moves right to left from (1, -2):