[TeamTalk 113]: [650] moast-bth: 1) imported changes from moast to bring current

tk@edam.speech.cs.cmu.edu tk at edam.speech.cs.cmu.edu
Wed Jul 11 12:33:26 EDT 2007


An HTML attachment was scrubbed...
URL: http://mailman.srv.cs.cmu.edu/pipermail/teamtalk-developers/attachments/20070711/096d84c2/attachment-0001.html
-------------- next part --------------
Modified: moast-bth/TeamTalkSimulator/robot.cc
===================================================================
--- moast-bth/TeamTalkSimulator/robot.cc	2007-07-11 16:23:30 UTC (rev 649)
+++ moast-bth/TeamTalkSimulator/robot.cc	2007-07-11 16:33:26 UTC (rev 650)
@@ -541,7 +541,7 @@
       AmMobJACmdSpin spin;
       spin.absAngle = canonical_angle(r - goTo->getAngle());
       spin.tolerance = PI/40;
-      spin.direction = PRIM_MOB_JA_CMD_ROTATE_SHORTEST;
+      spin.direction = MOAST_ROTATE_SHORTEST;
       spin.serial_number = amStatP->echo_serial_number + 1;
       debug << "spinning: " << spin.absAngle << " tol: " << spin.tolerance 
 	    << " SHORTEST" << endl;

Modified: moast-bth/moast/bin/Makefile.am
===================================================================
--- moast-bth/moast/bin/Makefile.am	2007-07-11 16:23:30 UTC (rev 649)
+++ moast-bth/moast/bin/Makefile.am	2007-07-11 16:33:26 UTC (rev 650)
@@ -80,9 +80,10 @@
 ../src/sim/simWare/swKBMsg.hh ../src/sim/simWare/swKBMsg.cc \
 ../src/sim/simWare/usarInfSkin.hh ../src/sim/simWare/usarInfSkin.cc \
 ../src/sim/simWare/trafficSupSkin.hh ../src/sim/simWare/trafficSupSkin.cc \
-../src/sim/simWare/swTraffic.hh ../src/sim/simWare/swTraffic.cc 
+../src/sim/simWare/swTraffic.hh ../src/sim/simWare/swTraffic.cc \
+../src/prim/primMobEngine.cc ../include/primMobEngine.hh
 
-segmentTest_SOURCES = ../src/tools/segmentTools/cluster.cc ../src/tools/segmentTools/test.cc ../src/tools/segmentTools/chainHull.cc ../src/tools/segmentTools/cluster.hh ../src/tools/segmentTools/vectorWM.cc ../src/tools/segmentTools/vectorWm.hh
+segmentTest_SOURCES = ../src/tools/segmentTools/cluster.cc ../src/tools/segmentTools/test.cc ../src/tools/segmentTools/chainHull.cc ../src/tools/segmentTools/cluster.hh ../src/tools/segmentTools/vectorWM.cc ../src/tools/segmentTools/vectorWM.hh
 segmentTest_LDADD = ../lib/libmoast.a -L$(RCSLIB_DIR)/lib -lrcs -lposemath -lm
 
 exampleUtmConvert_SOURCES = ../src/tools/exampleUtmConvert.cc
@@ -121,7 +122,7 @@
 primSPMain_SOURCES = ../src/prim/primSPMain.cc
 primSPMain_LDADD = ../lib/libmoast.a -L$(RCSLIB_DIR)/lib -lrcs -lposemath -lm
 
-primMobMain_SOURCES = ../src/prim/primMobMain.cc
+primMobMain_SOURCES = ../src/prim/primMobMain.cc ../src/prim/primMobEngine.cc
 primMobMain_LDADD = ../lib/libmoast.a -L$(RCSLIB_DIR)/lib -lrcs -lposemath -lm
 
 primMisMain_SOURCES = ../src/prim/primMisMain.cc
@@ -252,7 +253,7 @@
 joySDL_SOURCES = ../src/tools/joySDL.cc
 joySDL_LDADD = @SDL_LIBS@ ../lib/libmoast.a -L$(RCSLIB_DIR)/lib -lrcs -lposemath -lm
 
-robojoy_SOURCES = ../src/tools/robojoy.cc
+robojoy_SOURCES = ../src/tools/robojoy.cc ../src/tools/gomath.c ../include/gotypes.h ../include/gomath.h
 robojoy_LDADD = @SDL_LIBS@ ../lib/libmoast.a -L$(RCSLIB_DIR)/lib -lrcs -lposemath -lm
 
 endif

Modified: moast-bth/moast/bin/runJoy
===================================================================
--- moast-bth/moast/bin/runJoy	2007-07-11 16:23:30 UTC (rev 649)
+++ moast-bth/moast/bin/runJoy	2007-07-11 16:33:26 UTC (rev 650)
@@ -14,15 +14,16 @@
 #Submarine
 #PLATFORM=6; JOYMODE=3
 #Zerg
-PLATFORM=7; JOYMODE=1
+#PLATFORM=7; JOYMODE=1
 #Talon
 #PLATFORM=8; JOYMODE=1
 #TeleMax
 #PLATFORM=9; JOYMODE=1
 #AirRobot
 PLATFORM=10; JOYMODE=4
-#STARTLOC=1
-STARTLOC=2
+STARTLOC=1
+#STARTLOC=2
+#STARTLOC=3
 #done with user area
 #
 #are we on cygwin?
@@ -150,7 +151,15 @@
   pid10=$!
 fi
 
-./joySDL -d1 -x3 -y3 -z3 -w3 -m$JOYMODE&
+# Old Joystick Program
+#./joySDL -d1 -x3 -y3 -z3 -w3 -m$JOYMODE&
+
+# Settings for the AirRobot
+#./robojoy -d1 -x1.5708 -y-5 -z5 -w-5
+
+# Settings for other robots (robojoy will adjust scale factors automatically) 
+./robojoy -d1&
+
 pid11=$!
 
 ./$TOP

Modified: moast-bth/moast/doc/refManual_tex/am/gfx/CVS/Entries
===================================================================
--- moast-bth/moast/doc/refManual_tex/am/gfx/CVS/Entries	2007-07-11 16:23:30 UTC (rev 649)
+++ moast-bth/moast/doc/refManual_tex/am/gfx/CVS/Entries	2007-07-11 16:33:26 UTC (rev 650)
@@ -1,13 +1,13 @@
-/AMMobGraphicalOutput.jpg/1.1/Fri Dec  8 19:24:50 2006//
-/AMSPMap.jpg/1.1/Fri Dec  8 19:25:47 2006//
-/AMSPMapDisplay.jpg/1.1/Fri Dec  8 19:24:50 2006//
-/bothWallsFound.jpg/1.1/Fri Dec  8 19:26:38 2006//
-/changingAMSPMap.jpg/1.1/Fri Dec  8 19:26:38 2006//
-/figLinearizedPath.jpg/1.1/Wed Jan 10 17:04:02 2007//
-/figRounding.jpg/1.1/Wed Jan 10 17:03:19 2007//
-/findingViewedCells.jpg/1.1/Fri Dec  8 19:26:38 2006//
-/ladarRaysHittingWall.jpg/1.1/Fri Dec  8 19:24:50 2006//
-/pathReplanningInvariance.jpg/1.1/Fri Dec  8 19:24:50 2006//
-/planningToHorizon.jpg/1.1/Fri Dec  8 19:25:47 2006//
-/upperWallMissing.jpg/1.1/Fri Dec  8 19:25:47 2006//
+/AMMobGraphicalOutput.jpg/1.1/Sun May 20 20:30:52 2007//
+/AMSPMap.jpg/1.1/Sun May 20 20:30:52 2007//
+/AMSPMapDisplay.jpg/1.1/Sun May 20 20:30:52 2007//
+/bothWallsFound.jpg/1.1/Sun May 20 20:30:52 2007//
+/changingAMSPMap.jpg/1.1/Sun May 20 20:30:52 2007//
+/figLinearizedPath.jpg/1.1/Sun May 20 20:30:52 2007//
+/figRounding.jpg/1.1/Sun May 20 20:30:52 2007//
+/findingViewedCells.jpg/1.1/Sun May 20 20:30:52 2007//
+/ladarRaysHittingWall.jpg/1.1/Sun May 20 20:30:52 2007//
+/pathReplanningInvariance.jpg/1.1/Sun May 20 20:30:52 2007//
+/planningToHorizon.jpg/1.1/Sun May 20 20:30:52 2007//
+/upperWallMissing.jpg/1.1/Sun May 20 20:30:52 2007//
 D

Modified: moast-bth/moast/doc/refManual_tex/am/gfx/CVS/Root
===================================================================
--- moast-bth/moast/doc/refManual_tex/am/gfx/CVS/Root	2007-07-11 16:23:30 UTC (rev 649)
+++ moast-bth/moast/doc/refManual_tex/am/gfx/CVS/Root	2007-07-11 16:33:26 UTC (rev 650)
@@ -1 +1 @@
-:pserver:anonymous at moast.cvs.sourceforge.net:/cvsroot/moast
+:ext:tkharris at moast.cvs.sourceforge.net:/cvsroot/moast

