[TeamTalk 361]: [897] trunk/usarsim: 1) Added smith animations and textures to linux build

tk@edam.speech.cs.cmu.edu tk at edam.speech.cs.cmu.edu
Fri Jan 11 12:23:00 EST 2008


An HTML attachment was scrubbed...
URL: http://mailman.srv.cs.cmu.edu/pipermail/teamtalk-developers/attachments/20080111/efcb1c6b/attachment.html
-------------- next part --------------
Modified: trunk/usarsim/System/Makefile
===================================================================
--- trunk/usarsim/System/Makefile	2008-01-10 20:41:52 UTC (rev 896)
+++ trunk/usarsim/System/Makefile	2008-01-11 17:22:59 UTC (rev 897)
@@ -20,6 +20,10 @@
 
 INSTALL_MAPS=$(INSTALL_SYS)/../Maps/DM-RoboticsLab_250.ut2
 
+ANIMATIONS=../Animations/smith.ukx
+
+INSTALL_ANIMATIONS=$(INSTALL_SYS)/../Animations/smith.ukx
+
 INIS=../System/USARSim.ini ../System/TreasureHunt.ini
 
 INSTALL_INIS=$(INSTALL_SYS)/../System/USARSim.ini \
@@ -29,9 +33,11 @@
 
 INSTALL_BATCH=$(INSTALL_SYS)/../System/usar_sx.sh
 
-TEXTURES=../Textures/TreasureHuntTex.utx
+TEXTURES=../Textures/TreasureHuntTex.utx \
+         ../Textures/smithskins.utx
 
-INSTALL_TEXTURES=$(INSTALL_SYS)/../Textures/TreasureHuntTex.utx
+INSTALL_TEXTURES=$(INSTALL_SYS)/../Textures/TreasureHuntTex.utx \
+                 $(INSTALL_SYS)/../Textures/smithskins.utx
 
 STATICMESHES=../StaticMeshes/TreasureHuntMesh.usx
 
@@ -42,10 +48,10 @@
 build: $(PACKAGES) ucc
 
 install: $(INSTALL_MAPS) $(INSTALL_PACKAGES) $(INSTALL_INIS) $(INSTALL_BATCH) \
-         $(INSTALL_TEXTURES) $(INSTALL_STATICMESHES)
+         $(INSTALL_TEXTURES) $(INSTALL_STATICMESHES) $(INSTALL_ANIMATIONS)
 
 package:
-	cd $(INSTALL_DIR); echo $(PACKAGES) $(MAPS) $(TEXTURES) $(STATICMESHES) | sed 's/\.\.\///g' | xargs zip -u TreasureHuntSim.zip 
+	cd $(INSTALL_DIR); echo $(PACKAGES) $(MAPS) $(TEXTURES) $(STATICMESHES) $(ANIMATIONS) | sed 's/\.\.\///g' | xargs zip -u TreasureHuntSim.zip 
 
 $(INSTALL_DIR)/%:../%
 	cp -f $< $@

Modified: trunk/usarsim/USARBot/Classes/KRobot.uc
===================================================================
--- trunk/usarsim/USARBot/Classes/KRobot.uc	2008-01-10 20:41:52 UTC (rev 896)
+++ trunk/usarsim/USARBot/Classes/KRobot.uc	2008-01-11 17:22:59 UTC (rev 897)
@@ -800,6 +800,22 @@
 
                 JointParts[JointParts.length - 1].SelfPos = converter.LengthVectorToUU(-allMisPkgsLinks[i*allMisPkgs[i].Links.length+j].MaxRange * (Vect(0,0,-1) >> converter.RotatorToUU(allMisPkgsLinks[i*allMisPkgs[i].Links.length+j].getMountPointOrientation(allMisPkgs[i].Links[j].SelfMount))));
             }
