ARI MQP Javadoc
4/17/08 7:43 PM
Package Summary	Page	
edu.wpi.ari.glados	 		
edu.wpi.ari.glados.gui	 		
edu.wpi.ari.glados.ins	 		
edu.wpi.ari.glados.insserver	 		
edu.wpi.ari.glados.logging	 		
edu.wpi.ari.glados.mplatform	 		
edu.wpi.ari.glados.network	 		
edu.wpi.ari.glados.slam	 		
edu.wpi.ari.glados.slam.particle	 		
edu.wpi.ari.glados.slam.slamIDE	 		
edu.wpi.ari.glados.test	 		
edu.wpi.ari.glados.vision	 		
edu.wpi.ari.glados.vision.vidar	 		

Package edu.wpi.ari.glados
Class Summary	Page	
GDriver	 		

Class GDriver
edu.wpi.ari.glados
java.lang.Object
  edu.wpi.ari.glados.GDriver
All Implemented Interfaces:
INSObserver, VisionObserver

public class GDriver
extends Object
implements VisionObserver, INSObserver

Constructor Summary	Page	
GDriver()		

Method Summary	Page	
INSManager	getINSManager()		
VisionManager	getVisionManager()		
void	INSReceivedValues(Vector3d step, double yaw)
Called when there is an INS update.		
static void	main(String[] args)		
void	VisionReceivedValues(Vector<Vector3d> points)
Called when there is an INS update.		
Constructor Detail
GDriver
public GDriver()
Method Detail
main
public static void main(String[] args)

getVisionManager
public VisionManager getVisionManager()

getINSManager
public INSManager getINSManager()

VisionReceivedValues
public void VisionReceivedValues(Vector<Vector3d> points)
Description copied from interface: VisionObserver
Called when there is an INS update. Contains the new location and velocity from 0,0 which is the previous position
Specified by:
VisionReceivedValues in interface VisionObserver

INSReceivedValues
public void INSReceivedValues(Vector3d step,
                              double yaw)
Description copied from interface: INSObserver
Called when there is an INS update. Contains the new location and velocity from 0,0 which is the previous position
Specified by:
INSReceivedValues in interface INSObserver
Parameters:
yaw - - yaw of robot over last timestep in radians

Package edu.wpi.ari.glados.gui
Class Summary	Page	
GLaDOSConfigPanel	 		
GLaDOSFrame	 		
GLaDOSSplash	 		
GLaDOSStatusBar	 		
GUIManager	 		

Class GLaDOSConfigPanel
edu.wpi.ari.glados.gui
java.lang.Object
  java.awt.Component
      java.awt.Container
          javax.swing.JComponent
              javax.swing.JPanel
                  edu.wpi.ari.glados.gui.GLaDOSConfigPanel
All Implemented Interfaces:
Accessible, ActionListener, EventListener, ImageObserver, MenuContainer, Serializable

public class GLaDOSConfigPanel
extends JPanel
implements ActionListener

Constructor Summary	Page	
GLaDOSConfigPanel()		

Method Summary	Page	
void	actionPerformed(ActionEvent ae)		
Constructor Detail
GLaDOSConfigPanel
public GLaDOSConfigPanel()
Method Detail
actionPerformed
public void actionPerformed(ActionEvent ae)
Specified by:
actionPerformed in interface ActionListener

Class GLaDOSFrame
edu.wpi.ari.glados.gui
java.lang.Object
  java.awt.Component
      java.awt.Container
          java.awt.Window
              java.awt.Frame
                  javax.swing.JFrame
                      edu.wpi.ari.glados.gui.GLaDOSFrame
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, RootPaneContainer, Serializable, WindowConstants

public class GLaDOSFrame
extends JFrame

Constructor Summary	Page	
GLaDOSFrame(Dimension d)		
Constructor Detail
GLaDOSFrame
public GLaDOSFrame(Dimension d)

Class GLaDOSSplash
edu.wpi.ari.glados.gui
java.lang.Object
  java.awt.Component
      java.awt.Container
          java.awt.Window
              java.awt.Frame
                  edu.wpi.ari.glados.gui.GLaDOSSplash
All Implemented Interfaces:
Accessible, ChangeListener, EventListener, ImageObserver, MenuContainer, Serializable

public class GLaDOSSplash
extends Frame
implements ChangeListener

Constructor Summary	Page	
GLaDOSSplash(Runnable r)		

Method Summary	Page	
void	stateChanged(ChangeEvent arg0)		
Constructor Detail
GLaDOSSplash
public GLaDOSSplash(Runnable r)
Method Detail
stateChanged
public void stateChanged(ChangeEvent arg0)
Specified by:
stateChanged in interface ChangeListener

Class GLaDOSStatusBar
edu.wpi.ari.glados.gui
java.lang.Object
  java.awt.Component
      java.awt.Container
          javax.swing.JComponent
              javax.swing.JPanel
                  edu.wpi.ari.glados.gui.GLaDOSStatusBar
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable

public class GLaDOSStatusBar
extends JPanel

Method Summary	Page	
static GLaDOSStatusBar	getInstance()		
void	setStatusBar(String s)		
void	setStatusBar(JComponent c)		
Method Detail
getInstance
public static GLaDOSStatusBar getInstance()

setStatusBar
public void setStatusBar(JComponent c)

setStatusBar
public void setStatusBar(String s)

Class GUIManager
edu.wpi.ari.glados.gui
java.lang.Object
  edu.wpi.ari.glados.gui.GUIManager

public class GUIManager
extends Object

Constructor Summary	Page	
GUIManager(GDriver d, SLAMFrame sp)		

Method Summary	Page	
void	initGUI(Dimension d)		
Constructor Detail
GUIManager
public GUIManager(GDriver d,
                  SLAMFrame sp)
Method Detail
initGUI
public void initGUI(Dimension d)

Package edu.wpi.ari.glados.ins
Interface Summary	Page	
IINSObervable	 		
INSNetObserver	 		
INSObserver	Implementing classes will be given an update from the INS when the update is available		

Class Summary	Page	
INSManager	 		

Interface IINSObervable
edu.wpi.ari.glados.ins
All Known Implementing Classes:
INSManager

public interface IINSObervable
Author:
robertbreznak

Method Summary	Page	
void	addListener(INSObserver l)
Add an observer to be notified when an update occurs		
void	removeAll()
Remove all observers from the notification list		
void	removeListener(INSObserver l)
Remove an observer from the notification list		
Method Detail
addListener
void addListener(INSObserver l)
Add an observer to be notified when an update occurs

removeListener
void removeListener(INSObserver l)
Remove an observer from the notification list

removeAll
void removeAll()
Remove all observers from the notification list

Class INSManager
edu.wpi.ari.glados.ins
java.lang.Object
  edu.wpi.ari.glados.ins.INSManager
All Implemented Interfaces:
IINSObervable, INSNetObserver

public class INSManager
extends Object
implements IINSObervable, INSNetObserver

Constructor Summary	Page	
INSManager(String host, int port)
Default constructor		

Method Summary	Page	
void	addListener(INSObserver l)
Add an observer to be notified when an update occurs		
void	addNetListener(INSNetObserver l)
Add a network listener		
void	connect()
Connect to the INS host		
void	disconnect()
Disconnect from the INS host		
void	removeAll()
Remove all observers from the notification list		
void	removeListener(INSObserver l)
Remove an observer from the notification list		
void	removeNetListener(INSNetObserver l)
Remove the network listener		
void	setHost(String h)
Set the connection to a new host		
void	setPort(int p)
Set the port to connect on		
void	update(double timestep, double Ax, double Ay, double Az, double gyro)		
Constructor Detail
INSManager
public INSManager(String host,
                  int port)
Default constructor
Parameters:
host - the host to connect to
port - the port to connect on
Method Detail
setHost
public void setHost(String h)
Set the connection to a new host
Parameters:
h - the new host

setPort
public void setPort(int p)
Set the port to connect on
Parameters:
p - the new port

connect
public void connect()
Connect to the INS host

disconnect
public void disconnect()
Disconnect from the INS host

update
public void update(double timestep,
                   double Ax,
                   double Ay,
                   double Az,
                   double gyro)