Added: moast-bth/moast/doc/refManual_tex/tools/joystick.tex
===================================================================
--- moast-bth/moast/doc/refManual_tex/tools/joystick.tex	                        (rev 0)
+++ moast-bth/moast/doc/refManual_tex/tools/joystick.tex	2007-07-11 16:33:26 UTC (rev 650)
@@ -0,0 +1,60 @@
+\subsection{Joystick}
+The vehicle mobility and mission packages can be controlled with a
+PC-compatible game joystick. The standard joystick provides two X-Y
+joysticks and 10 selection buttons numbered 1 through 10, clustered in
+different groups.
+
+The dual X-Y joysticks are distinguished here as ``left'' and
+``right,'' and their directions are ``up'' (away from you), ``down''
+(toward you), ``left'' and ``right''. 
+
+The joystick application is \verb+robojoy+, typically entered with no
+arguments, e.g., 
+
+\begin{verbatim}
+cd <path-to-moast-devel>/bin
+./robojoy
+\end{verbatim}
+
+After about 10 seconds during which the program connects to the
+controller, the program will dump out some diagnostics information and
+accept joystick commands.
+
+Button 9 toggles between Mobility Mode and Joint Mode. The current
+mode is printed in the text window in which \verb+robojoy+ is running.
+
+In Mobility mode, the dual joysticks function according to the type of
+mobility platform being driven. In a skid steer vehicle, the left
+joystick controls the left skid, and the right joystick controls the
+right skid, with ``up'' driving the skid foward, and ``down'' driving
+the skid backward. A left turn is accomplished my moving the left
+joystick down and the right joystick up.
+
+In Mobilty mode, if there are any flippers on the vehicle, buttons 5,
+6, 7 and 8 control the front and rear flippers. Buttons 5 and 7 raise
+and lower the front flippers, respectively; Buttons 6 and 8 raise and
+lower the rear flippers, respectively.
+
+In Joint mode, the buttons select the joint to be actuated, and the
+left joystick's left and right directions move the joint in the
+negative and positive direction, respectively. 
+
+Button 10 switches between Tool and World mode. In either of these
+modes, the left joystick L/R controls motion in the X direction, the
+left joystick U/D controls Y motion and the right joystick U/D
+controls Z motion. The right joystick L/R controls gripper opening and
+closing. 
+
+In Tool Mode, the XYZ are relative to the gripper, where X is
+side-to-side, Y is in-out, and Z is up-down.
+
+In World Mode, the XYZ are relative to the vehicle body, where X is
+side-to-side, Y is front-to-back, and Z is up-down. 
+
+Rotations about XYZ can be done by holding down Button 8 while using
+the joysticks. For example, to rotate around the Z axis, which looks
+like a panning motion, hold down Button 8 and move the right joystick
+up and down. To rotate around the X axis, which looks likes a tilting
+motion, hold down Button 8 and move the left joystick side-to-side. 
+
+

Modified: moast-bth/moast/doc/refManual_tex/tools.tex
===================================================================
--- moast-bth/moast/doc/refManual_tex/tools.tex	2007-07-11 16:23:30 UTC (rev 649)
+++ moast-bth/moast/doc/refManual_tex/tools.tex	2007-07-11 16:33:26 UTC (rev 650)
@@ -1,2 +1,4 @@
 \input{tools/libraries}
 \input{tools/tools}
+\input{tools/joystick}
+

Modified: moast-bth/moast/etc/moast.nml
===================================================================
--- moast-bth/moast/etc/moast.nml	2007-07-11 16:23:30 UTC (rev 649)
+++ moast-bth/moast/etc/moast.nml	2007-07-11 16:33:26 UTC (rev 650)
@@ -326,7 +326,7 @@
 B symbolicData3 	SHMEM    	 localhost 	43072 	0 	* 	268 	* 	25468 	TCP=20469  xdr
 B symbolicData4 	SHMEM    	 localhost 	43072 	0 	* 	269 	* 	25469 	TCP=20470  xdr
  
-B trafficData 	SHMEM    	 localhost 	10304 	0 	* 	270 	* 	25470 	TCP=20471  xdr
+B trafficData1 	SHMEM    	 localhost 	10304 	0 	* 	270 	* 	25470 	TCP=20471  xdr
 B trafficCtrlCmd1 	SHMEM    	 localhost 	4160 	0 	* 	271 	* 	25471 	TCP=20472  xdr
 B trafficCtrlStat1 	SHMEM    	 localhost 	1088 	0 	* 	272 	* 	25472 	TCP=20473  xdr
 B trafficCtrlCfg1 	SHMEM    	 localhost 	1088 	0 	* 	273 	* 	25473 	TCP=20474  xdr
@@ -1320,13 +1320,13 @@
 P sectMobPL1 	primMobJAStat4 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	5 	
  
 # MOAST Tools
-P trafficSim 	trafficData 	     LOCAL 	 localhost 	        RW 	2 	INF     	1 	0 	
+P trafficSim 	trafficData1 	     LOCAL 	 localhost 	        RW 	2 	INF     	1 	0 	
 P trafficSim 	trafficCtrlCmd1 	     LOCAL 	 localhost 	        RW 	2 	INF     	1 	0 	
 P trafficSim 	trafficCtrlStat1 	     LOCAL 	 localhost 	        RW 	2 	INF     	1 	0 	
 P trafficSim 	trafficCtrlCfg1 	     LOCAL 	 localhost 	        RW 	2 	INF     	1 	0 	
 P trafficSim 	trafficCtrlSet1 	     LOCAL 	 localhost 	        RW 	2 	INF     	1 	0 	
  
-P trafficShell 	trafficData 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	1 	
+P trafficShell 	trafficData1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	1 	
 P trafficShell 	trafficCtrlCmd1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	1 	
 P trafficShell 	trafficCtrlStat1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	1 	
 P trafficShell 	trafficCtrlCfg1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	1 	
@@ -1375,6 +1375,7 @@
 P virtSensor1 	servoSPCfg1 	    REMOTE 	 localhost 	        RW 	0 	INF     	0 	4 	
 P virtSensor1 	symbolicData1 	    REMOTE 	 localhost 	        RW 	0 	INF     	0 	1 	
  
+P   joystick 	navDataExt1 	    REMOTE 	 localhost 	        RW 	0 	INF     	0 	12 	
 P   joystick 	servoMobJACmd1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
 P   joystick 	servoMobJAStat1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
 P   joystick 	servoMobJACfg1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
@@ -1397,6 +1398,7 @@
 P   joystick 	servoMisJACfg1_2 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
 P   joystick 	servoMisJACfg1_3 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
 P   joystick 	servoMisJACfg1_4 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
+P   joystick 	navDataExt2 	    REMOTE 	 localhost 	        RW 	0 	INF     	0 	11 	
 P   joystick 	servoMobJACmd2 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
 P   joystick 	servoMobJAStat2 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
 P   joystick 	servoMobJACfg2 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
@@ -1419,6 +1421,7 @@
 P   joystick 	servoMisJACfg2_2 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
 P   joystick 	servoMisJACfg2_3 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
 P   joystick 	servoMisJACfg2_4 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
+P   joystick 	navDataExt3 	    REMOTE 	 localhost 	        RW 	0 	INF     	0 	11 	
 P   joystick 	servoMobJACmd3 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
 P   joystick 	servoMobJAStat3 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
 P   joystick 	servoMobJACfg3 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
@@ -1441,6 +1444,7 @@
 P   joystick 	servoMisJACfg3_2 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
 P   joystick 	servoMisJACfg3_3 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
 P   joystick 	servoMisJACfg3_4 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
+P   joystick 	navDataExt4 	    REMOTE 	 localhost 	        RW 	0 	INF     	0 	11 	
 P   joystick 	servoMobJACmd4 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
 P   joystick 	servoMobJAStat4 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
 P   joystick 	servoMobJACfg4 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
@@ -1467,7 +1471,7 @@
 P moastErrorLog 	moastError 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
  
 P   nmlPrint 	moastError 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	4 	
-P   nmlPrint 	navDataExt1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	12 	
+P   nmlPrint 	navDataExt1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	13 	
 P   nmlPrint 	servoSPLinescan1_1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	4 	
 P   nmlPrint 	servoSPSonarArr1_1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	2 	
 P   nmlPrint 	servoSPVict1_1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
@@ -1475,7 +1479,7 @@
 P   nmlPrint 	servoSPNav1_1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
 P   nmlPrint 	symbolicData1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	2 	
 P   nmlPrint 	primSPLinescan1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
-P   nmlPrint 	navDataExt2 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	11 	
+P   nmlPrint 	navDataExt2 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	12 	
 P   nmlPrint 	servoSPLinescan2_1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
 P   nmlPrint 	servoSPSonarArr2_1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	2 	
 P   nmlPrint 	servoSPNav2_1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
@@ -1483,7 +1487,7 @@
 P   nmlPrint 	servoSPRfid2_1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	2 	
 P   nmlPrint 	symbolicData2 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	1 	
 P   nmlPrint 	primSPLinescan2 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
-P   nmlPrint 	navDataExt3 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	11 	
+P   nmlPrint 	navDataExt3 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	12 	
 P   nmlPrint 	servoSPLinescan3_1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
 P   nmlPrint 	servoSPSonarArr3_1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	2 	
 P   nmlPrint 	servoSPNav3_1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
@@ -1491,7 +1495,7 @@
 P   nmlPrint 	servoSPVict3_1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
 P   nmlPrint 	symbolicData3 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	1 	
 P   nmlPrint 	primSPLinescan3 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
-P   nmlPrint 	navDataExt4 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	11 	
+P   nmlPrint 	navDataExt4 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	12 	
 P   nmlPrint 	servoSPLinescan4_1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
 P   nmlPrint 	servoSPSonarArr4_1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	2 	
 P   nmlPrint 	servoSPRfid4_1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	2 	
