This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
wiki:v2:lego_chase_demo [2019/01/30 23:09] pixycam |
wiki:v2:lego_chase_demo [2019/01/30 23:28] pixycam |
||
---|---|---|---|
Line 53: | Line 53: | ||
{{wiki:img:3e3b64f2ff052ac58280fa2315eff9d803714e6e.png}}\\ | {{wiki:img:3e3b64f2ff052ac58280fa2315eff9d803714e6e.png}}\\ | ||
- | - Browse to the location where you unzipped the "LEGO blocks and examples" file (which you can download [[https://pixycam.com/downloads-pixy2/|on this page]]), and then to the **examples** directory and select "ccc\_chase.ev3" and click on **Open**. | + | - Browse to the location where you unzipped the "LEGO blocks and examples" file (which you can download [[https://pixycam.com/downloads-pixy2/|on this page]]), and then to the **examples** directory and select "ccc\_chase.ev3" and click on **Open**. You should see a program that looks like this (below).\\ |
- | - Click on the "track" tab. You should see a program that looks like this (below).\\ | + | |
{{wiki:v1:image_735.png}}\\ | {{wiki:v1:image_735.png}}\\ | ||
Line 132: | Line 131: | ||
translation = left_motor + right_motor | translation = left_motor + right_motor | ||
</code> | </code> | ||
- | If you've ever driven a tank, these equations probably make sense. But we're interested in the "inverted" equations. We want expressions for the left_wheel and the right_wheel in terms of rotation and translation. That is, we already know how we want our robot to rotate and translate -- these are the outputs of our PID controllers. So rotation and translation are our **knowns**. Our **unknowns** are left_wheel and right_wheel. Using some algebra, we get the inverted equations. | + | If you've ever driven a tank, these equations probably make sense. But we're interested in the "inverted" equations. We want expressions for the left\_wheel and the right\_wheel in terms of rotation and translation. That is, we already know how we want our robot to rotate and translate -- these are the outputs of our PID controllers. So rotation and translation are our **knowns**. Our **unknowns** are left\_wheel and right\_wheel. Using some algebra, we get the inverted equations. |
<code> | <code> |