Specified by:
update in interface INSNetObserver

addNetListener
public void addNetListener(INSNetObserver l)
Add a network listener

removeNetListener
public void removeNetListener(INSNetObserver l)
Remove the network listener

addListener
public void addListener(INSObserver l)
Description copied from interface: IINSObervable
Add an observer to be notified when an update occurs
Specified by:
addListener in interface IINSObervable

removeAll
public void removeAll()
Description copied from interface: IINSObervable
Remove all observers from the notification list
Specified by:
removeAll in interface IINSObervable

removeListener
public void removeListener(INSObserver l)
Description copied from interface: IINSObervable
Remove an observer from the notification list
Specified by:
removeListener in interface IINSObervable

Interface INSNetObserver
edu.wpi.ari.glados.ins
All Known Implementing Classes:
INSManager

public interface INSNetObserver

Method Summary	Page	
void	update(double timestep, double Ax, double Ay, double Az, double gyro)		
Method Detail
update
void update(double timestep,
            double Ax,
            double Ay,
            double Az,
            double gyro)

Interface INSObserver
edu.wpi.ari.glados.ins
All Known Implementing Classes:
GDriver, INSTest, Logger, SLAMFrame

public interface INSObserver
Implementing classes will be given an update from the INS when the update is available
Author:
robert breznak

Method Summary	Page	
void	INSReceivedValues(Vector3d step, double yaw)
Called when there is an INS update.		
Method Detail
INSReceivedValues
void INSReceivedValues(Vector3d step,
                       double yaw)
Called when there is an INS update. Contains the new location and velocity from 0,0 which is the previous position
Parameters:
yaw - - yaw of robot over last timestep in radians

Package edu.wpi.ari.glados.insserver
Class Summary	Page	
INSDataPacket	 		

Class INSDataPacket
edu.wpi.ari.glados.insserver
java.lang.Object
  edu.wpi.ari.glados.insserver.INSDataPacket
All Implemented Interfaces:
Serializable

public class INSDataPacket
extends Object
implements Serializable

Field Summary	Page	
double	Ax		
double	Ay		
double	Az		
double	gyro		
double	timestep		

Constructor Summary	Page	
INSDataPacket()		

Method Summary	Page	
String	toString()		
Field Detail
timestep
public double timestep

Ax
public double Ax

Ay
public double Ay

Az
public double Az

gyro
public double gyro
Constructor Detail
INSDataPacket
public INSDataPacket()
Method Detail
toString
public String toString()
Overrides:
toString in class Object

Package edu.wpi.ari.glados.logging
Class Summary	Page	
Logger	Core class for logging implementation Works as a singleton logger that stores all data used in logging.		

Class Logger
edu.wpi.ari.glados.logging
java.lang.Object
  java.awt.Component
      java.awt.Container
          java.awt.Window
              java.awt.Frame
                  javax.swing.JFrame
                      edu.wpi.ari.glados.logging.Logger
All Implemented Interfaces:
Accessible, ActionListener, EventListener, ImageObserver, INSObserver, ItemListener, MenuContainer, RootPaneContainer, Serializable, VisionObserver, WindowConstants

public class Logger
extends JFrame
implements INSObserver, VisionObserver, ActionListener, ItemListener
Core class for logging implementation Works as a singleton logger that stores all data used in logging. Produces a single text log file that can be saved and is actively viewed in a panel
Author:
Alex Cunningham

Method Summary	Page	
void	actionPerformed(ActionEvent e)
Handler for menu buttons		
static Logger	getLogger()
Basic Singleton class implementation		
void	INSReceivedValues(Vector3d step, double yaw)
Logs values from INS		
void	itemStateChanged(ItemEvent e)
Handler for check boxes in the menu		
void	logString(String s)
Adds a string to the rest of the log.		
static void	main(String[] args)
This is for testing only!!!!!		
void	VisionReceivedValues(Vector<Vector3d> points)
Logs values from Vision		
Method Detail
getLogger
public static Logger getLogger()
Basic Singleton class implementation

logString
public void logString(String s)
Adds a string to the rest of the log. Automatically appends the linebreak at the end This will force a message to appear

INSReceivedValues
public void INSReceivedValues(Vector3d step,
                              double yaw)
Logs values from INS
Specified by:
INSReceivedValues in interface INSObserver
Parameters:
yaw - - yaw of robot over last timestep in radians

VisionReceivedValues
public void VisionReceivedValues(Vector<Vector3d> points)
Logs values from Vision
Specified by:
VisionReceivedValues in interface VisionObserver

actionPerformed
public void actionPerformed(ActionEvent e)
Handler for menu buttons
Specified by:
actionPerformed in interface ActionListener

itemStateChanged
public void itemStateChanged(ItemEvent e)
Handler for check boxes in the menu
Specified by:
itemStateChanged in interface ItemListener

main
public static void main(String[] args)
This is for testing only!!!!!

Package edu.wpi.ari.glados.mplatform
Class Summary	Page	
MPlatformManager	Manages the mobile base		

Class MPlatformManager
edu.wpi.ari.glados.mplatform
java.lang.Object
  edu.wpi.ari.glados.mplatform.MPlatformManager

public class MPlatformManager
extends Object
Manages the mobile base
Author:
robertbreznak

Field Summary	Page	
protected String	host		
protected PrintWriter	outsock		
protected int	port		
protected Socket	server		

Constructor Summary	Page	
MPlatformManager(String host, int port)		

Method Summary	Page	
void	connect()		
void	disconnect()		
void	goBackward()		
void	goForward()		
void	goLeft()		
void	goRight()		
void	goStop()		
static void	main(String[] args)		
protected void	writeCommand(String command)		
Field Detail
host
protected String host

port
protected int port

server
protected Socket server

outsock
protected PrintWriter outsock
Constructor Detail
MPlatformManager
public MPlatformManager(String host,
                        int port)
Method Detail
connect
public void connect()
             throws UnknownHostException,
                    IOException
Throws:
UnknownHostException
IOException

disconnect
public void disconnect()

writeCommand
protected void writeCommand(String command)
                     throws IOException
Throws:
IOException

goForward
public void goForward()

goBackward
public void goBackward()

goLeft
public void goLeft()

goRight
public void goRight()

goStop
public void goStop()

main
public static void main(String[] args)

Package edu.wpi.ari.glados.network
Interface Summary	Page	
NetworkObserver	 		

Class Summary	Page	
SensorConnection	 		

Interface NetworkObserver
edu.wpi.ari.glados.network

public interface NetworkObserver

Class SensorConnection
edu.wpi.ari.glados.network
java.lang.Object
  java.lang.Thread
      edu.wpi.ari.glados.network.SensorConnection
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
VisionConnection

abstract public class SensorConnection
extends Thread

Constructor Summary	Page	
SensorConnection()		

Method Summary	Page	
void	connect()
Connect to the server		
void	disconnect()		
Socket	getConnection()		
String	getHost()		
int	getPort()		
void	setHost(String host)		
void	setPort(int port)		
Constructor Detail
SensorConnection
public SensorConnection()
Method Detail
connect
public void connect()
             throws UnknownHostException,
                    IOException
Connect to the server
Returns:
true if the connection was successful, false otherwise
Throws:
UnknownHostException
IOException

disconnect
public void disconnect()

getConnection
public Socket getConnection()

getHost
public String getHost()
Returns:
the host

setHost
public void setHost(String host)
Parameters:
host - the host to connect to

getPort
public int getPort()
Returns:
the port

setPort
public void setPort(int port)
Parameters:
port - the port to set

Package edu.wpi.ari.glados.slam
Interface Summary	Page	
Stim	Wrapper for controls and PointMaps		

Class Summary	Page	
Control	 		
Landmark	Dual-purpose structure for both global and local landmarks Contains a 3D point		
PointMap	Container class for landmarks that form a map of points This will eventually include a number of searching/sorting methods for more efficient searching structures		
Pose	 		
SLAMfile	Allows for loading and saving of a file log data		
SLAMFrame	Wrapper GUI element for the SLAM visualization Contains a full SLAM implementation, and needs to have data from the rest of the system Data assumed to come in at realtime speeds, and that timestamps can be taken when functions are called.		
SLAMVisColorScheme	Simple Container class for color schemes for the SLAM Visualization Module.		
SLAMVisPanel	Rendering panel for SLAM Module Major Update: Adding pan controls		