@@ -1500,7 +1504,7 @@
 P   nmlPrint 	symbolicData4 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	1 	
 P   nmlPrint 	primSPLinescan4 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
  
-P    javaGui 	navDataExt1 	    REMOTE 	 localhost 	        RW 	0 	INF     	0 	13 	
+P    javaGui 	navDataExt1 	    REMOTE 	 localhost 	        RW 	0 	INF     	0 	14 	
 P    javaGui 	primMobJACmd1 	    REMOTE 	 localhost 	        RW 	0 	INF     	0 	6 	
 P    javaGui 	primMobJAStat1 	    REMOTE 	 localhost 	        RW 	0 	INF     	0 	6 	
 P    javaGui 	primMobJACfg1 	    REMOTE 	 localhost 	        RW 	0 	INF     	0 	5 	
@@ -1524,13 +1528,13 @@
 P    javaGui 	vehMobPLSet1 	    REMOTE 	 localhost 	        RW 	0 	INF     	0 	4 	
 P   notifier 	sectMobPLStat1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
 P   notifier 	moastError 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	5 	
-P spqrConvert 	navDataExt1 	     LOCAL 	 localhost 	        RW 	2 	INF     	1 	14 	
+P spqrConvert 	navDataExt1 	     LOCAL 	 localhost 	        RW 	2 	INF     	1 	15 	
 P spqrConvert 	vehMobPLCmd1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	5 	
 P spqrConvert 	vehMobPLStat1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	5 	
 P spqrConvert 	vehMobPLCfg1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	5 	
 P spqrConvert 	vehMobPLSet1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	5 	
 P spqrConvert 	vehMapOut1 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	3 	
-P spqrConvert 	navDataExt2 	     LOCAL 	 localhost 	        RW 	2 	INF     	1 	12 	
+P spqrConvert 	navDataExt2 	     LOCAL 	 localhost 	        RW 	2 	INF     	1 	13 	
 P spqrConvert 	vehMobPLCmd2 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	4 	
 P spqrConvert 	vehMobPLStat2 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	4 	
 P spqrConvert 	vehMobPLCfg2 	     LOCAL 	 localhost 	        RW 	0 	INF     	0 	4 	

Modified: moast-bth/moast/etc/moastBuffers.cfg
===================================================================
--- moast-bth/moast/etc/moastBuffers.cfg	2007-07-11 16:23:30 UTC (rev 649)
+++ moast-bth/moast/etc/moastBuffers.cfg	2007-07-11 16:33:26 UTC (rev 650)
@@ -376,7 +376,7 @@
 b bufname=symbolicData4 size=43000 
 
 # traffic simulation buffers
-b bufname=trafficData size=10240 
+b bufname=trafficData1 size=10240 
 b bufname=trafficCtrlCmd1 size=4096
 b bufname=trafficCtrlStat1 size=1024
 b bufname=trafficCtrlCfg1 size=1024

Modified: moast-bth/moast/etc/moastTools.cfg
===================================================================
--- moast-bth/moast/etc/moastTools.cfg	2007-07-11 16:23:30 UTC (rev 649)
+++ moast-bth/moast/etc/moastTools.cfg	2007-07-11 16:33:26 UTC (rev 650)
@@ -1,7 +1,7 @@
 #
 # trafficSim
 #
-p bufname=trafficData name=trafficSim master=1 server=2 proctype=local
+p bufname=trafficData1 name=trafficSim master=1 server=2 proctype=local
 p bufname=trafficCtrlCmd1 name=trafficSim master=1 server=2 proctype=local
 p bufname=trafficCtrlStat1 name=trafficSim master=1 server=2 proctype=local
 p bufname=trafficCtrlCfg1 name=trafficSim master=1 server=2 proctype=local
@@ -11,7 +11,7 @@
 #
 # trafficShell
 #
-p bufname=trafficData name=trafficShell master=0 server=0 proctype=local
+p bufname=trafficData1 name=trafficShell master=0 server=0 proctype=local
 p bufname=trafficCtrlCmd1 name=trafficShell master=0 server=0 proctype=local
 p bufname=trafficCtrlStat1 name=trafficShell master=0 server=0 proctype=local
 p bufname=trafficCtrlCfg1 name=trafficShell master=0 server=0 proctype=local
@@ -81,6 +81,7 @@
 #
 # joystick
 #
+p bufname=navDataExt1 name=joystick master=0 server=0 proctype=remote
 p bufname=servoMobJACmd1 name=joystick master=0 server=0 proctype=local
 p bufname=servoMobJAStat1 name=joystick master=0 server=0 proctype=local
 p bufname=servoMobJACfg1 name=joystick master=0 server=0 proctype=local
@@ -104,6 +105,7 @@
 p bufname=servoMisJACfg1_3 name=joystick master=0 server=0 proctype=local
 p bufname=servoMisJACfg1_4 name=joystick master=0 server=0 proctype=local
 #
+p bufname=navDataExt2 name=joystick master=0 server=0 proctype=remote
 p bufname=servoMobJACmd2 name=joystick master=0 server=0 proctype=local
 p bufname=servoMobJAStat2 name=joystick master=0 server=0 proctype=local
 p bufname=servoMobJACfg2 name=joystick master=0 server=0 proctype=local
@@ -127,6 +129,7 @@
 p bufname=servoMisJACfg2_3 name=joystick master=0 server=0 proctype=local
 p bufname=servoMisJACfg2_4 name=joystick master=0 server=0 proctype=local
 #
+p bufname=navDataExt3 name=joystick master=0 server=0 proctype=remote
 p bufname=servoMobJACmd3 name=joystick master=0 server=0 proctype=local
 p bufname=servoMobJAStat3 name=joystick master=0 server=0 proctype=local
 p bufname=servoMobJACfg3 name=joystick master=0 server=0 proctype=local
@@ -150,6 +153,7 @@
 p bufname=servoMisJACfg3_3 name=joystick master=0 server=0 proctype=local
 p bufname=servoMisJACfg3_4 name=joystick master=0 server=0 proctype=local
 #
+p bufname=navDataExt4 name=joystick master=0 server=0 proctype=remote
 p bufname=servoMobJACmd4 name=joystick master=0 server=0 proctype=local
 p bufname=servoMobJAStat4 name=joystick master=0 server=0 proctype=local
 p bufname=servoMobJACfg4 name=joystick master=0 server=0 proctype=local

Added: moast-bth/moast/etc/traffic.ini
===================================================================
--- moast-bth/moast/etc/traffic.ini	                        (rev 0)
+++ moast-bth/moast/etc/traffic.ini	2007-07-11 16:33:26 UTC (rev 650)
@@ -0,0 +1,22 @@
+; Traffic Simulation initialization file
+[DM-Mapping_250]
+UTM_START_POSE_1 = 3.63 10.8 -.446 0 0 0
+UTM_START_POSE_2 = 3.41 9.96 -.446 0 0 0
+UTM_START_POSE_3 = 2.14 9.86 -.446 0 1.57 0
+UTM_START_POSE_4 = 3.63 11.9 -.446 0 0 0
+PLATFORM_TYPE_1 = Talon
+PLATFORM_TYPE_2 = Talon
+PLATFORM_TYPE_3 = Zerg
+PLATFORM_TYPE_4 = Zerg
+
+[DM-compWorldDay2_250]
+UTM_START_POSE_1 = -44.81 22. -4 0 0 0
+UTM_START_POSE_2 = -44. 22 -4 0 0 0
+UTM_START_POSE_3 = -49 33.5 -4 0 0 0
+UTM_START_POSE_4 = -42 32.5 -4 0 0 0
+PLATFORM_TYPE_1 = Talon
+PLATFORM_TYPE_2 = Talon
+PLATFORM_TYPE_3 = Zerg
+PLATFORM_TYPE_4 = Zerg
+
+

Modified: moast-bth/moast/include/Makefile.am
===================================================================
--- moast-bth/moast/include/Makefile.am	2007-07-11 16:23:30 UTC (rev 649)
+++ moast-bth/moast/include/Makefile.am	2007-07-11 16:33:26 UTC (rev 650)
@@ -35,4 +35,5 @@
 nmlPosition.hh \
 nmlMap.hh \
 trafficData.hh \
-trafficCtrl.hh
+trafficCtrl.hh \
+primMobEngine.hh

