User Tools

Site Tools


nxt_ar_toolkit

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
nxt_ar_toolkit [2017/07/17 03:12]
dwallace
nxt_ar_toolkit [2017/07/17 03:13]
dwallace [Step 8: Using Multiple Markers for Localization and Navigation]
Line 230: Line 230:
 ==== Step 8: Using Multiple Markers for Localization and Navigation ==== ==== Step 8: Using Multiple Markers for Localization and Navigation ====
  
-In order to track the position of a robot or other vehicle using the ARToolkit, we will need to create an algorithm that creates relative coordinates for the robot based off of a known location of a stationary marker. This will allows us to create a kind of coordinate system that is independent of camera position or resolution. In order to do this, we will need to use one barcode marker (in most cases this will be number 0) fixed to a stationary location, and then reference this location in our code to get relative distances. ​ This can be achieved by adding this block of code to the end of the for loop from the previous step (Please declare xCoordRel and yCoordRel at the beginning to the mainLoop() function):+In order to track the position of a robot or other vehicle using the ARToolkit, we will need to create an algorithm that creates relative coordinates for the robot based off of a known location of a stationary marker. This will allows us to create a kind of coordinate system that is independent of camera position or resolution. In order to do this, we will need to use one barcode marker (in most cases this will be number 0) fixed to a stationary location, and then reference this location in our code to get relative distances. ​ This can be achieved by adding this block of code to the end of the for loop from the previous step (Please declare xCoordRel and yCoordRel ​as arrays, with the same size as xCoord and yCoord, ​at the beginning to the mainLoop() function):
  
   if ((xCoord[0] != 0) && (yCoord[0] != 0) && (xCoord[h] < 1000) && (yCoord[h] < 1000) && (xCoord[h] > -1000) && (yCoord[h] > -1000)) {   if ((xCoord[0] != 0) && (yCoord[0] != 0) && (xCoord[h] < 1000) && (yCoord[h] < 1000) && (xCoord[h] > -1000) && (yCoord[h] > -1000)) {
nxt_ar_toolkit.txt ยท Last modified: 2017/07/17 03:13 by dwallace