Class Control
edu.wpi.ari.glados.slam
java.lang.Object
  edu.wpi.ari.glados.slam.Control
All Implemented Interfaces:
Serializable, Stim

public class Control
extends Object
implements Stim, Serializable

Constructor Summary	Page	
Control()		
Control(double x, double y, double z, double dx, double dy, double dz)		

Method Summary	Page	
void	addControl(Control ctrl)		
Point3d	getControl()		
Jama.Matrix	getRot()		
double	getXRot()		
double	getYRot()		
double	getZRot()		
void	setControl(Point3d control)		
void	setRot(Jama.Matrix rot)		
String	toString()		
Constructor Detail
Control
public Control()

Control
public Control(double x,
               double y,
               double z,
               double dx,
               double dy,
               double dz)
Method Detail
toString
public String toString()
Overrides:
toString in class Object

getXRot
public double getXRot()

getYRot
public double getYRot()

getZRot
public double getZRot()

getControl
public Point3d getControl()

setControl
public void setControl(Point3d control)

getRot
public Jama.Matrix getRot()

setRot
public void setRot(Jama.Matrix rot)

addControl
public void addControl(Control ctrl)

Class Landmark
edu.wpi.ari.glados.slam
java.lang.Object
  edu.wpi.ari.glados.slam.Landmark
All Implemented Interfaces:
Serializable

public class Landmark
extends Object
implements Serializable
Dual-purpose structure for both global and local landmarks Contains a 3D point
Author:
Alex Cunningham

Constructor Summary	Page	
Landmark()		
Landmark(double x, double y, double z)		
Landmark(Point3d mean)		
Landmark(Vector3d mean)		

Method Summary	Page	
double	dist3D(Landmark landmark)		
boolean	equals(Landmark lm)		
boolean	equals(Landmark lm, double d)		
Jama.Matrix	getCov()		
Point3d	getMean()		
int	getScore()		
double	getX()		
double	getY()		
double	getZ()		
void	incScore()		
boolean	meanEqual(Landmark lm)		
static Landmark	randLandmark(double scale, double offset)		
void	scale(double scale)		
void	setCov(Jama.Matrix cov)		
void	setMean(Point3d mean)		
void	setScore(int score)		
void	setX(double x)		
void	setY(double y)		
void	setZ(double z)		
String	toString()		
Constructor Detail
Landmark
public Landmark()

Landmark
public Landmark(Point3d mean)

Landmark
public Landmark(Vector3d mean)

Landmark
public Landmark(double x,
                double y,
                double z)
Method Detail
randLandmark
public static Landmark randLandmark(double scale,
                                    double offset)

getMean
public Point3d getMean()

setMean
public void setMean(Point3d mean)

getCov
public Jama.Matrix getCov()

setCov
public void setCov(Jama.Matrix cov)

dist3D
public double dist3D(Landmark landmark)

toString
public String toString()
Overrides:
toString in class Object

meanEqual
public boolean meanEqual(Landmark lm)

getX
public double getX()

getY
public double getY()

getZ
public double getZ()

setX
public void setX(double x)

setY
public void setY(double y)

setZ
public void setZ(double z)

getScore
public int getScore()

setScore
public void setScore(int score)

incScore
public void incScore()

equals
public boolean equals(Landmark lm)

equals
public boolean equals(Landmark lm,
                      double d)

scale
public void scale(double scale)

Class PointMap
edu.wpi.ari.glados.slam
java.lang.Object
  edu.wpi.ari.glados.slam.PointMap
All Implemented Interfaces:
Serializable, Stim

public class PointMap
extends Object
implements Stim, Serializable
Container class for landmarks that form a map of points This will eventually include a number of searching/sorting methods for more efficient searching structures
Author:
Alex Cunningham

Constructor Summary	Page	
PointMap()		

Method Summary	Page	
void	addLandmark(Landmark lm)		
void	addLandmarks(Vector<Landmark> lms)		
void	addMap(PointMap map)		
void	clearLandmarks()		
Landmark	getLandmark(int id)		
Vector<Landmark>	getLandmarks()		
int	getNumLandmarks()		
void	rmLandmark(Landmark lm)		
void	scale(double scale)		
void	setLandmarks(Vector<Landmark> landmarks)		
String	toString()		
Constructor Detail
PointMap
public PointMap()
Method Detail
getNumLandmarks
public int getNumLandmarks()

addLandmark
public void addLandmark(Landmark lm)

addLandmarks
public void addLandmarks(Vector<Landmark> lms)

getLandmark
public Landmark getLandmark(int id)

rmLandmark
public void rmLandmark(Landmark lm)

clearLandmarks
public void clearLandmarks()

getLandmarks
public Vector<Landmark> getLandmarks()

setLandmarks
public void setLandmarks(Vector<Landmark> landmarks)

addMap
public void addMap(PointMap map)

toString
public String toString()
Overrides:
toString in class Object

scale
public void scale(double scale)

Class Pose
edu.wpi.ari.glados.slam
java.lang.Object
  edu.wpi.ari.glados.slam.Pose

public class Pose
extends Object

Constructor Summary	Page	
Pose()
Creates a generic pose located at the origin		
Pose(double x, double y, double z, double x_rot, double y_rot, double z_rot)		

Method Summary	Page	
void	addControl(Control control)		
static Pose	clone(Pose p)		
boolean	equals(Pose pose)		
Point3d	getLinPose()		
Jama.Matrix	getRotPose()		
double	getX()		
double	getXRot()		
double	getY()		
double	getYRot()		
double	getZ()		
double	getZRot()		
void	scale(double scale)		
void	setLinPose(Point3d linPose)		
void	setRotPose(Jama.Matrix rotPose)		
String	toString()		
Constructor Detail
Pose
public Pose()
Creates a generic pose located at the origin

Pose
public Pose(double x,
            double y,
            double z,
            double x_rot,
            double y_rot,
            double z_rot)
Method Detail
clone
public static Pose clone(Pose p)

addControl
public void addControl(Control control)

toString
public String toString()
Overrides:
toString in class Object

getXRot
public double getXRot()

getYRot
public double getYRot()

getZRot
public double getZRot()

getX
public double getX()

getY
public double getY()

getZ
public double getZ()

getLinPose
public Point3d getLinPose()

setLinPose
public void setLinPose(Point3d linPose)

getRotPose
public Jama.Matrix getRotPose()

setRotPose
public void setRotPose(Jama.Matrix rotPose)

equals
public boolean equals(Pose pose)

scale
public void scale(double scale)

Class SLAMfile
edu.wpi.ari.glados.slam
java.lang.Object
  edu.wpi.ari.glados.slam.SLAMfile
All Implemented Interfaces:
Serializable

public class SLAMfile
extends Object
implements Serializable
Allows for loading and saving of a file log data
Author:
Alex Cunningham

Field Summary	Page	
protected Vector<Stim>	data		

Constructor Summary	Page	
SLAMfile()		

Method Summary	Page	
void	addStim(Stim stim)		
void	clear()		
int	getNumStims()		
Stim	getStim(int i)		
static SLAMfile	openLog(String filename, JFrame frame)		
static void	saveLog(SLAMfile slam, File file, SLAMFrame frame)		
Field Detail
data
protected Vector<Stim> data
Constructor Detail
SLAMfile
public SLAMfile()
Method Detail
addStim
public void addStim(Stim stim)

clear
public void clear()

getStim
public Stim getStim(int i)

getNumStims
public int getNumStims()

saveLog
public static void saveLog(SLAMfile slam,
                           File file,
                           SLAMFrame frame)

openLog
public static SLAMfile openLog(String filename,
                               JFrame frame)

Class SLAMFrame
edu.wpi.ari.glados.slam
java.lang.Object
  java.awt.Component
      java.awt.Container
          java.awt.Window
              java.awt.Frame
                  javax.swing.JFrame
                      edu.wpi.ari.glados.slam.SLAMFrame