Added: moast-bth/moast/include/gomath.h
===================================================================
--- moast-bth/moast/include/gomath.h	                        (rev 0)
+++ moast-bth/moast/include/gomath.h	2007-07-11 16:33:26 UTC (rev 650)
@@ -0,0 +1,698 @@
+/*
+  DISCLAIMER:
+  This software was produced by the National Institute of Standards
+  and Technology (NIST), an agency of the U.S. government, and by statute is
+  not subject to copyright in the United States.  Recipients of this software
+  assume all responsibility associated with its operation, modification,
+  maintenance, and subsequent redistribution.
+
+  See NIST Administration Manual 4.09.07 b and Appendix I. 
+*/
+
+/*!
+  \file gomath.h
+
+  \brief Declarations for pose math functions
+
+  \code CVS Status:
+  $Author: proctor $
+  $Revision: 1.1 $
+  $Date: 2007/05/09 15:19:06 $
+  \endcode
+
+  \author Fred Proctor
+*/
+
+#ifndef GO_MATH_H
+#define GO_MATH_H
+
+#include <stddef.h>		/* sizeof */
+#include <math.h>		/* M_PI */
+#include <float.h>		/* FLT,DBL_MIN,MAX,EPSILON */
+#include "gotypes.h"		/* go_integer,real */
+
+#define go_sq(x) ((x)*(x))
+#define go_cub(x) ((x)*(x)*(x))
+#define go_qua(x) ((x)*(x)*(x)*(x))
+
+extern void go_sincos(go_real t, go_real * s, go_real * c);
+
+extern go_real go_cbrt(go_real t);
+
+#ifdef M_PI
+#define GO_PI M_PI
+#else
+#define GO_PI 3.14159265358979323846
+#endif
+#define GO_2_PI (2.0*GO_PI)
+
+#ifdef M_PI_2
+#define GO_PI_2 M_PI_2
+#else
+#define GO_PI_2 1.57079632679489661923
+#endif
+
+#ifdef M_PI_4
+#define GO_PI_4 M_PI_4
+#else
+#define GO_PI_4 0.78539816339744830962
+#endif
+
+#define GO_TO_DEG(rad) ((rad)*57.295779513082323)
+#define GO_TO_RAD(deg) ((deg)*0.0174532925199432952)
+
+/* how close translational quantities must be to be equal */
+#define GO_TRAN_CLOSE(x,y) (fabs((x)-(y)) < GO_REAL_EPSILON)
+#define GO_TRAN_SMALL(x) (fabs(x) < GO_REAL_EPSILON)
+
+/* how close rotational quantities must be to be equal */
+#define GO_ROT_CLOSE(x,y) (fabs((x)-(y)) < GO_REAL_EPSILON)
+#define GO_ROT_SMALL(x) (fabs(x) < GO_REAL_EPSILON)
+
+/* how close general quantities must be to be equal */
+#define GO_CLOSE(x,y) (fabs((x)-(y)) < GO_REAL_EPSILON)
+#define GO_SMALL(x) (fabs(x) < GO_REAL_EPSILON)
+
+typedef struct {
+  go_real x, y, z;
+} go_cart;
+
+typedef struct {
+  go_real theta, phi, r;
+} go_sph;
+
+typedef struct {
+  go_real theta, r, z;
+} go_cyl;
+
+typedef struct {
+  go_real x, y, z;
+} go_uvec;
+
+typedef struct {
+  go_real s, x, y, z;
+} go_rvec;
+
+/*            |  m.x.x   m.y.x   m.z.x  | */
+/* go_mat m = |  m.x.y   m.y.y   m.z.y  | */
+/*            |  m.x.z   m.y.z   m.z.z  | */
+
+typedef struct {
+  go_cart x;			/* x unit vector */
+  go_cart y;			/* y unit vector */
+  go_cart z;			/* z unit vector */
+} go_mat;
+
+typedef struct {
+  go_real s, x, y, z;
+} go_quat;
+
+typedef struct {
+  go_real z, y, zp;
+} go_zyz;
+
+typedef struct {
+  go_real z, y, x;
+} go_zyx;
+
+typedef struct {
+  go_real r, p, y;
+} go_rpy;
+
+typedef struct {
+  go_cart tran;
+  go_quat rot;
+} go_pose;
+
+extern go_pose
+go_pose_this(go_real x, go_real y, go_real z,
+	     go_real rs, go_real rx, go_real ry, go_real rz);
+
+extern go_pose
+go_pose_identity(void);
+
+typedef struct {
+  go_cart tran;
+  go_mat rot;
+} go_hom;
+
+typedef struct {
+  go_cart tran;
+  go_rpy rot;
+} go_rpose;
+
+/*
+  struct arguments are passed to functions as const pointers since the
+  speed is at least as fast for all but structs of one or two elements.
+*/
+
+/* translation rep conversion functions */
+
+extern go_result go_cart_sph_convert(const go_cart *, go_sph *);
+extern go_result go_cart_cyl_convert(const go_cart *, go_cyl *);
+extern go_result go_sph_cart_convert(const go_sph *, go_cart *);
+extern go_result go_sph_cyl_convert(const go_sph *, go_cyl *);
+extern go_result go_cyl_cart_convert(const go_cyl *, go_cart *);
+extern go_result go_cyl_sph_convert(const go_cyl *, go_sph *);
+
+/* rotation vector to true vector conversions */
+
+extern go_result go_cart_rvec_convert(const go_cart *, go_rvec *);
+extern go_result go_rvec_cart_convert(const go_rvec *, go_cart *);
+extern go_result go_cart_rpy_convert(const go_cart *, go_rpy *);
+extern go_result go_rpy_cart_convert(const go_rpy *, go_cart *);
+
+/* rotation rep conversion functions */
+
+extern go_result go_rvec_quat_convert(const go_rvec *, go_quat *);
+extern go_result go_rvec_mat_convert(const go_rvec *, go_mat *);
+extern go_result go_rvec_zyz_convert(const go_rvec *, go_zyz *);
+extern go_result go_rvec_zyx_convert(const go_rvec *, go_zyx *);
+extern go_result go_rvec_rpy_convert(const go_rvec *, go_rpy *);
+
+extern go_result go_quat_rvec_convert(const go_quat *, go_rvec *);
+extern go_result go_quat_mat_convert(const go_quat *, go_mat *);
+extern go_result go_quat_zyz_convert(const go_quat *, go_zyz *);
+extern go_result go_quat_zyx_convert(const go_quat *, go_zyx *);
+extern go_result go_quat_rpy_convert(const go_quat *, go_rpy *);
+
+extern go_result go_mat_rvec_convert(const go_mat *, go_rvec *);
+extern go_result go_mat_quat_convert(const go_mat *, go_quat *);
+extern go_result go_mat_zyz_convert(const go_mat *, go_zyz *);
+extern go_result go_mat_zyx_convert(const go_mat *, go_zyx *);
+extern go_result go_mat_rpy_convert(const go_mat *, go_rpy *);
+
+extern go_result go_zyz_rvec_convert(const go_zyz *, go_rvec *);
+extern go_result go_zyz_quat_convert(const go_zyz *, go_quat *);
+extern go_result go_zyz_mat_convert(const go_zyz *, go_mat *);
+extern go_result go_zyz_zyx_convert(const go_zyz *, go_zyx *);
+extern go_result go_zyz_rpy_convert(const go_zyz *, go_rpy *);
+
+extern go_result go_zyx_rvec_convert(const go_zyx *, go_rvec *);
+extern go_result go_zyx_quat_convert(const go_zyx *, go_quat *);
+extern go_result go_zyx_mat_convert(const go_zyx *, go_mat *);
+extern go_result go_zyx_zyz_convert(const go_zyx *, go_zyz *);
+extern go_result go_zyx_rpy_convert(const go_zyx *, go_rpy *);
+
+extern go_result go_rpy_rvec_convert(const go_rpy *, go_rvec *);
+extern go_result go_rpy_quat_convert(const go_rpy *, go_quat *);
+extern go_result go_rpy_mat_convert(const go_rpy *, go_mat *);
+extern go_result go_rpy_zyz_convert(const go_rpy *, go_zyz *);
+extern go_result go_rpy_zyx_convert(const go_rpy *, go_zyx *);
+
+/* combined rep conversion functions */
+
+extern go_result go_pose_hom_convert(const go_pose *, go_hom *);
+extern go_result go_hom_pose_convert(const go_hom *, go_pose *);
+
+/* translation functions, that work only with the preferred
+   go_cart type. Other types must be converted to go_cart
+   to use these, e.g., there's no go_sph_cyl_compare() */
+
+extern go_flag go_cart_cart_compare(const go_cart *, const go_cart *);
+extern go_result go_cart_cart_dot(const go_cart *, const go_cart *,
+				  go_real *);
+extern go_result go_cart_cart_cross(const go_cart *, const go_cart *,
+				    go_cart *);
+extern go_result go_cart_mag(const go_cart *, go_real *);
+extern go_result go_cart_cart_disp(const go_cart *, const go_cart *,
+				   go_real *);
+extern go_result go_cart_cart_add(const go_cart *, const go_cart *,
+				  go_cart *);
+extern go_result go_cart_cart_sub(const go_cart *, const go_cart *,
+				  go_cart *);
+extern go_result go_cart_scale_mult(const go_cart *, go_real, go_cart *);
+extern go_result go_cart_scale_div(const go_cart *, go_real, go_cart *);
+extern go_result go_cart_neg(const go_cart *, go_cart *);
+extern go_result go_cart_unit(const go_cart *, go_cart *);
+extern go_result go_cart_is_norm(const go_cart *);
+extern go_result go_cart_inv(const go_cart *, go_cart *);
+extern go_result go_cart_cart_proj(const go_cart *, const go_cart *,
+				   go_cart *);
+extern go_result go_cart_plane_proj(const go_cart *, const go_cart *,
+				    go_cart *);
+extern go_result go_cart_cart_angle(const go_cart *, const go_cart *,
+				    go_real *);
+extern go_result go_cart_centroid(const go_cart * varray,
+				  go_integer num,
+				  go_cart * centroid);
+extern go_result go_cart_centroidize(const go_cart * vinarray,
+				     go_integer num,
+				     go_cart * centroid,
+				     go_cart * voutarray);
+extern go_result go_cart_cart_pose(const go_cart *, const go_cart *,
+				   go_cart *, go_cart *,
+				   go_integer, go_pose *);
+
+/*!
+  Returns the Cartesian point \a p whose distances from three other points
+  \a c1, \a c2 and \a c3 are \a l1, \a l2 and \a l3, respectively. In
+  general there are 0, 1 or two points possible. If no point is possible,
+  this returns GO_RESULT_ERROR, otherwise the points are returned in \a
+  p1 and \a p2, which may be the same point.
+*/
+
+go_result go_cart_trilaterate(const go_cart * c1, 
+			      const go_cart * c2,
+			      const go_cart * c3,
+			      go_real l1,
+			      go_real l2,
+			      go_real l3,
+			      go_cart * p1,
+			      go_cart * p2);
+
+/* unit vector functions, which assume unit vectors as arguments. If they
+   aren't the results will be unexpected */
+
+extern go_result go_uvec_uvec_dot(const go_uvec *, const go_uvec *,
+				  go_real *);
+extern go_result go_uvec_uvec_angle(const go_uvec *, const go_uvec *,
+				    go_real *);
+
+/* quat functions */
+
+extern go_flag go_quat_quat_compare(const go_quat *, const go_quat *);
+extern go_result go_quat_mag(const go_quat *, go_real *);
+extern go_result go_quat_unit(const go_quat *, go_quat *);
+extern go_result go_quat_norm(const go_quat *, go_quat *);
+extern go_result go_quat_inv(const go_quat *, go_quat *);
+extern go_result go_quat_is_norm(const go_quat *);
+extern go_result go_quat_scale_mult(const go_quat *, go_real, go_quat *);
+extern go_result go_quat_scale_div(const go_quat *, go_real, go_quat *);
+extern go_result go_quat_quat_mult(const go_quat *, const go_quat *,
+				   go_quat *);
+extern go_result go_quat_cart_mult(const go_quat *, const go_cart *,
+				   go_cart *);
+
+/* rotation vector functions */
+
+extern go_flag go_rvec_rvec_compare(const go_rvec * r1, const go_rvec * r2);
+extern go_result go_rvec_scale_mult(const go_rvec *, go_real, go_rvec *);
+extern go_result go_rvec_scale_div(const go_rvec *, go_real, go_rvec *);
+extern go_result go_rvec_is_norm(const go_rvec *);
+extern go_result go_rvec_norm(const go_rvec *, go_rvec *);
+
+/* rotation matrix functions */
+
+/*        |  m.x.x   m.y.x   m.z.x  |   */
+/*   M =  |  m.x.y   m.y.y   m.z.y  |   */
+/*        |  m.x.z   m.y.z   m.z.z  |   */
+
+extern go_result go_mat_norm(const go_mat *, go_mat *);
+extern go_result go_mat_is_norm(const go_mat *);
+extern go_result go_mat_inv(const go_mat *, go_mat *);
+extern go_result go_mat_cart_mult(const go_mat *, const go_cart *, go_cart *);
+extern go_result go_mat_mat_mult(const go_mat *, const go_mat *, go_mat *);
+
+/* pose functions*/
+
+extern go_flag go_pose_pose_compare(const go_pose *, const go_pose *);
+extern go_result go_pose_inv(const go_pose *, go_pose *);
+extern go_result go_pose_cart_mult(const go_pose *, const go_cart *,
+				   go_cart *);
+extern go_result go_pose_pose_mult(const go_pose *, const go_pose *,
+				   go_pose *);
+
+/* homogeneous transform functions */
+
+extern go_result go_hom_inv(const go_hom *, go_hom *);
+
+/* declarations for general MxN matrices */
+
+/*!
+  Declare a matrix variable \a m with \a rows rows and \a cols columns.
+  Allocates \a rows X \a columns of space in \a mspace.
+*/
+
+typedef go_real go_vector;
+
+typedef struct {
+  go_integer rows;
+  go_integer cols;
+  go_real ** el;
+  go_real ** elcpy;
+  go_real * v;
+  go_integer * index;
+} go_matrix;
+
+#define GO_MATRIX_DECLARE(M,Mspace,_rows,_cols) \
+go_matrix M = {0, 0, 0, 0, 0, 0}; \
+struct { \
+  go_real * el[_rows]; \
+  go_real * elcpy[_rows]; \
+  go_real stg[_rows][_cols]; \
+  go_real stgcpy[_rows][_cols]; \
+  go_real v[_rows]; \
+  go_integer index[_rows]; \
+} Mspace
+
+#define go_matrix_init(M,Mspace,_rows,_cols) \
+M.el = Mspace.el;				    \
+M.elcpy = Mspace.elcpy;				    \
+for (M.rows = 0; M.rows < (_rows); M.rows++) { \
+  M.el[M.rows] = Mspace.stg[M.rows];	    \
+  M.elcpy[M.rows] = Mspace.stgcpy[M.rows];	    \
+} \
+M.rows = (_rows); \
+M.cols = (_cols); \
+M.v = Mspace.v; \
+M.index = Mspace.index
+
+extern go_result
+go_set_singular_epsilon(go_real epsilon);
+
+extern go_result
+ludcmp(go_real ** a,
+       go_real * scratchrow,
+       go_integer n,
+       go_integer * indx,
+       go_real * d);
+
+extern go_result
+lubksb(go_real ** a,
+       go_integer n,
+       go_integer * indx,
+       go_real * b);
+
+/* MxN matrix, Mx1 vector functions */
+
+extern go_result
+go_cart_vector_convert(const go_cart * c,
+		       go_vector * v);
+extern go_result
+go_vector_cart_convert(const go_real * v,
+		       go_cart * c);
+
+extern go_result
+go_quat_matrix_convert(const go_quat * quat,
+		      go_matrix * matrix);
+
+extern go_result
+go_mat_matrix_convert(const go_mat * mat,
+		      go_matrix * matrix);
+
+extern go_result
+go_matrix_matrix_add(const go_matrix * a,
+		     const go_matrix * b,
+		     go_matrix * apb);
+
+extern go_result
+go_matrix_matrix_copy(const go_matrix * src,
+		      go_matrix * dst);
+
+extern go_result
+go_matrix_matrix_mult(const go_matrix * a,
+		      const go_matrix * b,
+		      go_matrix * ab);
+
+extern go_result
+go_matrix_vector_mult(const go_matrix * a,
+		      const go_vector * v,
+		      go_vector * av);
+
+/*!
+  The matrix-vector cross product is a matrix of the same dimension,
+  whose columns are the column-wise cross products of the matrix
+  and the vector. The matrices must be 3xN, the vector 3x1.
+*/
+extern go_result
+go_matrix_vector_cross(const go_matrix * a,
+		       const go_vector * v,
+		       go_matrix * axv);
+
+extern go_result
+go_matrix_transpose(const go_matrix * a,
+		    go_matrix * at);
+
+extern go_result
+go_matrix_inv(const go_matrix * a,
+	      go_matrix * ainv);
+
+/* Square matrix functions, where matN is an NxN matrix, and vecN
+   is an Nx1 vector */
+
+/*!
+  Given a 6x6 matrix \a a, computes the inverse and returns it in
+  \a ainv. Leaves \a a untouched. Returns GO_RESULT_OK if there is an
+  inverse, else GO_RESULT_SINGULAR if the matrix is singular.
+*/
+extern go_result go_mat6_inv(const go_real a[6][6],
+			     go_real ainv[6][6]);
+
+/*!
+  Given two 6x6 matrices \a a and \a b, multiplies them and returns
+  the result in \a axb. Leaves \a a and \a b untouched.
+  Returns GO_RESULT_OK.
+*/
+extern go_result go_mat6_mat6_mult(const go_real a[6][6],
+				   const go_real b[6][6],
+				   go_real axb[6][6]);
+
+/*!
+  Given a 6x6 matrix \a a and a 6x1 vector \a v, multiplies them
+  and returns the result in \a axv. Leaves \a a and \a v untouched.
+  Returns GO_RESULT_OK.
+*/
+extern go_result go_mat6_vec6_mult(const go_real a[6][6],
+				   const go_real v[6],
+				   go_real axv[6]);
+
+/* Denavit-Hartenberg to pose conversions */
+
+/*
+  The link frams is assumed to be
+
+  | i-1
+  |    T
+  |   i
+
+  that is, elements of the link frame expressed wrt the
+  previous link frame.
+*/
+
+/*!
+  These DH parameters follow the convention in John J. Craig,
+  _Introduction to Robotics: Mechanics and Control_.
+*/
+typedef struct {
+  go_real a;			/*< a[i-1] */
+  go_real alpha;		/*< alpha[i-1] */
+  go_real d;			/*< d[i] */
+  go_real theta;		/*< theta[i] */
+} go_dh;
+
+/*!
+  PK parameters are used for parallel kinematic mechanisms, and
+  represent the Cartesian positions of the ends of the link in the
+  stationary base frame and the moving platform frame.
+ */
+typedef struct {
+  go_cart base;			/*< position of fixed end in base frame */
+  go_cart platform;		/*< position of moving end in platform frame  */
+} go_pk;
+
+/*!
+  PP parameters represent the pose of the link with respect to the
+  previous link, with \a prismatic non-zero for prismatic links
+  and zero for revolute links. Prismatic joints are assumed to
+  move along the Z axis, revolute joints about the Z axis.
+ */
+typedef struct {
+  go_pose pose;		/* e.g., from go_dh_pose_convert */
+} go_pp;
+
+/*! Types of link parameter representations  */
+enum {
+  GO_LINK_DH = 1,		/*< for Denavit-Hartenberg params  */
+  GO_LINK_PK,			/*< for parallel kinematics  */
+  GO_LINK_PP			/*< for serial kinematics */
+};
+
+/*!
+  This is the generic link structure for PKM sliding/cable links and 
+  serial revolute/prismatic links.
+ */
+typedef struct {
+  union {
+    go_dh dh; /*< if you have DH params and don't want to convert to PP */
+    go_pk pk; /*< if you have a parallel machine, e.g., hexapod or robot crane */
+    go_pp pp; /*< if you have a serial machine, e.g., an industrial robot  */
+  } u;
+  go_flag type;			/*< one of GO_LINK_DH,PK,PP  */
+  go_flag quantity;		/*< one of GO_QUANTITY_LENGTH,ANGLE */
+} go_link;
+
+/*!
+  Converts DH parameters in \a dh to their pose equivalent, stored
+  in \a pose.
+ */
+extern go_result go_dh_pose_convert(const go_dh * dh, go_pose * pose);
+
+/*!
+  Converts \a pose to the equivalent DH parameters, stored in \a dh.
+  Warning! Conversion from these DH parameters back to a pose via \a
+  go_dh_pose_convert will NOT in general result in the same
+  pose. Poses have 6 degrees of freedom, DH parameters have 4, and
+  conversion to DH parameters loses some information. The source of
+  this information loss is the convention imposed on DH parameters for
+  choice of X-Y-Z axis directions. With poses, there is no such
+  convention, and poses are thus freer than DH parameters.
+ */
+extern go_result go_pose_dh_convert(const go_pose * pose, go_dh * dh);
+
+/*
+  Fixes the pose in PP parameters \a pp to its value when the joint
+  variable is \a joint, storing the result in \a ppout. \a pp
+  represents the pose when the joint value is 0, its origin; \a ppout
+  represents the pose at an arbitrary joint value.
+*/
+extern go_result go_link_joint_set(const go_link * link, go_real joint, go_link * linkout);
+
+typedef struct {
+  go_real re;
+  go_real im;
+} go_complex;
+
+extern go_complex go_complex_add(go_complex z1, go_complex z2);
+extern go_complex go_complex_sub(go_complex z1, go_complex z2);
+extern go_complex go_complex_mult(go_complex z1, go_complex z2);
+extern go_complex go_complex_div(go_complex z1, go_complex z2, go_result * result);
+extern go_complex go_complex_scale(go_complex z, go_real scale);
+extern go_real go_complex_mag(go_complex z);
+extern go_real go_complex_arg(go_complex z);
+extern void go_complex_sqrt(go_complex z, go_complex * z1, go_complex * z2);
+extern void go_complex_cbrt(go_complex z, go_complex * z1, go_complex * z2, go_complex * z3);
+
+typedef struct {
+  /* leading coefficient is 1, x^2 + ax + b = 0 */
+  go_real a;
+  go_real b;
+} go_quadratic;
+
+typedef struct {
+  /* leading coefficient is 1, x^3 + ax^2 + bx + c = 0 */
+  go_real a;
+  go_real b;
+  go_real c;
+} go_cubic;
+
+typedef struct {
+  /* leading coefficient is 1, x^4 + ax^3 + bx^2 + cx + d = 0 */
+  go_real a;
+  go_real b;
+  go_real c;
+  go_real d;
+} go_quartic;
+
+extern go_result go_quadratic_solve(const go_quadratic * quad,
+				    go_complex * z1,
+				    go_complex * z2);
+
+extern go_result go_cubic_solve(const go_cubic * cub,
+				go_complex * z1,
+				go_complex * z2,
+				go_complex * z3);
+
+extern go_result go_quartic_solve(const go_quartic * quart,
+				  go_complex * z1,
+				  go_complex * z2,
+				  go_complex * z3,
+				  go_complex * z4);
+
+extern go_result go_tridiag_reduce(go_real ** a,
+				   go_integer n,
+				   go_real * d,
+				   go_real * e);
+
+extern go_result go_tridiag_ql(go_real * d,
+			       go_real * e,
+			       go_integer n,
+			       go_real ** z);
+
+#endif /* GO_MATH_H */
+
+/*
+  $Log: gomath.h,v $
+  Revision 1.1  2007/05/09 15:19:06  proctor
+  Added the math source files from go motion, and changed the Makefile.am
+  so that robojoy links these in.
+
+  Revision 1.27  2007/05/08 21:10:20  proctor
+  Reworked the handling of kinematic parameters, taking them out of the TRAJ
+  section and putting them in the SERVO sections as DH,PP,PK_PARAMETERS
+  and getting rid of unit handling-- now everything is converted to Go units
+  before sending to Go.
+
+  Revision 1.26  2007/05/04 15:20:24  proctor
+  Comments on go_link
+
+  Revision 1.25  2007/05/04 13:06:04  proctor
+  Added comments on go_dh, go_pp and put in placeholders for go_pk and go_link
+
+  Revision 1.24  2007/05/01 18:24:03  proctor
+  Added go_cart_rpy,uvec convert functions
+
+  Revision 1.23  2007/04/27 17:33:28  proctor
+  Added go_set_singular_epsilon, and verified gojactest.c works and builds
+  inverses for all three cases
+
+  Revision 1.22  2007/04/26 21:37:19  proctor
+  Added gojactest.c and conversions between go_quat and go_matrix
+
+  Revision 1.21  2007/04/24 23:10:08  proctor
+  Used new go_matrix structure
+
+  Revision 1.20  2007/04/24 15:19:51  proctor
+  Added general matrix functions
+
+  Revision 1.19  2006/12/22 13:48:57  proctor
+  Added traj_ref setup, but not handling-- still need to run the calculations
+  in do_cmd_move_world, and this will wait until we get time for testing
+
+  Revision 1.18  2006/11/22 15:36:15  proctor
+  Fixed sqrt check on mat to quat convert, to fix problems in puma kins
+
+  Revision 1.17  2006/11/20 17:39:28  proctor
+  Took out RC matrix index macro in place of [][] notation
+
+  Revision 1.16  2006/11/16 18:48:23  proctor
+  Fixed unix rtapi_arg bug with string malloc
+
+  Revision 1.15  2006/11/14 14:02:48  proctor
+  Added roboch stuff
+
+  Revision 1.14  2006/11/08 21:28:25  proctor
+  Added roboch Robocrane-Horizontal code, and updates to gomath for the
+  trilateration functions. Also made the comparison values coarser.
+
+  Revision 1.13  2006/10/31 21:19:07  proctor
+  Completed go_pose_cart_mult, adding go_tridiag functions
+
+  Revision 1.12  2006/10/10 14:24:35  proctor
+  Replaced the original go_traj_cj_compute with one that had the correct
+  two checks for the existence of an acceleration phase, and split out the
+  code into smaller easy pieces. Moved go_sq,cub,qua into gomath.h.
+
+  Revision 1.11  2006/10/07 19:38:05  proctor
+  Put go_cbrt in gomath.c,h, took out of gotraj.c
+
+  Revision 1.10  2006/09/20 19:55:41  proctor
+  Fixed bug in go_cubic_solve where values that should be complex conjugates weren't,
+  and complex roots of scalars were being used.
+
+  Revision 1.9  2006/09/18 20:17:58  proctor
+  Added beginnings of absolute orientation, namely complex number handling
+  and quadratic, cubic solving in gomath.c
+
+  Revision 1.8  2006/09/07 13:50:50  proctor
+  Fixed stepper motor interface, and added deadband to PID.
+
+  Revision 1.7  2006/07/25 14:36:25  proctor
+  Changed go_rot to go_rvec
+
+  Revision 1.6  2006-07-24 21:57:55  proctor
+  In gomath, added Denavit-Hartenberg/pose conversion functions;
+  in rtai, added some stepper-related changes
+
+*/
+