+	    else if(Caps(allMisPkgsLinks[i*allMisPkgs[i].Links.length+j].getMountPointJointType(allMisPkgs[i].Links[j].SelfMount)) == "SCISSOR")
+            {
+                JointParts[JointParts.length - 1].JointClass = class'USARBot.ScissorJoint';
+
+                if(j == 0)
+                    JointParts[JointParts.length - 1].ParentPos = converter.LengthVectorToUU(MisPkgs[i].Location - (allMisPkgsLinks[i*allMisPkgs[i].Links.length+j].getMountPointLocation(allMisPkgs[i].Links[j].SelfMount) * allMisPkgs[i].Links[j].DrawScale3D));
+                else
+                    JointParts[JointParts.length - 1].ParentPos = converter.LengthVectorToUU((allMisPkgsLinks[i*allMisPkgs[i].Links.length+FindLinkParent(allMisPkgs[i], allMisPkgs[i].Links[j].ParentLinkNumber)].getMountPointLocation(allMisPkgs[i].Links[j].ParentMount) * allMisPkgs[i].Links[FindLinkParent(allMisPkgs[i], allMisPkgs[i].Links[j].ParentLinkNumber)].DrawScale3D) - (allMisPkgsLinks[i*allMisPkgs[i].Links.length+j].getMountPointLocation(allMisPkgs[i].Links[j].SelfMount) * allMisPkgs[i].Links[j].DrawScale3D));
+
+                JointParts[JointParts.length - 1].ParentAxis = (Vect(0,1,0) >> converter.RotatorToUU(allMisPkgsLinks[i*allMisPkgs[i].Links.length+j].getMountPointOrientation(allMisPkgs[i].Links[j].SelfMount))) * Vect(1,1,1);
+                JointParts[JointParts.length - 1].SelfAxis = JointParts[JointParts.length - 1].ParentAxis;
+                JointParts[JointParts.length - 1].ParentAxis2 = (Vect(1,0,0) >> converter.RotatorToUU(allMisPkgsLinks[i*allMisPkgs[i].Links.length+j].getMountPointOrientation(allMisPkgs[i].Links[j].SelfMount))) * Vect(1,1,1);
+                JointParts[JointParts.length - 1].SelfAxis2 = JointParts[JointParts.length - 1].ParentAxis2;
+
+                JointParts[JointParts.length - 1].SelfPos = converter.LengthVectorToUU(-allMisPkgsLinks[i*allMisPkgs[i].Links.length+j].MaxRange * (Vect(0,0,-1) >> converter.RotatorToUU(allMisPkgsLinks[i*allMisPkgs[i].Links.length+j].getMountPointOrientation(allMisPkgs[i].Links[j].SelfMount))));
+            }
         }
     }
 
@@ -818,6 +834,14 @@
         Joints[CurrentPart] = spawn(JointParts[CurrentPart].JointClass,Parent);
 
         if (Joints[CurrentPart].IsA('KSlider')) {
+		if(Joints[CurrentPart].IsA('ScissorJoint'))
+		{
+			Parts[CurrentPart] = spawn(JointParts[CurrentPart].PartClass,Parent,, Parent.Location + offset.X*RotX + offset.Y*RotY + offset.Z*RotZ,Parent.Rotation);
+			Parts[CurrentPart].SetDrawScale3D(JointParts[CurrentPart].DrawScale3D);
+			ScissorJoint(Joints[CurrentPart]).init(Parts[CurrentPart],Parent,JointParts[CurrentPart].ParentPos,JointParts[CurrentPart].SelfPos,JointParts[CurrentPart].ParentAxis,JointParts[CurrentPart].ParentAxis2,JointParts[CurrentPart].SelfAxis,JointParts[CurrentPart].SelfAxis2);
+		}
+		else
+		{
         	  KSlider(Joints[CurrentPart]).init1(Parent,JointParts[CurrentPart].ParentPos,JointParts[CurrentPart].ParentAxis,JointParts[CurrentPart].ParentAxis2,
         	                                     JointParts[CurrentPart].SelfPos,JointParts[CurrentPart].SelfAxis,JointParts[CurrentPart].SelfAxis2);
             offset = JointParts[CurrentPart].ParentPos - JointParts[CurrentPart].SelfPos;
@@ -826,6 +850,7 @@
             log("Init"@Joints[CurrentPart]);
             KSlider(Joints[CurrentPart]).init2(JointParts[CurrentPart].ParentPos,JointParts[CurrentPart].ParentAxis,JointParts[CurrentPart].ParentAxis2,
                                                Parts[CurrentPart],JointParts[CurrentPart].SelfPos,JointParts[CurrentPart].SelfAxis,JointParts[CurrentPart].SelfAxis2);
+		}
         } else {
             //Spawn Part
             offset = JointParts[CurrentPart].ParentPos - JointParts[CurrentPart].SelfPos;
@@ -2056,7 +2081,7 @@
                 if (JointsControl[i].value!=0)
                     WheelJ.KBraking = 0.0;
                 else
-                    WheelJ.KBraking = JointParts[i].BrakeTorque + 25.5;
+                    WheelJ.KBraking = JointParts[i].BrakeTorque + 10.0;
             }
             // Speed
             else if (JointsControl[i].order==1) {
@@ -2065,7 +2090,7 @@
                     WheelJ.KBraking = 0.0;
                     WheelJ.KMotorTorque = MotorTorque;
                 } else {
-                    WheelJ.KBraking = JointParts[i].BrakeTorque + 25.5;
+                    WheelJ.KBraking = JointParts[i].BrakeTorque + 10.0;
                     WheelJ.KMotorTorque = 0.0;
                 }
             }


More information about the TeamTalk-developers mailing list