All Implemented Interfaces:
Accessible, ConsoleOutput, ImageObserver, INSObserver, MenuContainer, RootPaneContainer, Serializable, VisionObserver, WindowConstants

public class SLAMFrame
extends JFrame
implements INSObserver, VisionObserver, ConsoleOutput
Wrapper GUI element for the SLAM visualization Contains a full SLAM implementation, and needs to have data from the rest of the system Data assumed to come in at realtime speeds, and that timestamps can be taken when functions are called.
Author:
Alex Cunningham

Constructor Summary	Page	
SLAMFrame()
Basic constructor, loads with defaults		

Method Summary	Page	
void	clearDataLog()		
void	fixCoordDialog()		
void	INSReceivedValues(Vector3d step, double yaw)
Handles calls by INS Manager		
static void	main(String[] args)
Basic Testing function		
void	printToConsole(String str)
Helper Functions		
void	replaceConsoleText(String str)		
void	saveDataLog()		
void	setScaleDialog()		
void	updateControl(Control ctrl)
Adds a new control to the particle for processing This will not do a full SLAM processing run, just update the current predicted pose		
void	updateView()
Refreshes everything with no changes		
void	updateVision(PointMap map)
Adds a new set of local landmarks to the particle This will actually start full SLAM processing		
void	VisionReceivedValues(Vector<Vector3d> points)
Handles calls by Vision Manager		
Constructor Detail
SLAMFrame
public SLAMFrame()
Basic constructor, loads with defaults
Method Detail
INSReceivedValues
public void INSReceivedValues(Vector3d step,
                              double yaw)
Handles calls by INS Manager
Specified by:
INSReceivedValues in interface INSObserver
Parameters:
step - 3D translational change since last timestep in meters
yaw - rotation around z axis since last time step in radians

VisionReceivedValues
public void VisionReceivedValues(Vector<Vector3d> points)
Handles calls by Vision Manager
Specified by:
VisionReceivedValues in interface VisionObserver
Parameters:
points - set of visible points determined by vision

updateView
public void updateView()
Refreshes everything with no changes

updateControl
public void updateControl(Control ctrl)
Adds a new control to the particle for processing This will not do a full SLAM processing run, just update the current predicted pose

updateVision
public void updateVision(PointMap map)
Adds a new set of local landmarks to the particle This will actually start full SLAM processing

clearDataLog
public void clearDataLog()

saveDataLog
public void saveDataLog()

printToConsole
public void printToConsole(String str)
Helper Functions
Specified by:
printToConsole in interface ConsoleOutput

replaceConsoleText
public void replaceConsoleText(String str)

main
public static void main(String[] args)
Basic Testing function

fixCoordDialog
public void fixCoordDialog()

setScaleDialog
public void setScaleDialog()

Class SLAMVisColorScheme
edu.wpi.ari.glados.slam
java.lang.Object
  edu.wpi.ari.glados.slam.SLAMVisColorScheme

public class SLAMVisColorScheme
extends Object
Simple Container class for color schemes for the SLAM Visualization Module. Provides configuration and defaults.
Author:
Alex Cunningham

Constructor Summary	Page	
SLAMVisColorScheme()		

Method Summary	Page	
boolean	equals(SLAMVisColorScheme sl)		
Color	getAxis_lines()		
Color	getBkgnd()		
Color	getCur_pose()		
Color	getLandmarks()		
Color	getPast_poses()		
static SLAMVisColorScheme	getPrintDefault()
Return a print-capable color scheme		
static SLAMVisColorScheme	getScreenDefault()
Return a default color scheme for screen purposes Uses dark backgrounds which are unsuitable for text		
Color	getText()		
void	setAxis_lines(Color axis_lines)		
void	setBkgnd(Color bkgnd)		
void	setCur_pose(Color cur_pose)		
void	setLandmarks(Color landmarks)		
void	setPast_poses(Color past_poses)		
void	setText(Color text)		
Constructor Detail
SLAMVisColorScheme
public SLAMVisColorScheme()
Method Detail
getScreenDefault
public static SLAMVisColorScheme getScreenDefault()
Return a default color scheme for screen purposes Uses dark backgrounds which are unsuitable for text

getPrintDefault
public static SLAMVisColorScheme getPrintDefault()
Return a print-capable color scheme

getBkgnd
public Color getBkgnd()

setBkgnd
public void setBkgnd(Color bkgnd)

getAxis_lines
public Color getAxis_lines()

setAxis_lines
public void setAxis_lines(Color axis_lines)

getPast_poses
public Color getPast_poses()

setPast_poses
public void setPast_poses(Color past_poses)

getCur_pose
public Color getCur_pose()

setCur_pose
public void setCur_pose(Color cur_pose)

getLandmarks
public Color getLandmarks()

setLandmarks
public void setLandmarks(Color landmarks)

getText
public Color getText()

setText
public void setText(Color text)

equals
public boolean equals(SLAMVisColorScheme sl)

Class SLAMVisPanel
edu.wpi.ari.glados.slam
java.lang.Object
  java.awt.Component
      java.awt.Container
          javax.swing.JComponent
              javax.swing.JPanel
                  edu.wpi.ari.glados.slam.SLAMVisPanel
All Implemented Interfaces:
Accessible, EventListener, ImageObserver, MenuContainer, MouseListener, MouseMotionListener, Serializable

public class SLAMVisPanel
extends JPanel
implements MouseMotionListener, MouseListener
Rendering panel for SLAM Module Major Update: Adding pan controls
Author:
Alex Cunningham

Constructor Summary	Page	
SLAMVisPanel()		
SLAMVisPanel(Particle p)
Primary Constructor - needs to have a particle in order to have information to render		

Method Summary	Page	
void	init()		
static void	main(String[] args)
Test version of		
void	mouseClicked(MouseEvent e)
Centers the screen on the location of the point Popup trigger toggles color scheme		
void	mouseDragged(MouseEvent e)
Performs panning operation - does nothing		
void	mouseEntered(MouseEvent e)		
void	mouseExited(MouseEvent e)		
void	mouseMoved(MouseEvent e)
Tracks the position of the mouse		
void	mousePressed(MouseEvent e)		
void	mouseReleased(MouseEvent e)		
void	paint(Graphics g)		
double	pixel2globalX(int x)
Converts a pixel position into a global coordinate position		
double	pixel2globalY(int y)
Converts a pixel position into a global coordinate		
int	scaleX(double x)
Scales an x coordinate to get pixel size		
int	scaleY(double y)
Scales a y coordinate to get pixel size.		
void	setCenter(double x, double y)		
int	transformX(double global)
Converts an x coordinate from a global (double) representation to a pixel location that can be rendered.		
int	transformY(double global)
Converts an y coordinate from a global (double) representation to a pixel location that can be rendered.		
Constructor Detail
SLAMVisPanel
public SLAMVisPanel(Particle p)
Primary Constructor - needs to have a particle in order to have information to render

SLAMVisPanel
public SLAMVisPanel()
Method Detail
init
public void init()

paint
public void paint(Graphics g)
Overrides:
paint in class JComponent

mouseMoved
public void mouseMoved(MouseEvent e)
Tracks the position of the mouse
Specified by:
mouseMoved in interface MouseMotionListener

mouseDragged
public void mouseDragged(MouseEvent e)
Performs panning operation - does nothing
Specified by:
mouseDragged in interface MouseMotionListener

mouseClicked
public void mouseClicked(MouseEvent e)
Centers the screen on the location of the point Popup trigger toggles color scheme
Specified by:
mouseClicked in interface MouseListener

mouseEntered
public void mouseEntered(MouseEvent e)
Specified by:
mouseEntered in interface MouseListener

mouseExited
public void mouseExited(MouseEvent e)
Specified by:
mouseExited in interface MouseListener

mousePressed
public void mousePressed(MouseEvent e)
Specified by:
mousePressed in interface MouseListener

mouseReleased
public void mouseReleased(MouseEvent e)
Specified by:
mouseReleased in interface MouseListener

scaleX
public int scaleX(double x)
Scales an x coordinate to get pixel size
Parameters:
x - global x coordinate to scale
Returns:
a pixel position using the zoom factors