Added: moast-bth/moast/include/gotypes.h
===================================================================
--- moast-bth/moast/include/gotypes.h	                        (rev 0)
+++ moast-bth/moast/include/gotypes.h	2007-07-11 16:33:26 UTC (rev 650)
@@ -0,0 +1,225 @@
+#ifndef GO_TYPES_H
+#define GO_TYPES_H
+
+#include <float.h>		/* DBL_MAX, FLOAT_MAX */
+#include <limits.h>		/* INT_MAX */
+
+/*
+  Primitive types: go_result, go_real, go_integer, go_flag
+
+  These are intended to make smaller or faster versions of the Go
+  library, or to reflect processor architectures. The defaults are
+  usually fine and nothing should need to be overridden.
+
+  If you do override these when compiling your code, you run the
+  risk that the Go library you link with will have been compiled
+  with other choices. To detect this at link time, references to
+  global variables such as 'go_integer_int' will be compiled into
+  your code by the 'go_init()' macro. If they are not present in the
+  Go library, the linker will complain and your application will fail
+  to build. For example, if you override the definition for go_integer
+  to be a long int, and link with a precompiled default version of the
+  Go library, you will see something like this:
+
+  gcc yourapp.c -DGO_INTEGER_LONG -lgo -lm -o yourapp
+  ...
+  In function `main':
+  .../yourapp.c:10: undefined reference to `go_integer_long'
+
+  The fix is to recompile the entire Go library with your override
+  settings, e.g.,
+
+  cd .../go
+  make clean
+  make CFLAGS+=-DGO_INTEGER_LONG all
+
+  You should probably save the resulting non-default Go library
+  as something else and recompile Go with the defaults, e.g.,
+
+  mv libgo.a libgofast.a
+  make clean
+  make all
+
+  You'll then compile your application like this:
+
+  gcc yourapp.c -DGO_INTEGER_LONG -lgofast -lm -o yourapp
+
+  Type descriptions:
+
+  go_result is the type for error codes returned from functions,
+  one of the types in GO_RESULT_OK, ... as defined in the enum below.
+  The default value is 'int'. Override at compile time with one of:
+  
+  GO_RESULT_CHAR
+  GO_RESULT_SHORT
+  GO_RESULT_INT
+
+  e.g., -DGO_RESULT_CHAR
+
+  go_real is the type for real-valued numbers. The default value
+  is 'double'. Override at compile time with one of:
+
+  GO_REAL_FLOAT
+  GO_REAL_DOUBLE
+  GO_REAL_LONG_DOUBLE
+
+  e.g., -DGO_REAL_FLOAT
+
+  go_integer is the type for signed integers. The default value
+  is 'int'. Override at compile time with one of:
+
+  GO_INTEGER_SHORT
+  GO_INTEGER_INT
+  GO_INTEGER_LONG
+  GO_INTEGER_LONG_LONG
+
+  e.g., -DGO_INTEGER_LONG_LONG
+
+  go_flag is the type for small non-negative flags. The default
+  value is 'unsigned char'. Override at compile time with one of:
+
+  GO_FLAG_UCHAR
+  GO_FLAG_USHORT
+  GO_FLAG_UINT
+
+  e.g., -DGO_FLAG_UINT
+*/
+
+/* go_result: char, short, default int */
+
+#if defined(GO_RESULT_CHAR)
+typedef char go_result;
+#define GO_RESULT go_result_char
+extern int go_result_char;
+
+#elif defined(GO_RESULT_SHORT)
+typedef short int go_result;
+#define GO_RESULT go_result_short
+extern int go_result_short;
+
+#else
+#define GO_RESULT_INT
+typedef int go_result;
+#define GO_RESULT go_result_int
+extern int go_result_int;
+#endif
+
+/*!
+  GO_RESULT symbols run through a small range of values, on the
+  order of tens, suitable for a byte.  GO_RESULT_OK is zero for easy
+  detection of error conditions, e.g., if (result) { handle error }
+*/
+enum {
+  GO_RESULT_OK = 0,
+  GO_RESULT_IGNORED,		/* action can't be done, ignored */
+  GO_RESULT_BAD_ARGS,		/* arguments bad, e.g., null pointer */
+  GO_RESULT_RANGE_ERROR,	/* supplied range value out of bounds */
+  GO_RESULT_DOMAIN_ERROR,	/* resulting domain out of bounds */
+  GO_RESULT_ERROR,		/* action can't be done, a problem */
+  GO_RESULT_IMPL_ERROR,		/* function not implemented */
+  GO_RESULT_NORM_ERROR,		/* a value is expected to be normalized */
+  GO_RESULT_DIV_ERROR,		/* divide by zero */
+  GO_RESULT_SINGULAR,		/* a matrix is singular */
+  GO_RESULT_NO_SPACE,		/* no space for append operation */
+  GO_RESULT_EMPTY,		/* data structure is empty */
+  GO_RESULT_BUG			/* a bug in Go, e.g., unknown case */
+};
+
+/*!
+  Joints are characterized by the quantities they affect, such as
+  length for linear joints and angle for rotary joints.
+*/
+enum {
+  GO_QUANTITY_LENGTH = 1,
+  GO_QUANTITY_ANGLE
+};
+
+#define go_quantity_to_string(q) (q) == GO_QUANTITY_LENGTH ? "Length" : (q) == GO_QUANTITY_ANGLE ? "Angle" : "?"
+
+/* go_real: float, long double, default double; GO_INF is defined as
+ the associated max value from float.h */
+
+/*
+  In IEEE floating point,
+
+  FLT_MIN = 1.175494e-38, FLT_EPSILON 1.192093e-07
+  DBL_MIN = 2.225074e-308, DBL_EPSILON 2.220446e-16
+*/
+
+#if defined(GO_REAL_FLOAT)
+typedef float go_real;
+#define GO_REAL go_real_float
+extern int go_real_float;
+#define GO_REAL_MIN FLT_MIN
+#define GO_REAL_MAX FLT_MAX
+#define GO_REAL_EPSILON (1.0e-4)
+#define GO_INF FLT_MAX
+
+#elif defined(GO_REAL_LONG_DOUBLE)
+typedef long double go_real;
+#define GO_REAL go_real_long_double
+extern int go_real_long_double;
+#define GO_REAL_MIN DBL_MIN
+#define GO_REAL_MAX DBL_MAX
+#define GO_REAL_EPSILON (1.0e-10)
+#define GO_INF DBL_MAX
+
+#else
+#define GO_REAL_DOUBLE
+typedef double go_real;
+#define GO_REAL go_real_double
+extern int go_real_double;
+#define GO_REAL_MIN DBL_MIN
+#define GO_REAL_MAX DBL_MAX
+#define GO_REAL_EPSILON (1.0e-7)
+#define GO_INF DBL_MAX
+#endif
+
+/* go_integer: short, long, long long, default int */
+
+#if defined(GO_INTEGER_SHORT)
+typedef short int go_integer;
+#define GO_INTEGER go_integer_short
+extern int go_integer_short;
+#define GO_INTEGER_MAX SHRT_MAX
+
+#elif defined(GO_INTEGER_LONG)
+typedef long int go_integer;
+#define GO_INTEGER go_integer_long
+extern int go_integer_long;
+#define GO_INTEGER_MAX LONG_MAX
+
+#elif defined(GO_INTEGER_LONG_LONG)
+typedef long long int go_integer;
+#define GO_INTEGER go_integer_long_long
+extern int go_integer_long_long;
+#define GO_INTEGER_MAX LONG_MAX
+
+#else
+#define GO_INTEGER_INT
+typedef int go_integer;
+#define GO_INTEGER go_integer_int
+extern int go_integer_int;
+#define GO_INTEGER_MAX INT_MAX
+#endif
+
+/* go_flag: unsigned short, unsigned int, default unsigned char */
+
+#if defined(GO_FLAG_USHORT)
+typedef unsigned short go_flag;
+#define GO_FLAG go_flag_ushort
+extern int go_flag_ushort;
+
+#elif defined(GO_FLAG_UINT)
+typedef unsigned int go_flag;
+#define GO_FLAG go_flag_uint
+extern int go_flag_uint;
+
+#else
+#define GO_FLAG_UCHAR
+typedef unsigned char go_flag;
+#define GO_FLAG go_flag_uchar
+extern int go_flag_uchar;
+#endif
+
+#endif /* GO_TYPES_H */

