nxt_pf_nav_ar_toolkit
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
nxt_pf_nav_ar_toolkit [2016/10/05 01:54] – dwallace | nxt_pf_nav_ar_toolkit [2017/02/09 13:45] (current) – dwallace | ||
---|---|---|---|
Line 3: | Line 3: | ||
**Authors: | **Authors: | ||
\\ | \\ | ||
+ | **Keywords: | ||
+ | \\ | ||
**Date:** Last modified on 09/13/16 | **Date:** Last modified on 09/13/16 | ||
\\ | \\ | ||
- | **Keywords: | + | |
- | \\ | + | ===== Introduction ===== |
- | =====Introduction===== | + | |
Potential Fields is a concept that comes from the fundamentals of electricity and magnetism. A charge with high potential (positive) will repel the electric field away from it, while a charge with low potential (negative) will attract the electric field. With many of these attractive or repulsive points present in the electric field, a field of vectors is created representing all of the forces at each point in the field. This vector field can be navigated by following each vector at each present location, leading towards the point of lowest potential in the field (global minimum). | Potential Fields is a concept that comes from the fundamentals of electricity and magnetism. A charge with high potential (positive) will repel the electric field away from it, while a charge with low potential (negative) will attract the electric field. With many of these attractive or repulsive points present in the electric field, a field of vectors is created representing all of the forces at each point in the field. This vector field can be navigated by following each vector at each present location, leading towards the point of lowest potential in the field (global minimum). | ||
Line 20: | Line 21: | ||
\\ | \\ | ||
- | If you just want to try out the program yourself, here is an [[http://s000.tinyupload.com/download.php? | + | If you just want to try out the program yourself, here is an [[https://github.com/D-Wazzle/ |
- | If you want to view the source code directly, here is the [[http://s000.tinyupload.com/download.php? | + | If you want to view the source code directly, here is the [[https://github.com/D-Wazzle/ |
===== Motivation and Audience ===== | ===== Motivation and Audience ===== | ||
Line 33: | Line 34: | ||
\\ | \\ | ||
The rest of this tutorial is presented as follows: | The rest of this tutorial is presented as follows: | ||
- | * [[|Integrating Potential Fields]] | + | * Integrating Potential Fields |
- | * [[|Integrating Bluetooth]] | + | * Integrating Bluetooth |
* Final Words | * Final Words | ||
Line 41: | Line 42: | ||
We will start by editing the file that we used for the ARToolkit Coordinate Tracking. This file provides the necessary base for our ARToolkit program to run. | We will start by editing the file that we used for the ARToolkit Coordinate Tracking. This file provides the necessary base for our ARToolkit program to run. | ||
- | The first thing that we will want to define in our program is a new struct used to track the robot. This struct will be delcared | + | The first thing that we will want to define in our program is a new struct used to track the robot. This struct will be declared |
<code c++> | <code c++> | ||
Line 84: | Line 85: | ||
</ | </ | ||
- | Now we can move onto the mainLoop function where our Potential Fields calculations are actually occurring. Since these are implemented into the the same function as the video, these values will be re-calculated for every video frame. This is what gives the program the ability to calculate the navigation in real-time. | + | Now we can move onto the mainLoop function where our Potential Fields calculations are actually occurring. Since these are implemented into the same function as the video, these values will be re-calculated for every video frame. This is what gives the program the ability to calculate the navigation in real-time. |
First we will declare some variables. | First we will declare some variables. | ||
Line 112: | Line 113: | ||
</ | </ | ||
- | Now we will actually be able to implement Potential Fields calculations into our program. This will occur just after the end of our Coordinate Tracking program. This first chuck is going to calculate the angle of the robot based on the relation of the markers located on the robot. This implementation allows us to have a real-time, accurate model for our robot' | + | Now we will actually be able to implement Potential Fields calculations into our program. This will occur just after the end of our Coordinate Tracking program. This first chunck |
<code c++> | <code c++> | ||
Line 138: | Line 139: | ||
</ | </ | ||
- | Now we will implement the main section of the Potential Fields calculations. This will be located within a for loop that runs for the number of obstacles given. It will first calculate the Repulsive Potential of each obstacle, and output them to the screen. Then it will calculate the next X&Y coordinates and velocities based on the Potential Fields formulas for these values. Finally, it will evoke a function called diffSteer, which handles the kinematics | + | Now we will implement the main section of the Potential Fields calculations. This will be located within a for loop that runs for the number of obstacles given. It will first calculate the Repulsive Potential of each obstacle, and output them to the screen. Then it will calculate the next X&Y coordinates and velocities based on the Potential Fields formulas for these values. Finally, it will invoke |
<code c++> | <code c++> | ||
Line 154: | Line 155: | ||
} | } | ||
- | } | + | } |
sprintf(ur1, | sprintf(ur1, | ||
Line 187: | Line 188: | ||
- Writes the component velocities to the NXT to then control the motor power on the Bot | - Writes the component velocities to the NXT to then control the motor power on the Bot | ||
- | < | + | < |
static void diffSteer(Mobile & | static void diffSteer(Mobile & | ||
{ | { | ||
Line 246: | Line 247: | ||
==== Final Words ==== | ==== Final Words ==== | ||
- | This tutorial' | + | This tutorial' |
- | \\ | + | |
- | \\ | + | |
- | Speculating future work derived from this tutorial, includes <fill in the blank>. In the big picture, the problem of <fill in the blank> can be solved | + | |
\\ | \\ | ||
\\ | \\ | ||
For questions, clarifications, | For questions, clarifications, |
nxt_pf_nav_ar_toolkit.1475657668.txt.gz · Last modified: by dwallace