{"type":"video","version":"1.0","html":"<iframe src=\"https://www.loom.com/embed/c3d56b81f9624c6fab7572b65158d940\" frameborder=\"0\" width=\"1920\" height=\"1440\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>","height":1440,"width":1920,"provider_name":"Loom","provider_url":"https://www.loom.com","thumbnail_height":1440,"thumbnail_width":1920,"thumbnail_url":"https://cdn.loom.com/sessions/thumbnails/c3d56b81f9624c6fab7572b65158d940-1496078061360839.gif","duration":118.65,"title":"April Challenge Car Guidance and Velocity Logic","description":"I explain how my April Challenge code guides the car along the road. I define a vertical height of 1.8, and at that height I detect the red line using a get red mask and take the middle red pixels. With the guiding point coordinate, I compute the error as how far we are from the image center. For velocity control, if the error change between frames is above 5, or the guiding point is far from center, I decrease velocity, otherwise I increase it. Velocity stays between 1 and 2."}