Modified: moast-bth/moast/include/moastNmlGlobal.hh
===================================================================
--- moast-bth/moast/include/moastNmlGlobal.hh	2007-07-11 16:23:30 UTC (rev 649)
+++ moast-bth/moast/include/moastNmlGlobal.hh	2007-07-11 16:33:26 UTC (rev 650)
@@ -17,8 +17,8 @@
 
   \code CVS Status:
   $Author: dr_steveb $
-  $Revision: 1.9 $
-  $Date: 2006/10/31 09:30:41 $
+  $Revision: 1.10 $
+  $Date: 2007/06/28 12:14:12 $
   \endcode
 
   \author Fred Proctor
@@ -76,27 +76,57 @@
 
 extern NML *symbolicDataBuf[NUM_SYMBOLIC_DATA_BUFFERS];
 
+#if NUM_NAV_DATA_EXT_BUFFERS
 extern NML *navDataExtBuf[NUM_NAV_DATA_EXT_BUFFERS];
+#else
+extern NML *navDataExtBuf;
+#endif
 
+#if NUM_SERVO_SP_LINESCAN_BUFFERS
 extern NML *servoSPLinescanBuf[NUM_SERVO_SP_LINESCAN_BUFFERS];
+#else
+extern NML *servoSPLinescanBuf;
+#endif
+
 extern NML *primSPLinescanBuf[NUM_PRIM_SP_LINESCAN_BUFFERS];
 extern NML *amSPMapBuf[NUM_AM_SP_MAP_BUFFERS];
 extern NML *vehMapBuf[NUM_VEH_MOB_PL_BUFFERS];
 