scaleY
public int scaleY(double y)
Scales a y coordinate to get pixel size. Inverts to handle change system change
Parameters:
y - global y coordinate to scale
Returns:
a pixel position using zoom factors

pixel2globalX
public double pixel2globalX(int x)
Converts a pixel position into a global coordinate position

pixel2globalY
public double pixel2globalY(int y)
Converts a pixel position into a global coordinate

transformX
public int transformX(double global)
Converts an x coordinate from a global (double) representation to a pixel location that can be rendered. This needs to be used immediately in the redraw process as this method is dependent on the center, scaling factors and size of panel NOTE: returns -1 if out of range
Parameters:
global - X coordinate in real space
Returns:
x coordinate in pixels ready for mapping

transformY
public int transformY(double global)
Converts an y coordinate from a global (double) representation to a pixel location that can be rendered. This needs to be used immediately in the redraw process as this method is dependent on the center, scaling factors and size of panel NOTE: returns -1 if out of range
Parameters:
global - Y coordinate in real space
Returns:
y coordinate in pixels ready for mapping

setCenter
public void setCenter(double x,
                      double y)

main
public static void main(String[] args)
Test version of

Interface Stim
edu.wpi.ari.glados.slam
All Known Implementing Classes:
Control, PointMap

public interface Stim
Wrapper for controls and PointMaps
Author:
Alex Cunningham

Package edu.wpi.ari.glados.slam.particle
Class Summary	Page	
Particle	 		

Enum Summary	Page	
Particle.da_type	 		
Particle.proc_type	 		

Class Particle
edu.wpi.ari.glados.slam.particle
java.lang.Object
  edu.wpi.ari.glados.slam.particle.Particle

public class Particle
extends Object
Author:
Alex Cunningham Basic element of a particle filter, stores the map and robot pose, as well as uncertainty measurements and other related tag information

Nested Class Summary	Page	
static enum	Particle.da_type		
static enum	Particle.proc_type		

Field Summary	Page	
protected PointMap	map
Map to generate		
protected Vector<Pose>	path
Path of robot prior to the current time step		
protected Pose	pose
Current pose of robot		

Constructor Summary	Page	
Particle()
Configures the particle with defaults: DA_THRESH = 0.5m DA Type = SIMPLE Processing Type = BASIC		

Method Summary	Page	
void	addControl(Control ctrl)
Adds a new control to the particle Note: this does not execute any real processing, only adds the odometry data to the running tally		
void	addVision(PointMap map)
Adds a new vision set to the particle, and performs full SLAM algorithm.		
void	clear()		
protected PointMap	data_associate(PointMap globals)		
PointMap	data_associate_simple(PointMap globals)		
PointMap	getMap()		
Vector<Pose>	getPath()		
Pose	getPose()		
static Landmark	global2local(Pose pose, Landmark global)
Calculates the local position of a landmark based on a pose and a global landmark Primarily used for generating data		
static Pose	lms2Pose(Landmark global, Landmark local)
Calculates a pose based on a local and a global landmark, used for backsolving the pose of the robot from known landmark positions.		
static Landmark	local2Global(Pose pose, Landmark local)
Takes a given position and a local landmark and transforms the local landmark into a global landmark		
void	process(Control ctrl, PointMap map)
Switches between processing implementations, this is simply a wrapper for other processing functions, based on the parameter set process type		
protected void	process_basic(Control ctrl, PointMap map)		
protected void	process_kalman(Control ctrl, PointMap map)		
void	processStim(Stim s)
Adds a generic stim to the particle, with full processing only if necessary.		
void	setConsoleOutput(ConsoleOutput out)		
void	setMap(PointMap map)		
void	setPath(Vector<Pose> path)		
void	setPose(Pose pose)		
String	toString()		
Field Detail
pose
protected Pose pose
Current pose of robot

map
protected PointMap map
Map to generate

path
protected Vector<Pose> path
Path of robot prior to the current time step
Constructor Detail
Particle
public Particle()
Configures the particle with defaults: DA_THRESH = 0.5m DA Type = SIMPLE Processing Type = BASIC
Method Detail
processStim
public void processStim(Stim s)
Adds a generic stim to the particle, with full processing only if necessary. Also performs coordinate switching and scaling
Parameters:
s - - a generic Stim that needs to be identified and processing occurs if it is possible

addControl
public void addControl(Control ctrl)
Adds a new control to the particle Note: this does not execute any real processing, only adds the odometry data to the running tally
Parameters:
ctrl - Control to add to the particle

addVision
public void addVision(PointMap map)
Adds a new vision set to the particle, and performs full SLAM algorithm.

process
public void process(Control ctrl,
                    PointMap map)
Switches between processing implementations, this is simply a wrapper for other processing functions, based on the parameter set process type

process_basic
protected void process_basic(Control ctrl,
                             PointMap map)

process_kalman
protected void process_kalman(Control ctrl,
                              PointMap map)

data_associate
protected PointMap data_associate(PointMap globals)

data_associate_simple
public PointMap data_associate_simple(PointMap globals)

local2Global
public static Landmark local2Global(Pose pose,
                                    Landmark local)
Takes a given position and a local landmark and transforms the local landmark into a global landmark
Returns:
global landmark

lms2Pose
public static Pose lms2Pose(Landmark global,
                            Landmark local)
Calculates a pose based on a local and a global landmark, used for backsolving the pose of the robot from known landmark positions. Global position comes from subtracting the local vector from the global landmark vector. Angles cannot be calculated from this transform
Parameters:
global - - global landmark
local - - local landmark

global2local
public static Landmark global2local(Pose pose,
                                    Landmark global)
Calculates the local position of a landmark based on a pose and a global landmark Primarily used for generating data

toString
public String toString()
Overrides:
toString in class Object

setPose
public void setPose(Pose pose)

getPose
public Pose getPose()

setMap
public void setMap(PointMap map)

getMap
public PointMap getMap()

getPath
public Vector<Pose> getPath()

setPath
public void setPath(Vector<Pose> path)

clear
public void clear()

setConsoleOutput
public void setConsoleOutput(ConsoleOutput out)

Enum Particle.da_type
edu.wpi.ari.glados.slam.particle
java.lang.Object
  java.lang.Enum<Particle.da_type>
      edu.wpi.ari.glados.slam.particle.Particle.da_type
All Implemented Interfaces:
Comparable<Particle.da_type>, Serializable
Enclosing class:
Particle

public static enum Particle.da_type
extends Enum<Particle.da_type>

Enum Constant Summary	Page	
ML		
SIMPLE		

Method Summary	Page	
static Particle.da_type	valueOf(String name)		
static Particle.da_type[]	values()		
Enum Constant Detail
SIMPLE
public static final Particle.da_type SIMPLE

ML
public static final Particle.da_type ML
Method Detail
values
public static Particle.da_type[] values()

valueOf
public static Particle.da_type valueOf(String name)

Enum Particle.proc_type
edu.wpi.ari.glados.slam.particle
java.lang.Object
  java.lang.Enum<Particle.proc_type>
      edu.wpi.ari.glados.slam.particle.Particle.proc_type
All Implemented Interfaces:
Comparable<Particle.proc_type>, Serializable
Enclosing class:
Particle

public static enum Particle.proc_type
extends Enum<Particle.proc_type>

Enum Constant Summary	Page	
BASIC		
KALMAN		

Method Summary	Page	
static Particle.proc_type	valueOf(String name)		
static Particle.proc_type[]	values()		
Enum Constant Detail
BASIC
public static final Particle.proc_type BASIC

KALMAN
public static final Particle.proc_type KALMAN
Method Detail
values
public static Particle.proc_type[] values()

valueOf
public static Particle.proc_type valueOf(String name)

Package edu.wpi.ari.glados.slam.slamIDE
Interface Summary	Page	
ConsoleOutput	These functions have a console to which text can be printed out		

Class Summary	Page	
FixCoords	Singleton Class that acts as a filter for landmarks to switch coordinate systems around.		
IDEDriver	 		
IDEFrame	This is the main app for offline playback of slam datalogs.		
ParticleConfig	 		
PlaybackControls	Handles the playback of the datalog files, as well as providing the GUI implementation.		
ScaleFilter	Singleton Filter Module that scales the inputs, and has a dialog box for user input		

Interface ConsoleOutput
edu.wpi.ari.glados.slam.slamIDE
All Known Implementing Classes:
IDEFrame, SLAMFrame

public interface ConsoleOutput
These functions have a console to which text can be printed out
Author:
Alex Cunningham

Method Summary	Page	
void	printToConsole(String s)
Appends the string to the end of the console's output		
Method Detail
printToConsole
void printToConsole(String s)
Appends the string to the end of the console's output

Class FixCoords
edu.wpi.ari.glados.slam.slamIDE
java.lang.Object
  java.awt.Component
      java.awt.Container
          java.awt.Window
              java.awt.Frame
                  javax.swing.JFrame
                      edu.wpi.ari.glados.slam.slamIDE.FixCoords
All Implemented Interfaces:
Accessible, ActionListener, EventListener, ImageObserver, MenuContainer, RootPaneContainer, Serializable, WindowConstants

public class FixCoords
extends JFrame
implements ActionListener
Singleton Class that acts as a filter for landmarks to switch coordinate systems around.
Author:
Alex Cunningham

Method Summary	Page	
void	actionPerformed(ActionEvent e)		
void	filter(Landmark lm)		
void	filter(PointMap m)		
static FixCoords	getFixCoords()		
void	showFixCoordsDialog()		
Method Detail
getFixCoords
public static FixCoords getFixCoords()

showFixCoordsDialog
public void showFixCoordsDialog()

actionPerformed
public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener

filter
public void filter(Landmark lm)

filter
public void filter(PointMap m)

Class IDEDriver
edu.wpi.ari.glados.slam.slamIDE
java.lang.Object
  edu.wpi.ari.glados.slam.slamIDE.IDEDriver

public class IDEDriver
extends Object

Constructor Summary	Page	
IDEDriver()		

Method Summary	Page	
static void	main(String[] args)		
Constructor Detail
IDEDriver
public IDEDriver()
Method Detail
main
public static void main(String[] args)

Class IDEFrame
edu.wpi.ari.glados.slam.slamIDE
java.lang.Object
  java.awt.Component
      java.awt.Container
          java.awt.Window
              java.awt.Frame
                  javax.swing.JFrame
                      edu.wpi.ari.glados.slam.slamIDE.IDEFrame
All Implemented Interfaces:
Accessible, ActionListener, ConsoleOutput, EventListener, ImageObserver, MenuContainer, RootPaneContainer, Serializable, WindowConstants

public class IDEFrame
extends JFrame
implements ActionListener, ConsoleOutput
This is the main app for offline playback of slam datalogs. It includes a standard visualization panel, a console log, and a configuration panel for various parts of the system.
Author:
Alex Cunningham

Constructor Summary	Page	
IDEFrame()		

Method Summary	Page	
void	actionPerformed(ActionEvent e)		
Vector<Stim>	getCurLog()		
Particle	getParticle()		
SLAMVisPanel	getSlamvis()		
void	printToConsole(String s)
Writes to the console by appending		
void	setCurLog(Vector<Stim> curLog)		
void	updateParticle(Particle p)		
Constructor Detail
IDEFrame
public IDEFrame()
Method Detail
actionPerformed
public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener

printToConsole
public void printToConsole(String s)
Writes to the console by appending
Specified by:
printToConsole in interface ConsoleOutput

getSlamvis
public SLAMVisPanel getSlamvis()

getParticle
public Particle getParticle()

updateParticle
public void updateParticle(Particle p)

getCurLog
public Vector<Stim> getCurLog()

setCurLog
public void setCurLog(Vector<Stim> curLog)

Class ParticleConfig
edu.wpi.ari.glados.slam.slamIDE
java.lang.Object
  java.awt.Component
      java.awt.Container
          java.awt.Panel
              edu.wpi.ari.glados.slam.slamIDE.ParticleConfig
All Implemented Interfaces:
Accessible, ActionListener, EventListener, ImageObserver, MenuContainer, Serializable

public class ParticleConfig
extends Panel
implements ActionListener

Constructor Summary	Page	
ParticleConfig(IDEFrame frame)		

Method Summary	Page	
void	actionPerformed(ActionEvent arg0)		
Constructor Detail
ParticleConfig
public ParticleConfig(IDEFrame frame)
Method Detail
actionPerformed
public void actionPerformed(ActionEvent arg0)
Specified by:
actionPerformed in interface ActionListener

Class PlaybackControls
edu.wpi.ari.glados.slam.slamIDE
java.lang.Object
  java.awt.Component
      java.awt.Container
          javax.swing.JComponent
              javax.swing.JPanel
                  edu.wpi.ari.glados.slam.slamIDE.PlaybackControls
All Implemented Interfaces:
Accessible, ActionListener, EventListener, ImageObserver, MenuContainer, Serializable

public class PlaybackControls
extends JPanel
implements ActionListener
Handles the playback of the datalog files, as well as providing the GUI implementation.
Author:
Alex Cunningham

Constructor Summary	Page	
PlaybackControls(IDEFrame frame)		

Method Summary	Page	
void	actionPerformed(ActionEvent e)		
Vector<Stim>	getData()		
void	logReport()
Writes information about the datalog to the report window.		
void	setData(Vector<Stim> input)		
Constructor Detail
PlaybackControls
public PlaybackControls(IDEFrame frame)
Method Detail
actionPerformed
public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener

logReport
public void logReport()
Writes information about the datalog to the report window. This function generates stats on the

setData
public void setData(Vector<Stim> input)

getData
public Vector<Stim> getData()

Class ScaleFilter
edu.wpi.ari.glados.slam.slamIDE
java.lang.Object
  java.awt.Component
      java.awt.Container
          java.awt.Window
              java.awt.Frame
                  javax.swing.JFrame
                      edu.wpi.ari.glados.slam.slamIDE.ScaleFilter
All Implemented Interfaces:
Accessible, ActionListener, EventListener, ImageObserver, MenuContainer, RootPaneContainer, Serializable, WindowConstants

public class ScaleFilter
extends JFrame
implements ActionListener
Singleton Filter Module that scales the inputs, and has a dialog box for user input
Author:
Alex Cunningham

Method Summary	Page	
void	actionPerformed(ActionEvent e)		
void	filter(Control c)		
void	filter(Landmark lm)		
void	filter(PointMap map)		
double	getCtrlScale()		
double	getLmScale()		
static ScaleFilter	getScaleFilter()		
void	setCtrlScale(double ctrlScale)		
void	setLmScale(double lmScale)		
void	showDialog()		
Method Detail
showDialog
public void showDialog()

getScaleFilter
public static ScaleFilter getScaleFilter()

actionPerformed
public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener

getLmScale
public double getLmScale()

setLmScale
public void setLmScale(double lmScale)

getCtrlScale
public double getCtrlScale()

setCtrlScale
public void setCtrlScale(double ctrlScale)

filter
public void filter(Landmark lm)

filter
public void filter(PointMap map)

filter
public void filter(Control c)

Package edu.wpi.ari.glados.test
Class Summary	Page	
GGDriver	 		
INSTest	 		
VisionTest	 		

Class GGDriver
edu.wpi.ari.glados.test
java.lang.Object
  java.awt.Component
      java.awt.Container
          java.awt.Window
              java.awt.Frame
                  javax.swing.JFrame
                      edu.wpi.ari.glados.test.GGDriver
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, RootPaneContainer, Serializable, VisionObserver, WindowConstants

public class GGDriver
extends JFrame
implements VisionObserver

Constructor Summary	Page	
GGDriver()		

Method Summary	Page	
void	init()		
static void	main(String[] args)		
void	VisionReceivedValues(Vector<Vector3d> points)
Called when there is an INS update.		
Constructor Detail
GGDriver
public GGDriver()
Method Detail
main
public static void main(String[] args)

init
public void init()

VisionReceivedValues
public void VisionReceivedValues(Vector<Vector3d> points)
Description copied from interface: VisionObserver
Called when there is an INS update. Contains the new location and velocity from 0,0 which is the previous position
Specified by:
VisionReceivedValues in interface VisionObserver