+#if NUM_SERVO_MOB_JA_BUFFERS
 extern RCS_CMD_CHANNEL *servoMobJACmdBuf[NUM_SERVO_MOB_JA_BUFFERS];
 extern RCS_CMD_CHANNEL *servoMobJACfgBuf[NUM_SERVO_MOB_JA_BUFFERS];
 extern RCS_STAT_CHANNEL *servoMobJAStatBuf[NUM_SERVO_MOB_JA_BUFFERS];
 extern RCS_STAT_CHANNEL *servoMobJASetBuf[NUM_SERVO_MOB_JA_BUFFERS];
+#else
+extern RCS_CMD_CHANNEL *servoMobJACmdBuf;
+extern RCS_CMD_CHANNEL *servoMobJACfgBuf;
+extern RCS_STAT_CHANNEL *servoMobJAStatBuf;
+extern RCS_STAT_CHANNEL *servoMobJASetBuf;
+#endif
 
+#if NUM_SERVO_SP_BUFFERS
 extern RCS_CMD_CHANNEL *servoSPCmdBuf[NUM_SERVO_SP_BUFFERS];
 extern RCS_STAT_CHANNEL *servoSPStatBuf[NUM_SERVO_SP_BUFFERS];
 extern RCS_STAT_CHANNEL *servoSPSetBuf[NUM_SERVO_SP_BUFFERS];
 extern RCS_CMD_CHANNEL *servoSPCfgBuf[NUM_SERVO_SP_BUFFERS];
+#else
+extern RCS_CMD_CHANNEL *servoSPCmdBuf;
+extern RCS_STAT_CHANNEL *servoSPStatBuf;
+extern RCS_STAT_CHANNEL *servoSPSetBuf;
+extern RCS_CMD_CHANNEL *servoSPCfgBuf;
+#endif
 