Class INSTest
edu.wpi.ari.glados.test
java.lang.Object
  java.awt.Component
      java.awt.Container
          java.awt.Window
              java.awt.Frame
                  javax.swing.JFrame
                      edu.wpi.ari.glados.test.INSTest
All Implemented Interfaces:
Accessible, ImageObserver, INSObserver, MenuContainer, RootPaneContainer, Serializable, WindowConstants

public class INSTest
extends JFrame
implements INSObserver

Constructor Summary	Page	
INSTest()		

Method Summary	Page	
void	init()		
void	INSReceivedValues(Vector3d step, double yaw)
Called when there is an INS update.		
static void	main(String[] args)		
void	VisionReceivedValues(Vector<Vector3d> points)		
Constructor Detail
INSTest
public INSTest()
Method Detail
main
public static void main(String[] args)

init
public void init()

VisionReceivedValues
public void VisionReceivedValues(Vector<Vector3d> points)

INSReceivedValues
public void INSReceivedValues(Vector3d step,
                              double yaw)
Description copied from interface: INSObserver
Called when there is an INS update. Contains the new location and velocity from 0,0 which is the previous position
Specified by:
INSReceivedValues in interface INSObserver
Parameters:
yaw - - yaw of robot over last timestep in radians

Class VisionTest
edu.wpi.ari.glados.test
java.lang.Object
  java.awt.Component
      java.awt.Container
          java.awt.Window
              java.awt.Frame
                  javax.swing.JFrame
                      edu.wpi.ari.glados.test.VisionTest
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, RootPaneContainer, Serializable, VisionObserver, WindowConstants

public class VisionTest
extends JFrame
implements VisionObserver

Constructor Summary	Page	
VisionTest()		

Method Summary	Page	
void	init()		
static void	main(String[] args)		
void	VisionReceivedValues(Vector<Vector3d> points)
Called when there is an INS update.		
Constructor Detail
VisionTest
public VisionTest()
Method Detail
main
public static void main(String[] args)

init
public void init()

VisionReceivedValues
public void VisionReceivedValues(Vector<Vector3d> points)
Description copied from interface: VisionObserver
Called when there is an INS update. Contains the new location and velocity from 0,0 which is the previous position
Specified by:
VisionReceivedValues in interface VisionObserver

Package edu.wpi.ari.glados.vision
Interface Summary	Page	
VisionObserver	Implementing classes will be given an update from the INS when the update is available		

Class Summary	Page	
ImageCanvas	 		
VisionConnection	 		
VisionManager	A manager for managing the vision system.		

Class ImageCanvas
edu.wpi.ari.glados.vision
java.lang.Object
  java.awt.Component
      java.awt.Canvas
          edu.wpi.ari.glados.vision.ImageCanvas
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable

public class ImageCanvas
extends Canvas

Constructor Summary	Page	
ImageCanvas(String s, int i, int j, int k, int l)		

Method Summary	Page	
void	connect()		
void	couldNotConnect()		
void	disconnect()		
BufferedImage	getBufferedImage()		
double	getFPS()		
Dimension	getPreferredSize()		
void	paint(Graphics g)		
void	setConnected(int i)		
int	setImage(Image image)		
void	setImageSize(Dimension dimension)		
void	setMainWindow(Frame frame)		
void	update(Graphics g)		
void	wait(int i)		
Constructor Detail
ImageCanvas
public ImageCanvas(String s,
                   int i,
                   int j,
                   int k,
                   int l)
Method Detail
connect
public void connect()

getPreferredSize
public Dimension getPreferredSize()
Overrides:
getPreferredSize in class Component

getFPS
public double getFPS()

setMainWindow
public void setMainWindow(Frame frame)

setImageSize
public void setImageSize(Dimension dimension)

setImage
public int setImage(Image image)

couldNotConnect
public void couldNotConnect()

setConnected
public void setConnected(int i)

wait
public void wait(int i)

disconnect
public void disconnect()

paint
public void paint(Graphics g)
Overrides:
paint in class Canvas

update
public void update(Graphics g)
Overrides:
update in class Canvas

getBufferedImage
public BufferedImage getBufferedImage()

Class VisionConnection
edu.wpi.ari.glados.vision
java.lang.Object
  java.lang.Thread
      edu.wpi.ari.glados.network.SensorConnection
          edu.wpi.ari.glados.vision.VisionConnection
All Implemented Interfaces:
Runnable

public class VisionConnection
extends SensorConnection

Constructor Summary	Page	
VisionConnection(String host, int port, double fps, ImageCanvas imagecanvas)
Create a ImageDownload that will connect to host on port and will set the maximum frames per second to fps with the image canvis as the primary display		

Method Summary	Page	
void	disconnect()
Disconnects from the camera server		
BufferedImage	getImage()
Returns the last captured image		
double	getMaxFPS()
Get the maximum capture rate		
boolean	isConnected()
Returns the status of the connection to the camera server		
void	run()
Starts capturing images from the camera server at the set fps rate		
void	setMaxFPS(double d)
Set the maximum capture rate		

Methods inherited from class edu.wpi.ari.glados.network.SensorConnection	
connect, getConnection, getHost, getPort, setHost, setPort	
Constructor Detail
VisionConnection
public VisionConnection(String host,
                        int port,
                        double fps,
                        ImageCanvas imagecanvas)
Create a ImageDownload that will connect to host on port and will set the maximum frames per second to fps with the image canvis as the primary display
Parameters:
fps - the maximum rate of image capture
imagecanvas - the canvis to display the image on
Method Detail
setMaxFPS
public void setMaxFPS(double d)
Set the maximum capture rate

getMaxFPS
public double getMaxFPS()
Get the maximum capture rate

getImage
public BufferedImage getImage()
Returns the last captured image

disconnect
public void disconnect()
Disconnects from the camera server
Overrides:
disconnect in class SensorConnection

isConnected
public boolean isConnected()
Returns the status of the connection to the camera server
Returns:
true if the connection was successful, false otherwise

run
public void run()
Starts capturing images from the camera server at the set fps rate
Specified by:
run in interface Runnable
Overrides:
run in class Thread

Class VisionManager
edu.wpi.ari.glados.vision
java.lang.Object
  java.lang.Thread
      edu.wpi.ari.glados.vision.VisionManager
All Implemented Interfaces:
Runnable

public class VisionManager
extends Thread
A manager for managing the vision system. Handles the main loop of the vision system, calling the detector and matcher functions as necessary, as well as implementing the IVisionObervable interface.
Author:
robert breznak, Zack A. Kleinfeld, Alex Cunningham

Field Summary	Page	
boolean	MATCH_RELUCTANT
MATCH_RELUCTANT Determines if a point is to be removed after use, to not be used more than once.		
int	MATCH_THRESHHOLD
MATCH_THRESHHOLD Determines how good matches must be to count as the same point.		

Constructor Summary	Page	
VisionManager(String host, int leftPort, int rightPort, int fps, Dimension d)
Constructs a new vision manager.		

Method Summary	Page	
void	addListener(VisionObserver l)
Add an observer to be notified when an update occurs		
void	configure(String host, int leftPort, int rightPort, int fps, Dimension d)
Change the configuration of the camera connections Can change resolution at this point, but changes must propagate to both cameras at the same time.		
void	connect()
Connect the cameras and start calculations on them Kicks off the main vision thread.		
void	disconnect()
Disconnect the cameras and stop calculations.		
ImageCanvas	getLeft()
Get the left camera feed		
ImageCanvas	getRight()
Get the right camera feed		
void	removeAll()
Remove all observers from the notification list		
void	removeListener(VisionObserver l)
Remove an observer from the notification list		
void	run()
Called by the new thread.		
Field Detail
MATCH_THRESHHOLD
public int MATCH_THRESHHOLD
MATCH_THRESHHOLD Determines how good matches must be to count as the same point.

MATCH_RELUCTANT
public boolean MATCH_RELUCTANT
MATCH_RELUCTANT Determines if a point is to be removed after use, to not be used more than once. possible use is to eliminate concentration on one strong feature.
Constructor Detail
VisionManager
public VisionManager(String host,
                     int leftPort,
                     int rightPort,
                     int fps,
                     Dimension d)