+#if NUM_SERVO_MIS_JA_BUFFERS
 extern RCS_CMD_CHANNEL *servoMisJACmdBuf[NUM_SERVO_MIS_JA_BUFFERS];
 extern RCS_STAT_CHANNEL *servoMisJAStatBuf[NUM_SERVO_MIS_JA_BUFFERS];
 extern RCS_STAT_CHANNEL *servoMisJASetBuf[NUM_SERVO_MIS_JA_BUFFERS];
 extern RCS_CMD_CHANNEL *servoMisJACfgBuf[NUM_SERVO_MIS_JA_BUFFERS];
+#else
+extern RCS_CMD_CHANNEL *servoMisJACmdBuf;
+extern RCS_STAT_CHANNEL *servoMisJAStatBuf;
+extern RCS_STAT_CHANNEL *servoMisJASetBuf;
+extern RCS_CMD_CHANNEL *servoMisJACfgBuf;
+#endif
 
 extern RCS_CMD_CHANNEL *primMobJACmdBuf[NUM_PRIM_MOB_JA_BUFFERS];
 extern RCS_STAT_CHANNEL *primMobJAStatBuf[NUM_PRIM_MOB_JA_BUFFERS];
@@ -160,6 +190,9 @@
   Modification history:
 
   $Log: moastNmlGlobal.hh,v $
+  Revision 1.10  2007/06/28 12:14:12  dr_steveb
+  Removed 0 length arrays that Microsoft compiliers complain about
+
   Revision 1.9  2006/10/31 09:30:41  dr_steveb
   Changes for SPQR integration
 

Modified: moast-bth/moast/include/moastTypes.hh
===================================================================
--- moast-bth/moast/include/moastTypes.hh	2007-07-11 16:23:30 UTC (rev 649)
+++ moast-bth/moast/include/moastTypes.hh	2007-07-11 16:33:26 UTC (rev 650)
@@ -16,8 +16,8 @@
 
   \code CVS Status:
   $Author: dr_steveb $
-  $Revision: 1.6 $
-  $Date: 2007/04/25 15:08:57 $
+  $Revision: 1.8 $
+  $Date: 2007/06/28 12:02:35 $
   \endcode
 
   \author Fred Proctor
@@ -26,6 +26,7 @@
 #ifndef MOAST_TYPES_HH
 #define MOAST_TYPES_HH
 
+#include <stdio.h> // FILE, fprintf
 #include <rcs.hh>		// RCS_STAT_SOURCE_FILE_LEN
 #include <posemath.h>		// PM_CARTESIAN
 
@@ -82,13 +83,45 @@
 };
 
 //! 2-D location structure
-typedef struct {
+class Location2D
+{
+public:
+  Location2D(){};
   //! the north location of the point
   double north;
   //! the east location of the point
   double east;
-}Location2D;
 
+  Location2D(const Location2D &copyIn) // copy constructor to handle pass by value
+  {
+    north = copyIn.north;
+    east = copyIn.east;
+  };
+
+  Location2D& operator=(const Location2D &rhs)
+  {
+    this->north = rhs.north;
+    this->east = rhs.east;
+    return *this;
+  };
+
+  int operator==(const Location2D &rhsIn) const
+  {
+    if( this->north!=rhsIn.north || this->east!=rhsIn.east )
+      return 0;
+    else
+      return 1;
+  };
+
+// sort by (increasing north, decreasing east)
+  int operator<(const Location2D &rhs) const
+  {
+    if( this->north == rhs.north && this->east > rhs.east ) return 1; // make (0,4) come before (0,0)
+    if( this->north < rhs.north ) return 1;
+    return 0;
+  };
+};
+
 //! A directed line segment may be represented by its two endpoints
 class LineSegment
 {
@@ -112,11 +145,40 @@
     end.north = north;
     end.east = east;
   };
+  void print(FILE *output=stdout)
+  {
+    fprintf( output, "%f %f\n%f %f\n\n",
+	     start.north, start.east,
+	     end.north, end.east );
+  };
   Location2D start;
   Location2D end;
   long properties; //!< a pointer that points to a properties structure for this line
 };
 
+/*
+  An ArcSegment is a path from an implicit start location to an end
+  location, along a circular arc. In a 2-D problem, the Z values are
+  ignored, and the normal vector is assumed to be +Z. 
+*/
+typedef struct {
+  PM_CARTESIAN center;		// coords of center
+  PM_CARTESIAN end;		// coords of end
+  PM_CARTESIAN normal;		// normal vector
+  // nominal angular displacement about normal from implicit start to end
+  double theta;
+  // tolerance along path, difference between outer and inner radius
+  double annular_tol;
+  // speed along the segment; acceleration is a system-wide parameter
+  double speed;
+  int isArc;			// 1 means arc, 0 means line, use 'end'
+} ArcSegment;
+
+//! define conventions for rotations
+enum {MOAST_ROTATE_CW, // force clockwise rotation
+      MOAST_ROTATE_CCW, // force counter-clockwise rotation
+      MOAST_ROTATE_SHORTEST}; // take shortest rotation
+
 //! Constrained interger structure
 typedef struct {
   //! integer value that will be constrained
@@ -165,6 +227,12 @@
 
 /*
   $Log: moastTypes.hh,v $
+  Revision 1.8  2007/06/28 12:02:35  dr_steveb
+  Changed location2d into a class from a structure
+
+  Revision 1.7  2007/05/10 13:15:31  dr_steveb
+  Moved rotation and arcSegment declaration from primMobJA to moastTypes so that multiple apps can use them.
+
   Revision 1.6  2007/04/25 15:08:57  dr_steveb
   Added traffic simulation files
 

Added: moast-bth/moast/include/primMobEngine.hh
===================================================================
--- moast-bth/moast/include/primMobEngine.hh	                        (rev 0)
+++ moast-bth/moast/include/primMobEngine.hh	2007-07-11 16:33:26 UTC (rev 650)
@@ -0,0 +1,188 @@
+/*
+  DISCLAIMER:
+  This software was produced by the National Institute of Standards
+  and Technology (NIST), an agency of the U.S. government, and by statute is
+  not subject to copyright in the United States.  Recipients of this software
+  assume all responsibility associated with its operation, modification,
+  maintenance, and subsequent redistribution.
+
+  See NIST Administration Manual 4.09.07 b and Appendix I. 
+*/
+
+/*!
+  \file primMobEngine.hh
+
+  \brief Vehicle primitive level planning engine
+
+  \code CVS Status:
+  $Author: dr_steveb $
+  $Revision: 1.2 $
+  $Date: 2007/05/16 15:16:21 $
+  \endcode
+
+  \author Stephen Balakirsky & Fred Proctor
+*/
+#ifndef __primMobEngine__
+#define __primMobEngine__
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#include <stdio.h>
+#include <stddef.h>		// sizeof(), NULL
+#include <stdlib.h>		// getenv(), strtol()
+#include <signal.h>		// SIGINT, signal()
+#include <ctype.h>
+#include <string.h>		// strncpy
+#include <math.h>		// sqrt(), fabs(), atan2()
+#include <float.h>		// FLT_EPSILON
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+#include "getopt.h"
+#endif
+#include <rcs.hh>
+#ifndef RCS_STAT_SOURCE_FILE_LEN
+#define RCS_STAT_SOURCE_FILE_LEN 64
+#endif
+#include "moastTypes.hh"	// MOAST_NML_BUFFER_NAME_LEN
+
+#define DEG(x) (57.295779513082323 * (x))
+#define RAD(x)  (0.017453292519943 * (x))
+
+#define LOG_FILE "out.log"
+/*
+  In IEEE floating point,
+
+  FLT_MIN = 1.175494e-38, FLT_EPSILON 1.192093e-07
+  DBL_MIN = 2.225074e-308, DBL_EPSILON 2.220446e-16
+
+  The FLT_EPSILON value makes a good fuzzy comparison for the
+  equality of two reals.
+*/
+
+#define IS_SMALL(x) (fabs(x) < FLT_EPSILON)
+#define IS_POSITIVE(x) ((x) >= FLT_EPSILON)
+#define WAYPOINT_INITIAL_SIZE MAX_WAYPOINTS // how many waypoints we start with
+#define HYPOT(x,y) sqrt((x)*(x)+(y)*(y))
+// force angles to be in range [-Pi..Pi)
+#define NORM(x) while ((x) >= PM_PI) (x) -= PM_2_PI; while ((x) < -PM_PI) (x) += PM_2_PI
+
+
+#define DEFAULT_CYCLE_TIME 0.050
+#define DEFAULT_MAX_TRAN_VEL 1.0 // m/s
+#define DEFAULT_MAX_TRAN_ACC 1.0 // m/s/s
+#define DEFAULT_MAX_ROT_VEL 1.0	// rad/s
+#define DEFAULT_MAX_ROT_ACC 1.0 // rad/s/s
+#define DEFAULT_V_CUTOFF_ANGLE 1.0 // rad
+#define DEFAULT_W_CUTOFF_ANGLE 1.0 // rad
+#define DEFAULT_DEBUG 0
+
+class PrimMobEngine{
+ private:
+  // computationally efficient values from wheel radius, separation
+  double v, w; // angular and linear velocities
+  double wheel_radius;
+  double wheel_radius_inverse;
+  double wheel_separation;
+  double wheel_separation_half;
+  int waypoint_size;	// size of whole array
+  int waypoint_num;	// how many currently in the array
+  int waypoint_index;	// which one we're working on

@@ Diff output truncated at 60000 characters. @@


More information about the TeamTalk-developers mailing list