Constructs a new vision manager. Decides at this point what resolution will be taken from the camera.
Parameters:
host - the host to connect to
leftPort - the port to communicate across for the left camera
rightPort - the port to communicate across for the right camera
fps - the maximum fps rate to capture images at
d - the size of the windows to display
Method Detail
configure
public void configure(String host,
                      int leftPort,
                      int rightPort,
                      int fps,
                      Dimension d)
Change the configuration of the camera connections Can change resolution at this point, but changes must propagate to both cameras at the same time.
Parameters:
host - the new host to connect to
leftPort - the port to communicate across for the left camera
rightPort - the port to communicate across for the right camera
fps - the maximum fps rate to capture images at
d - the size of the windows to display

connect
public void connect()
Connect the cameras and start calculations on them Kicks off the main vision thread. Calls connect on each ImageCanvas.

disconnect
public void disconnect()
Disconnect the cameras and stop calculations. Calls disconnect on each ImageCanvas and sets halt flags.

getLeft
public ImageCanvas getLeft()
Get the left camera feed
Returns:
the left camera feed

getRight
public ImageCanvas getRight()
Get the right camera feed
Returns:
the right camera

run
public void run()
Called by the new thread. Calculates the new disparity values and then fires the results to all of the listening observers.
Specified by:
run in interface Runnable
Overrides:
run in class Thread

addListener
public void addListener(VisionObserver l)
Add an observer to be notified when an update occurs

removeAll
public void removeAll()
Remove all observers from the notification list

removeListener
public void removeListener(VisionObserver l)
Remove an observer from the notification list

Interface VisionObserver
edu.wpi.ari.glados.vision
All Known Implementing Classes:
GDriver, GGDriver, Logger, SLAMFrame, VisionTest

public interface VisionObserver
Implementing classes will be given an update from the INS when the update is available
Author:
robert breznak

Method Summary	Page	
void	VisionReceivedValues(Vector<Vector3d> points)
Called when there is an INS update.		
Method Detail
VisionReceivedValues
void VisionReceivedValues(Vector<Vector3d> points)
Called when there is an INS update. Contains the new location and velocity from 0,0 which is the previous position

Package edu.wpi.ari.glados.vision.vidar
Class Summary	Page	
Detector	The Detector function implements matrix convolution operations needed for the implementation of the ARI simple vision system.		
Matcher	Matcher is responsible for calculating the likelyhood two features are the same, then must calculate their distance from the observer.		

Class Detector
edu.wpi.ari.glados.vision.vidar
java.lang.Object
  edu.wpi.ari.glados.vision.vidar.Detector

public class Detector
extends Object
The Detector function implements matrix convolution operations needed for the implementation of the ARI simple vision system.
Author:
Zack A. Kleinfeld

Constructor Summary	Page	
Detector()		

Method Summary	Page	
void	edgeDetect(BufferedImage src, BufferedImage dest)
A matrix operation meant to eliminate pixels that arn't on an edge.		
Vector<Point>	featureDetect(BufferedImage src, int sample, int threshhold)
Feature Detection function to count, enumerate, and return the remaining pixels in an image, which should be the features.		
Point[]	filter(BufferedImage lhs, BufferedImage rhs)		
void	highDetect(BufferedImage src, BufferedImage dest)
A matrix operation meant to eliminate pixels that don't have neighbors.		
void	lineDetect(BufferedImage src, BufferedImage dest)
A matrix operation meant to eliminate pixels that arn't in a line.		
BufferedImage	loadImage(File f)
Loads an image from a testing file		
Constructor Detail
Detector
public Detector()
Method Detail
filter
public Point[] filter(BufferedImage lhs,
                      BufferedImage rhs)

loadImage
public BufferedImage loadImage(File f)
Loads an image from a testing file
Parameters:
f - file to read
Returns:
a BufferedImage from the file.

edgeDetect
public void edgeDetect(BufferedImage src,
                       BufferedImage dest)
A matrix operation meant to eliminate pixels that arn't on an edge.
Parameters:
src - Source Image
dest - Destination Image

lineDetect
public void lineDetect(BufferedImage src,
                       BufferedImage dest)
A matrix operation meant to eliminate pixels that arn't in a line.
Parameters:
src - Source Image
dest - Destination Image

highDetect
public void highDetect(BufferedImage src,
                       BufferedImage dest)
A matrix operation meant to eliminate pixels that don't have neighbors.
Parameters:
src - Source Image
dest - Destination Image

featureDetect
public Vector<Point> featureDetect(BufferedImage src,
                                   int sample,
                                   int threshhold)
Feature Detection function to count, enumerate, and return the remaining pixels in an image, which should be the features.
Parameters:
src - Image which has been processed to eliminate most pixels.
sample - The color channel to detect on.
threshhold - The brightness of the channel needed to qualify as a feature.
Returns:
A Vector of Points representing features.

Class Matcher
edu.wpi.ari.glados.vision.vidar
java.lang.Object
  edu.wpi.ari.glados.vision.vidar.Matcher

public class Matcher
extends Object
Matcher is responsible for calculating the likelyhood two features are the same, then must calculate their distance from the observer.
Author:
Zack A. Kleinfeld

Field Summary	Page	
double	FOV
Camera field of view, in degrees.		
int	LEFT_CAM_OFFSET_X
Pixel offset on the x axis relative to the right camera.		
int	LEFT_CAM_OFFSET_Y
Pixel offset on the y axis relative to the right camera.		
double	MAX_DISTANCE
Maximum distance two points can be found at.		

Constructor Summary	Page	
Matcher()		

Method Summary	Page	
double	calcDistance(int disperity, int base, double focalLength, double converstionFactor)
Calculate the distance using the disparity.		
Vector3d	createVector(Vector3d vec, BufferedImage img)
Using the FOV defined, calculate the real vector to a point, adjusted from X, Y, Distance.		
Vector<Vector3d>	match(Vector<Point> lhs, Vector<Point> rhs, double threshhold, int base, double focalLength, double converstionFactor, boolean destructive)
The main feature matching function.		
Field Detail
MAX_DISTANCE
public double MAX_DISTANCE
Maximum distance two points can be found at. A replacment for infinity.

FOV
public double FOV
Camera field of view, in degrees.

LEFT_CAM_OFFSET_X
public int LEFT_CAM_OFFSET_X
Pixel offset on the x axis relative to the right camera. The image will be shifted right this number of degrees.

LEFT_CAM_OFFSET_Y
public int LEFT_CAM_OFFSET_Y
Pixel offset on the y axis relative to the right camera. The image will be shifted down this number of degrees.
Constructor Detail
Matcher
public Matcher()
Method Detail
match
public Vector<Vector3d> match(Vector<Point> lhs,
                              Vector<Point> rhs,
                              double threshhold,
                              int base,
                              double focalLength,
                              double converstionFactor,
                              boolean destructive)
The main feature matching function.
Parameters:
lhs - Vector of LHS features.
rhs - Vector of RHS features.
threshhold - How close feature must be to be matched.
base - Camera spread, in mm.
focalLength - focal length of both cameras, in mm
converstionFactor - factor to convert pixels to mm
destructive - Should we remove a feature when matched?

calcDistance
public double calcDistance(int disperity,
                           int base,
                           double focalLength,
                           double converstionFactor)
Calculate the distance using the disparity. Uses the standard method.
Parameters:
disperity - The pixel-wise disparity between the two images.
base - Camera spread, in mm.
focalLength - focal length of both cameras, in mm
converstionFactor - factor to convert pixels to mm
Returns:
Distance in arbitrary units.

createVector
public Vector3d createVector(Vector3d vec,
                             BufferedImage img)
Using the FOV defined, calculate the real vector to a point, adjusted from X, Y, Distance.
Parameters:
vec - X, Y, and Z values calculated from calcDistance
img - image (used for its dimensions) from a camera.
Returns:
Real vector to the point.

Java API documentation generated with DocFlex/Doclet v1.5.3
DocFlex/Doclet is both a multi-format Javadoc doclet and a free edition of DocFlex/Javadoc. If you need to customize your Javadoc without writing a full-blown doclet from scratch, DocFlex/Javadoc may be the only tool able to help you! Find out more at www.docflex.com