Last active
December 29, 2019 06:52
-
-
Save madhephaestus/fb8c93b40c1accb9a1cc6e6ece989763 to your computer and use it in GitHub Desktop.
MediumKat_copy copy of MediumKat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.ArrayList; | |
| import com.neuronrobotics.sdk.addons.kinematics.DHChain; | |
| import com.neuronrobotics.sdk.addons.kinematics.DHLink; | |
| import com.neuronrobotics.sdk.addons.kinematics.DhInverseSolver; | |
| import com.neuronrobotics.sdk.addons.kinematics.math.TransformNR; | |
| import com.neuronrobotics.sdk.common.Log; | |
| import Jama.Matrix; | |
| return new DhInverseSolver() { | |
| @Override | |
| public double[] inverseKinematics(TransformNR target, | |
| double[] jointSpaceVector,DHChain chain ) { | |
| ArrayList<DHLink> links = chain.getLinks(); | |
| if(links.size()<3){ | |
| return jointSpaceVector | |
| } | |
| // THis is the jacobian for the given configuration | |
| //Matrix jacobian = chain.getJacobian(jointSpaceVector); | |
| Matrix taskSpacMatrix = target.getMatrixTransform(); | |
| int linkNum = jointSpaceVector.length; | |
| double [] inv = new double[linkNum]; | |
| if(linkNum<3){ | |
| for(int i=i;i<linkNum;i++){ | |
| inv[i]=jointSpaceVector[i]+0.0001 | |
| } | |
| } | |
| // this is an ad-hock kinematic model for d-h parameters and only works for specific configurations | |
| double d = links.get(1).getD()- links.get(2).getD(); | |
| double r = links.get(0).getR(); | |
| double lengthXYPlaneVect = Math.sqrt(Math.pow(target.getX(),2)+Math.pow(target.getY(),2)); | |
| double angleXYPlaneVect = Math.asin(target.getY()/lengthXYPlaneVect); | |
| double angleRectangleAdjustedXY =Math.asin(d/lengthXYPlaneVect); | |
| double lengthRectangleAdjustedXY = lengthXYPlaneVect* Math.cos(angleRectangleAdjustedXY)-r; | |
| double orentation = angleXYPlaneVect-angleRectangleAdjustedXY; | |
| if(Math.abs(Math.toDegrees(orentation))<0.01){ | |
| orentation=0; | |
| } | |
| double ySet = lengthRectangleAdjustedXY*Math.sin(orentation); | |
| double xSet = lengthRectangleAdjustedXY*Math.cos(orentation); | |
| double zSet = target.getZ() - links.get(0).getD(); | |
| if(links.size()==5){ | |
| double tipAngulationSum =Math.toDegrees( links.get(1).getTheta()+ | |
| links.get(2).getTheta()+ | |
| links.get(4).getTheta()) | |
| //println "Tip angulation orentation = "+tipAngulationSum | |
| if(tipAngulationSum==90) | |
| zSet+=links.get(4).getD(); | |
| else{ | |
| double tipySet = links.get(4).getR()*Math.sin(orentation); | |
| double tipxSet = links.get(4).getR()*Math.cos(orentation); | |
| //println "5 links back Setting tip x="+tipxSet+" y="+tipySet | |
| xSet-=tipxSet | |
| ySet-=tipySet | |
| } | |
| } | |
| if(links.size()==4){ | |
| double tipAngulationSum =Math.toDegrees( links.get(1).getTheta()+ | |
| links.get(2).getTheta()+ | |
| links.get(3).getTheta()) | |
| //println "Tip angulation orentation = "+tipAngulationSum | |
| if(tipAngulationSum==90) | |
| zSet+=links.get(3).getR(); | |
| else{ | |
| double tipySet = links.get(3).getR()*Math.sin(orentation); | |
| double tipxSet = links.get(3).getR()*Math.cos(orentation); | |
| //println "4 links back Setting tip x="+tipxSet+" y="+tipySet | |
| xSet-=tipxSet | |
| ySet-=tipySet | |
| } | |
| } | |
| // Actual target for anylitical solution is above the target minus the z offset | |
| TransformNR overGripper = new TransformNR( | |
| xSet, | |
| ySet, | |
| zSet, | |
| target.getRotation()); | |
| double l1 = links.get(1).getR();// First link length | |
| double l2 = links.get(2).getR(); | |
| double vect = Math.sqrt(xSet*xSet+ySet*ySet+zSet*zSet); | |
| /* | |
| println ( "TO: "+target); | |
| println ( "Trangular TO: "+overGripper); | |
| println ( "lengthXYPlaneVect: "+lengthXYPlaneVect); | |
| println( "angleXYPlaneVect: "+Math.toDegrees(angleXYPlaneVect)); | |
| println( "angleRectangleAdjustedXY: "+Math.toDegrees(angleRectangleAdjustedXY)); | |
| println( "lengthRectangleAdjustedXY: "+lengthRectangleAdjustedXY); | |
| println( "r: "+r); | |
| println( "d: "+d); | |
| println( "x Correction: "+xSet); | |
| println( "y Correction: "+ySet); | |
| println( "Orentation: "+Math.toDegrees(orentation)); | |
| println( "z: "+zSet); | |
| */ | |
| if (vect > l1+l2 || vect<0 ||lengthRectangleAdjustedXY<0 ) { | |
| throw new RuntimeException("Hypotenus too long: "+vect+" longer then "+l1+l2); | |
| } | |
| //from https://www.mathsisfun.com/algebra/trig-solving-sss-triangles.html | |
| double a=l2; | |
| double b=l1; | |
| double c=vect; | |
| double A =Math.acos((Math.pow(b,2)+ Math.pow(c,2) - Math.pow(a,2)) / (2.0*b*c)); | |
| double B =Math.acos((Math.pow(c,2)+ Math.pow(a,2) - Math.pow(b,2)) / (2.0*a*c)); | |
| double C =Math.PI-A-B;//Rule of triangles | |
| double elevation = Math.asin(zSet/vect); | |
| /* | |
| println( "vect: "+vect); | |
| println( "A: "+Math.toDegrees(A)); | |
| println( "elevation: "+Math.toDegrees(elevation)); | |
| println( "l1 from x/y plane: "+Math.toDegrees(A+elevation)); | |
| println( "l2 from l1: "+Math.toDegrees(C)); | |
| */ | |
| inv[0] = Math.toDegrees(orentation); | |
| inv[1] = -Math.toDegrees((A+elevation+links.get(1).getTheta())); | |
| if((int)links.get(1).getAlpha() ==180){ | |
| inv[2] = (Math.toDegrees(C))-180-//interior angle of the triangle, map to external angle | |
| Math.toDegrees(links.get(2).getTheta());// offset for kinematics | |
| } | |
| if((int)links.get(1).getAlpha() ==0){ | |
| inv[2] = -(Math.toDegrees(C))+Math.toDegrees(links.get(2).getTheta());// offset for kinematics | |
| } | |
| if(links.size()>3) | |
| inv[3] =-(inv[1] + inv[2]);// keep it parallell | |
| // We know the wrist twist will always be 0 for this model | |
| if(links.size()>4) | |
| inv[4] = inv[0];//keep the tool orentation paralell from the base | |
| for(int i=0;i<inv.length;i++){ | |
| if(Math.abs(inv[i]) < 0.01){ | |
| inv[i]=0; | |
| } | |
| // println( "Link#"+i+" is set to "+inv[i]); | |
| } | |
| int i=3; | |
| if(links.size()>3) | |
| i=5; | |
| //copy over remaining links so they do not move | |
| for(;i<inv.length && i<jointSpaceVector.length ;i++){ | |
| inv[i]=jointSpaceVector[i]; | |
| } | |
| return inv; | |
| } | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.neuronrobotics.bowlerstudio.creature.ICadGenerator; | |
| import com.neuronrobotics.bowlerstudio.creature.CreatureLab; | |
| import org.apache.commons.io.IOUtils; | |
| import com.neuronrobotics.bowlerstudio.vitamins.*; | |
| import com.neuronrobotics.sdk.addons.kinematics.AbstractLink | |
| import com.neuronrobotics.sdk.addons.kinematics.DHLink | |
| import com.neuronrobotics.sdk.addons.kinematics.DHParameterKinematics | |
| import com.neuronrobotics.sdk.addons.kinematics.LinkConfiguration | |
| import com.neuronrobotics.sdk.addons.kinematics.MobileBase | |
| import com.neuronrobotics.sdk.addons.kinematics.math.TransformNR | |
| import java.nio.file.Paths; | |
| import eu.mihosoft.vrl.v3d.CSG | |
| import eu.mihosoft.vrl.v3d.FileUtil; | |
| import eu.mihosoft.vrl.v3d.Transform; | |
| import javafx.scene.transform.Affine; | |
| import com.neuronrobotics.bowlerstudio.physics.TransformFactory; | |
| import com.neuronrobotics.bowlerstudio.scripting.ScriptingEngine | |
| println "Loading STL file" | |
| // Load an STL file from a git repo | |
| // Loading a local file also works here | |
| return new ICadGenerator(){ | |
| private CSG moveDHValues(CSG incoming,DHLink dh ){ | |
| TransformNR step = new TransformNR(dh.DhStep(0)).inverse() | |
| Transform move = TransformFactory.nrToCSG(step) | |
| return incoming.transformed(move) | |
| } | |
| @Override | |
| public ArrayList<CSG> generateCad(DHParameterKinematics d, int linkIndex) { | |
| ArrayList<CSG> allCad=new ArrayList<>(); | |
| String limbName = d.getScriptingName() | |
| File legFile = null | |
| boolean mirror=true | |
| if(limbName.contentEquals("DefaultLeg3")||limbName.contentEquals("DefaultLeg4")){ | |
| println "Mirror leg parts" | |
| mirror=false | |
| } | |
| TransformNR legRoot= d.getRobotToFiducialTransform() | |
| def leftSide=false | |
| def rear = true | |
| if(legRoot.getY()>0){ | |
| leftSide=true; | |
| } | |
| if(legRoot.getX()>0){ | |
| rear=false; | |
| } | |
| if(limbName.contentEquals("Tail")){ | |
| if(linkIndex >1) | |
| return allCad; | |
| if(linkIndex ==0){ | |
| legFile = ScriptingEngine.fileFromGit( | |
| "https://github.com/OperationSmallKat/SmallKat_V2.git", | |
| "STLs/MKTailandHeadMount.stl"); | |
| } | |
| if(linkIndex ==1){ | |
| legFile = ScriptingEngine.fileFromGit( | |
| "https://github.com/OperationSmallKat/SmallKat_V2.git", | |
| "STLs/MKTail.stl"); | |
| } | |
| }else if(limbName.contentEquals("Head")){ | |
| if(linkIndex >1) | |
| return allCad; | |
| if(linkIndex ==0){ | |
| legFile = ScriptingEngine.fileFromGit( | |
| "https://github.com/OperationSmallKat/SmallKat_V2.git", | |
| "STLs/MKTailandHeadMount.stl"); | |
| } | |
| if(linkIndex ==1){ | |
| legFile = ScriptingEngine.fileFromGit( | |
| "https://github.com/OperationSmallKat/SmallKat_V2.git", | |
| "STLs/MKHead.stl"); | |
| } | |
| if(linkIndex ==2) | |
| return allCad; | |
| }else{ | |
| if(leftSide){ | |
| if(linkIndex ==0){ | |
| legFile = ScriptingEngine.fileFromGit( | |
| "https://github.com/OperationSmallKat/SmallKat_V2.git", | |
| "STLs/MKCat Shoulder.stl"); | |
| } | |
| if(linkIndex ==1){ | |
| legFile = ScriptingEngine.fileFromGit( | |
| "https://github.com/OperationSmallKat/SmallKat_V2.git", | |
| "STLs/MKCat Leg Mirror.stl"); | |
| } | |
| if(linkIndex ==2){ | |
| legFile = ScriptingEngine.fileFromGit( | |
| "https://github.com/OperationSmallKat/SmallKat_V2.git", | |
| "STLs/MKCat Foot.stl"); | |
| } | |
| } | |
| else{ | |
| if(linkIndex ==0){ | |
| legFile = ScriptingEngine.fileFromGit( | |
| "https://github.com/OperationSmallKat/SmallKat_V2.git", | |
| "STLs/MKCat Shoulder Mirror.stl"); | |
| } | |
| if(linkIndex ==1){ | |
| legFile = ScriptingEngine.fileFromGit( | |
| "https://github.com/OperationSmallKat/SmallKat_V2.git", | |
| "STLs/MKCat Leg.stl"); | |
| } | |
| if(linkIndex ==2){ | |
| legFile = ScriptingEngine.fileFromGit( | |
| "https://github.com/OperationSmallKat/SmallKat_V2.git", | |
| "STLs/MKCat Foot Mirror.stl"); | |
| } | |
| } | |
| } | |
| ArrayList<DHLink> dhLinks = d.getChain().getLinks() | |
| DHLink dh = dhLinks.get(linkIndex) | |
| // Hardware to engineering units configuration | |
| LinkConfiguration conf = d.getLinkConfiguration(linkIndex); | |
| // Engineering units to kinematics link (limits and hardware type abstraction) | |
| AbstractLink abstractLink = d.getAbstractLink(linkIndex);// Transform used by the UI to render the location of the object | |
| // Transform used by the UI to render the location of the object | |
| Affine manipulator = dh.getListener(); | |
| // Load the .CSG from the disk and cache it in memory | |
| println "Loading " +legFile | |
| CSG body = Vitamins.get(legFile) | |
| if(linkIndex ==0){ | |
| //body=moveDHValues(body,dh) | |
| if(limbName.contentEquals("Head")||limbName.contentEquals("Tail")){ | |
| body=body | |
| .rotz(90) | |
| .rotx(180) | |
| .movex(-41) | |
| .movey(-21) | |
| .movez(-22) | |
| //.movez(-11.5) | |
| } else{ | |
| body=body.roty(180) | |
| .rotx(180) | |
| //if(rear) | |
| //body=body.rotx(180) | |
| } | |
| } | |
| if(linkIndex ==1){ | |
| if(limbName.contentEquals("Head")){ | |
| body=body | |
| .roty(180) | |
| .movex(50) | |
| //.movey(-18) | |
| //.movez(-38.5) | |
| }else if(limbName.contentEquals("Tail")){ | |
| body=body | |
| .roty(180) | |
| .rotz(-90) | |
| .movey(125) | |
| }else{ | |
| body=body.roty(180) | |
| } | |
| } | |
| if(linkIndex ==2){ | |
| body=body.roty(180) | |
| } | |
| body.setManipulator(manipulator); | |
| def parts = [body ] as ArrayList<CSG> | |
| for(int i=0;i<parts.size();i++){ | |
| parts.get(i).setColor(javafx.scene.paint.Color.RED) | |
| } | |
| return parts; | |
| } | |
| @Override | |
| public ArrayList<CSG> generateBody(MobileBase b ) { | |
| ArrayList<CSG> allCad=new ArrayList<>(); | |
| File mainBodyFile = ScriptingEngine.fileFromGit( | |
| "https://github.com/OperationSmallKat/SmallKat_V2.git", | |
| "STLs/MKBody.stl"); | |
| // Load the .CSG from the disk and cache it in memory | |
| CSG body = Vitamins.get(mainBodyFile) | |
| body.setManipulator(b.getRootListener()); | |
| body.setColor(javafx.scene.paint.Color.WHITE) | |
| def parts = [body ] as ArrayList<CSG> | |
| for(int i=0;i<parts.size();i++){ | |
| parts.get(i).setColor(javafx.scene.paint.Color.GRAY) | |
| } | |
| return parts; | |
| } | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <root> | |
| <mobilebase> | |
| <cadEngine> | |
| <git>https://gist.github.com/fb8c93b40c1accb9a1cc6e6ece989763.git</git> | |
| <file>MediumCad.groovy</file> | |
| </cadEngine> | |
| <driveEngine> | |
| <git>https://gist.github.com/fb8c93b40c1accb9a1cc6e6ece989763.git</git> | |
| <file>walking.groovy</file> | |
| </driveEngine> | |
| <name>MediumKat_copy</name> | |
| <leg> | |
| <name>RearLeft</name> | |
| <cadEngine> | |
| <git>https://gist.github.com/fb8c93b40c1accb9a1cc6e6ece989763.git</git> | |
| <file>MediumCad.groovy</file> | |
| </cadEngine> | |
| <kinematics> | |
| <git>https://gist.github.com/fb8c93b40c1accb9a1cc6e6ece989763.git</git> | |
| <file>DefaultDhSolver.groovy</file> | |
| </kinematics> | |
| <link> | |
| <name>basePan</name> | |
| <deviceName>hidDevice</deviceName> | |
| <type>hidfast</type> | |
| <index>1</index> | |
| <scale>-0.512698413</scale> | |
| <upperLimit>176.0</upperLimit> | |
| <lowerLimit>87.0</lowerLimit> | |
| <upperVelocity>1.0E8</upperVelocity> | |
| <lowerVelocity>-1.0E8</lowerVelocity> | |
| <staticOffset>110.85134986830553</staticOffset> | |
| <isLatch>true</isLatch> | |
| <indexLatch>105</indexLatch> | |
| <isStopOnLatch>false</isStopOnLatch> | |
| <homingTPS>10000000</homingTPS> | |
| <vitamins> | |
| <vitamin> | |
| <name>electroMechanical</name> | |
| <type>hobbyServo</type> | |
| <id>DHV56mg_sub_Micro</id> | |
| </vitamin> | |
| <vitamin> | |
| <name>shaft</name> | |
| <type>hobbyServoHorn</type> | |
| <id>DHV56mg_sub_Micro_1</id> | |
| </vitamin> | |
| </vitamins> | |
| <passive>false</passive> | |
| <mass>0.0302</mass> | |
| <centerOfMassFromCentroid> <x>-1.5</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>0.0</rotx> | |
| <roty>0.0</roty> | |
| <rotz>0.0</rotz></centerOfMassFromCentroid> | |
| <imuFromCentroid> <x>0.0</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>-0.0</rotx> | |
| <roty>-0.0</roty> | |
| <rotz>-0.0</rotz></imuFromCentroid> | |
| <DHParameters> | |
| <Delta>0.0</Delta> | |
| <Theta>0.01</Theta> | |
| <Radius>28.575</Radius> | |
| <Alpha>-89.97</Alpha> | |
| </DHParameters> | |
| </link> | |
| <link> | |
| <name>baseTilt</name> | |
| <deviceName>hidDevice</deviceName> | |
| <type>hidfast</type> | |
| <index>2</index> | |
| <scale>-0.512698413</scale> | |
| <upperLimit>142.0</upperLimit> | |
| <lowerLimit>5.625</lowerLimit> | |
| <upperVelocity>1.0E8</upperVelocity> | |
| <lowerVelocity>-1.0E8</lowerVelocity> | |
| <staticOffset>99.6783088235294</staticOffset> | |
| <isLatch>true</isLatch> | |
| <indexLatch>97</indexLatch> | |
| <isStopOnLatch>false</isStopOnLatch> | |
| <homingTPS>10000000</homingTPS> | |
| <vitamins> | |
| <vitamin> | |
| <name>electroMechanical</name> | |
| <type>hobbyServo</type> | |
| <id>DHV56mg_sub_Micro</id> | |
| </vitamin> | |
| <vitamin> | |
| <name>shaft</name> | |
| <type>hobbyServoHorn</type> | |
| <id>DHV56mg_sub_Micro_1</id> | |
| </vitamin> | |
| </vitamins> | |
| <passive>false</passive> | |
| <mass>0.0299</mass> | |
| <centerOfMassFromCentroid> <x>-13.21</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>0.0</rotx> | |
| <roty>0.0</roty> | |
| <rotz>0.0</rotz></centerOfMassFromCentroid> | |
| <imuFromCentroid> <x>0.0</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>-0.0</rotx> | |
| <roty>-0.0</roty> | |
| <rotz>-0.0</rotz></imuFromCentroid> | |
| <DHParameters> | |
| <Delta>0.0</Delta> | |
| <Theta>-90.0</Theta> | |
| <Radius>50.8</Radius> | |
| <Alpha>0.01</Alpha> | |
| </DHParameters> | |
| </link> | |
| <link> | |
| <name>elbow</name> | |
| <deviceName>hidDevice</deviceName> | |
| <type>hidfast</type> | |
| <index>0</index> | |
| <scale>-0.512698413</scale> | |
| <upperLimit>157.5</upperLimit> | |
| <lowerLimit>7.5</lowerLimit> | |
| <upperVelocity>1.0E8</upperVelocity> | |
| <lowerVelocity>-1.0E8</lowerVelocity> | |
| <staticOffset>82.65144863915715</staticOffset> | |
| <isLatch>true</isLatch> | |
| <indexLatch>145</indexLatch> | |
| <isStopOnLatch>false</isStopOnLatch> | |
| <homingTPS>10000000</homingTPS> | |
| <vitamins> | |
| <vitamin> | |
| <name>electroMechanical</name> | |
| <type>hobbyServo</type> | |
| <id>DHV56mg_sub_Micro</id> | |
| </vitamin> | |
| <vitamin> | |
| <name>shaft</name> | |
| <type>hobbyServoHorn</type> | |
| <id>DHV56mg_sub_Micro_1</id> | |
| </vitamin> | |
| </vitamins> | |
| <passive>false</passive> | |
| <mass>0.0091</mass> | |
| <centerOfMassFromCentroid> <x>-32.31</x> | |
| <y>-10.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>0.0</rotx> | |
| <roty>0.0</roty> | |
| <rotz>0.0</rotz></centerOfMassFromCentroid> | |
| <imuFromCentroid> <x>0.0</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>-0.0</rotx> | |
| <roty>-0.0</roty> | |
| <rotz>-0.0</rotz></imuFromCentroid> | |
| <DHParameters> | |
| <Delta>0.0</Delta> | |
| <Theta>90.01</Theta> | |
| <Radius>47.86</Radius> | |
| <Alpha>0.01</Alpha> | |
| </DHParameters> | |
| </link> | |
| <ZframeToRAS | |
| > <x>0.0</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>-0.0</rotx> | |
| <roty>-0.0</roty> | |
| <rotz>-0.0</rotz> | |
| </ZframeToRAS> | |
| <baseToZframe> | |
| <x>-98.04</x> | |
| <y>37.15</y> | |
| <z>106.24</z> | |
| <rotw>7.5577511764289E-5</rotw> | |
| <rotx>-0.8660544878420067</rotx> | |
| <roty>4.362883439682798E-5</roty> | |
| <rotz>0.49994961393452864</rotz> | |
| </baseToZframe> | |
| </leg> | |
| <leg> | |
| <name>FrontRight</name> | |
| <cadEngine> | |
| <git>https://gist.github.com/fb8c93b40c1accb9a1cc6e6ece989763.git</git> | |
| <file>MediumCad.groovy</file> | |
| </cadEngine> | |
| <kinematics> | |
| <git>https://gist.github.com/fb8c93b40c1accb9a1cc6e6ece989763.git</git> | |
| <file>DefaultDhSolver.groovy</file> | |
| </kinematics> | |
| <link> | |
| <name>basePan</name> | |
| <deviceName>hidDevice</deviceName> | |
| <type>hidfast</type> | |
| <index>5</index> | |
| <scale>-0.512698413</scale> | |
| <upperLimit>120.0</upperLimit> | |
| <lowerLimit>17.0</lowerLimit> | |
| <upperVelocity>1.0E8</upperVelocity> | |
| <lowerVelocity>-1.0E8</lowerVelocity> | |
| <staticOffset>87.57641022827043</staticOffset> | |
| <isLatch>true</isLatch> | |
| <indexLatch>105</indexLatch> | |
| <isStopOnLatch>false</isStopOnLatch> | |
| <homingTPS>10000000</homingTPS> | |
| <vitamins> | |
| <vitamin> | |
| <name>electroMechanical</name> | |
| <type>hobbyServo</type> | |
| <id>DHV56mg_sub_Micro</id> | |
| </vitamin> | |
| <vitamin> | |
| <name>shaft</name> | |
| <type>hobbyServoHorn</type> | |
| <id>DHV56mg_sub_Micro_1</id> | |
| </vitamin> | |
| </vitamins> | |
| <passive>false</passive> | |
| <mass>0.0302</mass> | |
| <centerOfMassFromCentroid> <x>-1.5</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>0.0</rotx> | |
| <roty>0.0</roty> | |
| <rotz>0.0</rotz></centerOfMassFromCentroid> | |
| <imuFromCentroid> <x>0.0</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>-0.0</rotx> | |
| <roty>-0.0</roty> | |
| <rotz>-0.0</rotz></imuFromCentroid> | |
| <DHParameters> | |
| <Delta>0.0</Delta> | |
| <Theta>0.01</Theta> | |
| <Radius>28.575</Radius> | |
| <Alpha>-89.97</Alpha> | |
| </DHParameters> | |
| </link> | |
| <link> | |
| <name>baseTilt</name> | |
| <deviceName>hidDevice</deviceName> | |
| <type>hidfast</type> | |
| <index>4</index> | |
| <scale>0.512698413</scale> | |
| <upperLimit>178.56343283582092</upperLimit> | |
| <lowerLimit>37.5</lowerLimit> | |
| <upperVelocity>1.0E8</upperVelocity> | |
| <lowerVelocity>-1.0E8</lowerVelocity> | |
| <staticOffset>88.61093047711398</staticOffset> | |
| <isLatch>true</isLatch> | |
| <indexLatch>97</indexLatch> | |
| <isStopOnLatch>false</isStopOnLatch> | |
| <homingTPS>10000000</homingTPS> | |
| <vitamins> | |
| <vitamin> | |
| <name>electroMechanical</name> | |
| <type>hobbyServo</type> | |
| <id>DHV56mg_sub_Micro</id> | |
| </vitamin> | |
| <vitamin> | |
| <name>shaft</name> | |
| <type>hobbyServoHorn</type> | |
| <id>DHV56mg_sub_Micro_1</id> | |
| </vitamin> | |
| </vitamins> | |
| <passive>false</passive> | |
| <mass>0.0299</mass> | |
| <centerOfMassFromCentroid> <x>-13.21</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>0.0</rotx> | |
| <roty>0.0</roty> | |
| <rotz>0.0</rotz></centerOfMassFromCentroid> | |
| <imuFromCentroid> <x>0.0</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>-0.0</rotx> | |
| <roty>-0.0</roty> | |
| <rotz>-0.0</rotz></imuFromCentroid> | |
| <DHParameters> | |
| <Delta>0.0</Delta> | |
| <Theta>-90.0</Theta> | |
| <Radius>50.8</Radius> | |
| <Alpha>0.01</Alpha> | |
| </DHParameters> | |
| </link> | |
| <link> | |
| <name>elbow</name> | |
| <deviceName>hidDevice</deviceName> | |
| <type>hidfast</type> | |
| <index>3</index> | |
| <scale>0.512698413</scale> | |
| <upperLimit>178.3488805970149</upperLimit> | |
| <lowerLimit>3.6660447761194046</lowerLimit> | |
| <upperVelocity>1.0E8</upperVelocity> | |
| <lowerVelocity>-1.0E8</lowerVelocity> | |
| <staticOffset>104.04693499141692</staticOffset> | |
| <isLatch>true</isLatch> | |
| <indexLatch>145</indexLatch> | |
| <isStopOnLatch>false</isStopOnLatch> | |
| <homingTPS>10000000</homingTPS> | |
| <vitamins> | |
| <vitamin> | |
| <name>electroMechanical</name> | |
| <type>hobbyServo</type> | |
| <id>DHV56mg_sub_Micro</id> | |
| </vitamin> | |
| <vitamin> | |
| <name>shaft</name> | |
| <type>hobbyServoHorn</type> | |
| <id>DHV56mg_sub_Micro_1</id> | |
| </vitamin> | |
| </vitamins> | |
| <passive>false</passive> | |
| <mass>0.0091</mass> | |
| <centerOfMassFromCentroid> <x>-32.31</x> | |
| <y>-10.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>0.0</rotx> | |
| <roty>0.0</roty> | |
| <rotz>0.0</rotz></centerOfMassFromCentroid> | |
| <imuFromCentroid> <x>0.0</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>-0.0</rotx> | |
| <roty>-0.0</roty> | |
| <rotz>-0.0</rotz></imuFromCentroid> | |
| <DHParameters> | |
| <Delta>0.0</Delta> | |
| <Theta>90.01</Theta> | |
| <Radius>47.86253</Radius> | |
| <Alpha>0.01</Alpha> | |
| </DHParameters> | |
| </link> | |
| <ZframeToRAS | |
| > <x>0.0</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>-0.0</rotx> | |
| <roty>-0.0</roty> | |
| <rotz>-0.0</rotz> | |
| </ZframeToRAS> | |
| <baseToZframe> | |
| <x>35.31343</x> | |
| <y>-37.1475</y> | |
| <z>106.236</z> | |
| <rotw>7.557497341369239E-5</rotw> | |
| <rotx>0.8660254004868585</rotx> | |
| <roty>4.3633231244394104E-5</roty> | |
| <rotz>-0.4999999980961411</rotz> | |
| </baseToZframe> | |
| </leg> | |
| <leg> | |
| <name>FrontLeft</name> | |
| <cadEngine> | |
| <git>https://gist.github.com/fb8c93b40c1accb9a1cc6e6ece989763.git</git> | |
| <file>MediumCad.groovy</file> | |
| </cadEngine> | |
| <kinematics> | |
| <git>https://gist.github.com/fb8c93b40c1accb9a1cc6e6ece989763.git</git> | |
| <file>DefaultDhSolver.groovy</file> | |
| </kinematics> | |
| <link> | |
| <name>basePan</name> | |
| <deviceName>hidDevice</deviceName> | |
| <type>hidfast</type> | |
| <index>7</index> | |
| <scale>-0.512698413</scale> | |
| <upperLimit>138.75000000000003</upperLimit> | |
| <lowerLimit>35.625</lowerLimit> | |
| <upperVelocity>1.0E8</upperVelocity> | |
| <lowerVelocity>-1.0E8</lowerVelocity> | |
| <staticOffset>64.10969051799823</staticOffset> | |
| <isLatch>true</isLatch> | |
| <indexLatch>105</indexLatch> | |
| <isStopOnLatch>false</isStopOnLatch> | |
| <homingTPS>10000000</homingTPS> | |
| <vitamins> | |
| <vitamin> | |
| <name>electroMechanical</name> | |
| <type>hobbyServo</type> | |
| <id>DHV56mg_sub_Micro</id> | |
| </vitamin> | |
| <vitamin> | |
| <name>shaft</name> | |
| <type>hobbyServoHorn</type> | |
| <id>DHV56mg_sub_Micro_1</id> | |
| </vitamin> | |
| </vitamins> | |
| <passive>false</passive> | |
| <mass>0.0302</mass> | |
| <centerOfMassFromCentroid> <x>-1.5</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>0.0</rotx> | |
| <roty>0.0</roty> | |
| <rotz>0.0</rotz></centerOfMassFromCentroid> | |
| <imuFromCentroid> <x>0.0</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>-0.0</rotx> | |
| <roty>-0.0</roty> | |
| <rotz>-0.0</rotz></imuFromCentroid> | |
| <DHParameters> | |
| <Delta>0.0</Delta> | |
| <Theta>0.01</Theta> | |
| <Radius>28.58</Radius> | |
| <Alpha>-89.97</Alpha> | |
| </DHParameters> | |
| </link> | |
| <link> | |
| <name>baseTilt</name> | |
| <deviceName>hidDevice</deviceName> | |
| <type>hidfast</type> | |
| <index>6</index> | |
| <scale>-0.512698413</scale> | |
| <upperLimit>158.0</upperLimit> | |
| <lowerLimit>3.0</lowerLimit> | |
| <upperVelocity>1.0E8</upperVelocity> | |
| <lowerVelocity>-1.0E8</lowerVelocity> | |
| <staticOffset>90.9583383155557</staticOffset> | |
| <isLatch>true</isLatch> | |
| <indexLatch>97</indexLatch> | |
| <isStopOnLatch>false</isStopOnLatch> | |
| <homingTPS>10000000</homingTPS> | |
| <vitamins> | |
| <vitamin> | |
| <name>electroMechanical</name> | |
| <type>hobbyServo</type> | |
| <id>DHV56mg_sub_Micro</id> | |
| </vitamin> | |
| <vitamin> | |
| <name>shaft</name> | |
| <type>hobbyServoHorn</type> | |
| <id>DHV56mg_sub_Micro_1</id> | |
| </vitamin> | |
| </vitamins> | |
| <passive>false</passive> | |
| <mass>0.0299</mass> | |
| <centerOfMassFromCentroid> <x>-13.21</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>0.0</rotx> | |
| <roty>0.0</roty> | |
| <rotz>0.0</rotz></centerOfMassFromCentroid> | |
| <imuFromCentroid> <x>0.0</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>-0.0</rotx> | |
| <roty>-0.0</roty> | |
| <rotz>-0.0</rotz></imuFromCentroid> | |
| <DHParameters> | |
| <Delta>0.0</Delta> | |
| <Theta>-90.0</Theta> | |
| <Radius>50.8</Radius> | |
| <Alpha>0.01</Alpha> | |
| </DHParameters> | |
| </link> | |
| <link> | |
| <name>elbow</name> | |
| <deviceName>hidDevice</deviceName> | |
| <type>hidfast</type> | |
| <index>15</index> | |
| <scale>-0.512698413</scale> | |
| <upperLimit>180.0</upperLimit> | |
| <lowerLimit>30.0</lowerLimit> | |
| <upperVelocity>1.0E8</upperVelocity> | |
| <lowerVelocity>-1.0E8</lowerVelocity> | |
| <staticOffset>107.0</staticOffset> | |
| <isLatch>true</isLatch> | |
| <indexLatch>145</indexLatch> | |
| <isStopOnLatch>false</isStopOnLatch> | |
| <homingTPS>10000000</homingTPS> | |
| <vitamins> | |
| <vitamin> | |
| <name>electroMechanical</name> | |
| <type>hobbyServo</type> | |
| <id>DHV56mg_sub_Micro</id> | |
| </vitamin> | |
| <vitamin> | |
| <name>shaft</name> | |
| <type>hobbyServoHorn</type> | |
| <id>DHV56mg_sub_Micro_1</id> | |
| </vitamin> | |
| </vitamins> | |
| <passive>false</passive> | |
| <mass>0.0091</mass> | |
| <centerOfMassFromCentroid> <x>-32.31</x> | |
| <y>-10.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>0.0</rotx> | |
| <roty>0.0</roty> | |
| <rotz>0.0</rotz></centerOfMassFromCentroid> | |
| <imuFromCentroid> <x>0.0</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>-0.0</rotx> | |
| <roty>-0.0</roty> | |
| <rotz>-0.0</rotz></imuFromCentroid> | |
| <DHParameters> | |
| <Delta>0.0</Delta> | |
| <Theta>90.01</Theta> | |
| <Radius>47.86253</Radius> | |
| <Alpha>0.01</Alpha> | |
| </DHParameters> | |
| </link> | |
| <ZframeToRAS | |
| > <x>0.0</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>-0.0</rotx> | |
| <roty>-0.0</roty> | |
| <rotz>-0.0</rotz> | |
| </ZframeToRAS> | |
| <baseToZframe> | |
| <x>35.31</x> | |
| <y>37.1475</y> | |
| <z>106.24</z> | |
| <rotw>7.557497341426927E-5</rotw> | |
| <rotx>-0.8660254004868584</rotx> | |
| <roty>4.363323124472718E-5</roty> | |
| <rotz>0.49999999809614115</rotz> | |
| </baseToZframe> | |
| </leg> | |
| <leg> | |
| <name>RearRight</name> | |
| <cadEngine> | |
| <git>https://gist.github.com/fb8c93b40c1accb9a1cc6e6ece989763.git</git> | |
| <file>MediumCad.groovy</file> | |
| </cadEngine> | |
| <kinematics> | |
| <git>https://gist.github.com/fb8c93b40c1accb9a1cc6e6ece989763.git</git> | |
| <file>DefaultDhSolver.groovy</file> | |
| </kinematics> | |
| <link> | |
| <name>basePan</name> | |
| <deviceName>hidDevice</deviceName> | |
| <type>hidfast</type> | |
| <index>8</index> | |
| <scale>-0.512698413</scale> | |
| <upperLimit>118.12500000000001</upperLimit> | |
| <lowerLimit>7.5</lowerLimit> | |
| <upperVelocity>1.0E8</upperVelocity> | |
| <lowerVelocity>-1.0E8</lowerVelocity> | |
| <staticOffset>79.73441615452153</staticOffset> | |
| <isLatch>true</isLatch> | |
| <indexLatch>105</indexLatch> | |
| <isStopOnLatch>false</isStopOnLatch> | |
| <homingTPS>10000000</homingTPS> | |
| <vitamins> | |
| <vitamin> | |
| <name>electroMechanical</name> | |
| <type>hobbyServo</type> | |
| <id>DHV56mg_sub_Micro</id> | |
| </vitamin> | |
| <vitamin> | |
| <name>shaft</name> | |
| <type>hobbyServoHorn</type> | |
| <id>DHV56mg_sub_Micro_1</id> | |
| </vitamin> | |
| </vitamins> | |
| <passive>false</passive> | |
| <mass>0.0302</mass> | |
| <centerOfMassFromCentroid> <x>-1.5</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>0.0</rotx> | |
| <roty>0.0</roty> | |
| <rotz>0.0</rotz></centerOfMassFromCentroid> | |
| <imuFromCentroid> <x>0.0</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>-0.0</rotx> | |
| <roty>-0.0</roty> | |
| <rotz>-0.0</rotz></imuFromCentroid> | |
| <DHParameters> | |
| <Delta>0.0</Delta> | |
| <Theta>0.0</Theta> | |
| <Radius>28.575</Radius> | |
| <Alpha>-90.0</Alpha> | |
| </DHParameters> | |
| </link> | |
| <link> | |
| <name>baseTilt</name> | |
| <deviceName>hidDevice</deviceName> | |
| <type>hidfast</type> | |
| <index>9</index> | |
| <scale>0.512698413</scale> | |
| <upperLimit>146.25000000000003</upperLimit> | |
| <lowerLimit>26.25</lowerLimit> | |
| <upperVelocity>1.0E8</upperVelocity> | |
| <lowerVelocity>-1.0E8</lowerVelocity> | |
| <staticOffset>54.705882352941195</staticOffset> | |
| <isLatch>true</isLatch> | |
| <indexLatch>97</indexLatch> | |
| <isStopOnLatch>false</isStopOnLatch> | |
| <homingTPS>10000000</homingTPS> | |
| <vitamins> | |
| <vitamin> | |
| <name>electroMechanical</name> | |
| <type>hobbyServo</type> | |
| <id>DHV56mg_sub_Micro</id> | |
| </vitamin> | |
| <vitamin> | |
| <name>shaft</name> | |
| <type>hobbyServoHorn</type> | |
| <id>DHV56mg_sub_Micro_1</id> | |
| </vitamin> | |
| </vitamins> | |
| <passive>false</passive> | |
| <mass>0.0299</mass> | |
| <centerOfMassFromCentroid> <x>-13.21</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>0.0</rotx> | |
| <roty>0.0</roty> | |
| <rotz>0.0</rotz></centerOfMassFromCentroid> | |
| <imuFromCentroid> <x>0.0</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>-0.0</rotx> | |
| <roty>-0.0</roty> | |
| <rotz>-0.0</rotz></imuFromCentroid> | |
| <DHParameters> | |
| <Delta>0.0</Delta> | |
| <Theta>-90.0</Theta> | |
| <Radius>50.8</Radius> | |
| <Alpha>0.0</Alpha> | |
| </DHParameters> | |
| </link> | |
| <link> | |
| <name>elbow</name> | |
| <deviceName>hidDevice</deviceName> | |
| <type>hidfast</type> | |
| <index>10</index> | |
| <scale>0.512698413</scale> | |
| <upperLimit>180.0</upperLimit> | |
| <lowerLimit>7.0</lowerLimit> | |
| <upperVelocity>1.0E8</upperVelocity> | |
| <lowerVelocity>-1.0E8</lowerVelocity> | |
| <staticOffset>128.99264705882354</staticOffset> | |
| <isLatch>true</isLatch> | |
| <indexLatch>145</indexLatch> | |
| <isStopOnLatch>false</isStopOnLatch> | |
| <homingTPS>10000000</homingTPS> | |
| <vitamins> | |
| <vitamin> | |
| <name>electroMechanical</name> | |
| <type>hobbyServo</type> | |
| <id>DHV56mg_sub_Micro</id> | |
| </vitamin> | |
| <vitamin> | |
| <name>shaft</name> | |
| <type>hobbyServoHorn</type> | |
| <id>DHV56mg_sub_Micro_1</id> | |
| </vitamin> | |
| </vitamins> | |
| <passive>false</passive> | |
| <mass>0.0091</mass> | |
| <centerOfMassFromCentroid> <x>-32.31</x> | |
| <y>-10.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>0.0</rotx> | |
| <roty>0.0</roty> | |
| <rotz>0.0</rotz></centerOfMassFromCentroid> | |
| <imuFromCentroid> <x>0.0</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>-0.0</rotx> | |
| <roty>-0.0</roty> | |
| <rotz>-0.0</rotz></imuFromCentroid> | |
| <DHParameters> | |
| <Delta>0.0</Delta> | |
| <Theta>90.0</Theta> | |
| <Radius>47.86</Radius> | |
| <Alpha>0.0</Alpha> | |
| </DHParameters> | |
| </link> | |
| <ZframeToRAS | |
| > <x>0.0</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>-0.0</rotx> | |
| <roty>-0.0</roty> | |
| <rotz>-0.0</rotz> | |
| </ZframeToRAS> | |
| <baseToZframe> | |
| <x>-98.036</x> | |
| <y>-37.15</y> | |
| <z>106.236</z> | |
| <rotw>7.557497341369239E-5</rotw> | |
| <rotx>0.8660254004868585</rotx> | |
| <roty>4.3633231244394104E-5</roty> | |
| <rotz>-0.4999999980961411</rotz> | |
| </baseToZframe> | |
| </leg> | |
| <appendage> | |
| <name>Head</name> | |
| <cadEngine> | |
| <git>https://gist.github.com/fb8c93b40c1accb9a1cc6e6ece989763.git</git> | |
| <file>MediumCad.groovy</file> | |
| </cadEngine> | |
| <kinematics> | |
| <git>https://gist.github.com/fb8c93b40c1accb9a1cc6e6ece989763.git</git> | |
| <file>DefaultDhSolver.groovy</file> | |
| </kinematics> | |
| <link> | |
| <name>basePan</name> | |
| <deviceName>hidDevice</deviceName> | |
| <type>hidfast</type> | |
| <index>11</index> | |
| <scale>-0.512698413</scale> | |
| <upperLimit>140.0</upperLimit> | |
| <lowerLimit>5.624999999999999</lowerLimit> | |
| <upperVelocity>1.0E8</upperVelocity> | |
| <lowerVelocity>-1.0E8</lowerVelocity> | |
| <staticOffset>89.04757462686567</staticOffset> | |
| <isLatch>true</isLatch> | |
| <indexLatch>235</indexLatch> | |
| <isStopOnLatch>false</isStopOnLatch> | |
| <homingTPS>10000000</homingTPS> | |
| <vitamins> | |
| <vitamin> | |
| <name>electroMechanical</name> | |
| <type>hobbyServo</type> | |
| <id>standardMicro</id> | |
| </vitamin> | |
| <vitamin> | |
| <name>shaft</name> | |
| <type>hobbyServoHorn</type> | |
| <id>standardMicro1</id> | |
| </vitamin> | |
| </vitamins> | |
| <passive>false</passive> | |
| <mass>0.0493</mass> | |
| <centerOfMassFromCentroid> <x>-24.46</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>0.0</rotx> | |
| <roty>0.0</roty> | |
| <rotz>0.0</rotz></centerOfMassFromCentroid> | |
| <imuFromCentroid> <x>0.0</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>-0.0</rotx> | |
| <roty>-0.0</roty> | |
| <rotz>-0.0</rotz></imuFromCentroid> | |
| <DHParameters> | |
| <Delta>0.0</Delta> | |
| <Theta>0.0</Theta> | |
| <Radius>40.247804878048775</Radius> | |
| <Alpha>-90.0</Alpha> | |
| </DHParameters> | |
| </link> | |
| <link> | |
| <name>baseTilt</name> | |
| <deviceName>hidDevice</deviceName> | |
| <type>hidfast</type> | |
| <index>12</index> | |
| <scale>-0.714</scale> | |
| <upperLimit>180.0</upperLimit> | |
| <lowerLimit>30.0</lowerLimit> | |
| <upperVelocity>1.0E8</upperVelocity> | |
| <lowerVelocity>-1.0E8</lowerVelocity> | |
| <staticOffset>117.87200943810359</staticOffset> | |
| <isLatch>true</isLatch> | |
| <indexLatch>128</indexLatch> | |
| <isStopOnLatch>false</isStopOnLatch> | |
| <homingTPS>10000000</homingTPS> | |
| <vitamins> | |
| <vitamin> | |
| <name>electroMechanical</name> | |
| <type>hobbyServo</type> | |
| <id>standardMicro</id> | |
| </vitamin> | |
| <vitamin> | |
| <name>shaft</name> | |
| <type>hobbyServoHorn</type> | |
| <id>standardMicro1</id> | |
| </vitamin> | |
| </vitamins> | |
| <passive>false</passive> | |
| <mass>0.059</mass> | |
| <centerOfMassFromCentroid> <x>31.18</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>0.0</rotx> | |
| <roty>0.0</roty> | |
| <rotz>0.0</rotz></centerOfMassFromCentroid> | |
| <imuFromCentroid> <x>0.0</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>-0.0</rotx> | |
| <roty>-0.0</roty> | |
| <rotz>-0.0</rotz></imuFromCentroid> | |
| <DHParameters> | |
| <Delta>0.0</Delta> | |
| <Theta>0.0</Theta> | |
| <Radius>0.0</Radius> | |
| <Alpha>0.0</Alpha> | |
| </DHParameters> | |
| </link> | |
| <ZframeToRAS | |
| > <x>0.0</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>-0.0</rotx> | |
| <roty>-0.0</roty> | |
| <rotz>-0.0</rotz> | |
| </ZframeToRAS> | |
| <baseToZframe> | |
| <x>25.0</x> | |
| <y>0.0</y> | |
| <z>110.0</z> | |
| <rotw>0.7071067811865476</rotw> | |
| <rotx>-0.7071067811865475</rotx> | |
| <roty>-0.0</roty> | |
| <rotz>-0.0</rotz> | |
| </baseToZframe> | |
| </appendage> | |
| <appendage> | |
| <name>Tail</name> | |
| <cadEngine> | |
| <git>https://gist.github.com/fb8c93b40c1accb9a1cc6e6ece989763.git</git> | |
| <file>MediumCad.groovy</file> | |
| </cadEngine> | |
| <kinematics> | |
| <git>https://gist.github.com/fb8c93b40c1accb9a1cc6e6ece989763.git</git> | |
| <file>DefaultDhSolver.groovy</file> | |
| </kinematics> | |
| <link> | |
| <name>basePan</name> | |
| <deviceName>hidDevice</deviceName> | |
| <type>hidfast</type> | |
| <index>14</index> | |
| <scale>-0.512698413</scale> | |
| <upperLimit>170.11753731343288</upperLimit> | |
| <lowerLimit>3.749999999999994</lowerLimit> | |
| <upperVelocity>1.0E8</upperVelocity> | |
| <lowerVelocity>-1.0E8</lowerVelocity> | |
| <staticOffset>141.88643338127187</staticOffset> | |
| <isLatch>true</isLatch> | |
| <indexLatch>235</indexLatch> | |
| <isStopOnLatch>false</isStopOnLatch> | |
| <homingTPS>10000000</homingTPS> | |
| <vitamins> | |
| <vitamin> | |
| <name>electroMechanical</name> | |
| <type>hobbyServo</type> | |
| <id>standardMicro</id> | |
| </vitamin> | |
| <vitamin> | |
| <name>shaft</name> | |
| <type>hobbyServoHorn</type> | |
| <id>standardMicro1</id> | |
| </vitamin> | |
| </vitamins> | |
| <passive>false</passive> | |
| <mass>0.0493</mass> | |
| <centerOfMassFromCentroid> <x>-24.46</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>0.0</rotx> | |
| <roty>0.0</roty> | |
| <rotz>0.0</rotz></centerOfMassFromCentroid> | |
| <imuFromCentroid> <x>0.0</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>-0.0</rotx> | |
| <roty>-0.0</roty> | |
| <rotz>-0.0</rotz></imuFromCentroid> | |
| <DHParameters> | |
| <Delta>0.0</Delta> | |
| <Theta>0.0</Theta> | |
| <Radius>40.5</Radius> | |
| <Alpha>-90.0</Alpha> | |
| </DHParameters> | |
| </link> | |
| <link> | |
| <name>baseTilt</name> | |
| <deviceName>hidDevice</deviceName> | |
| <type>hidfast</type> | |
| <index>13</index> | |
| <scale>-0.512698413</scale> | |
| <upperLimit>180.0</upperLimit> | |
| <lowerLimit>1.0</lowerLimit> | |
| <upperVelocity>1.0E8</upperVelocity> | |
| <lowerVelocity>-1.0E8</lowerVelocity> | |
| <staticOffset>89.71898853242566</staticOffset> | |
| <isLatch>true</isLatch> | |
| <indexLatch>128</indexLatch> | |
| <isStopOnLatch>false</isStopOnLatch> | |
| <homingTPS>10000000</homingTPS> | |
| <vitamins> | |
| <vitamin> | |
| <name>electroMechanical</name> | |
| <type>hobbyServo</type> | |
| <id>standardMicro</id> | |
| </vitamin> | |
| <vitamin> | |
| <name>shaft</name> | |
| <type>hobbyServoHorn</type> | |
| <id>standardMicro1</id> | |
| </vitamin> | |
| </vitamins> | |
| <passive>false</passive> | |
| <mass>0.0254</mass> | |
| <centerOfMassFromCentroid> <x>0.0</x> | |
| <y>65.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>0.0</rotx> | |
| <roty>0.0</roty> | |
| <rotz>0.0</rotz></centerOfMassFromCentroid> | |
| <imuFromCentroid> <x>0.0</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>-0.0</rotx> | |
| <roty>-0.0</roty> | |
| <rotz>-0.0</rotz></imuFromCentroid> | |
| <DHParameters> | |
| <Delta>0.0</Delta> | |
| <Theta>-90.0</Theta> | |
| <Radius>0.0</Radius> | |
| <Alpha>0.0</Alpha> | |
| </DHParameters> | |
| </link> | |
| <ZframeToRAS | |
| > <x>0.0</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>-0.0</rotx> | |
| <roty>-0.0</roty> | |
| <rotz>-0.0</rotz> | |
| </ZframeToRAS> | |
| <baseToZframe> | |
| <x>-96.4046556122449</x> | |
| <y>0.0</y> | |
| <z>113.07849494778381</z> | |
| <rotw>6.170670739598364E-5</rotw> | |
| <rotx>-6.170670739598362E-5</rotx> | |
| <roty>-0.7071067784940844</roty> | |
| <rotz>0.7071067784940845</rotz> | |
| </baseToZframe> | |
| </appendage> | |
| <ZframeToRAS> | |
| <x>0.0</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>-0.0</rotx> | |
| <roty>-0.0</roty> | |
| <rotz>-0.0</rotz> | |
| </ZframeToRAS> | |
| <baseToZframe> | |
| <x>0.0</x> | |
| <y>0.0</y> | |
| <z>0.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>-0.0</rotx> | |
| <roty>-0.0</roty> | |
| <rotz>-0.0</rotz> | |
| </baseToZframe> | |
| <mass>0.4157</mass> | |
| <centerOfMassFromCentroid> <x>-44.36</x> | |
| <y>0.0</y> | |
| <z>115.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>0.0</rotx> | |
| <roty>0.0</roty> | |
| <rotz>0.0</rotz></centerOfMassFromCentroid> | |
| <imuFromCentroid> <x>0.0</x> | |
| <y>0.0</y> | |
| <z>120.0</z> | |
| <rotw>1.0</rotw> | |
| <rotx>-0.0</rotx> | |
| <roty>-0.0</roty> | |
| <rotz>-0.0</rotz></imuFromCentroid> | |
| <vitamins> | |
| </vitamins> | |
| </mobilebase> | |
| </root> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.time.Duration; | |
| import java.util.ArrayList; | |
| import javafx.application.Platform; | |
| import org.reactfx.util.FxTimer; | |
| import com.neuronrobotics.sdk.addons.kinematics.DHParameterKinematics; | |
| import com.neuronrobotics.sdk.addons.kinematics.MobileBase; | |
| import com.neuronrobotics.sdk.addons.kinematics.math.RotationNR; | |
| import com.neuronrobotics.sdk.addons.kinematics.math.TransformNR; | |
| import com.neuronrobotics.sdk.util.ThreadUtil; | |
| import com.neuronrobotics.sdk.addons.kinematics.IDriveEngine; | |
| double stepOverHeight=7.5; | |
| long stepOverTime=150;// Servo loop times number of points times Nyquest doubeling | |
| Double zLock= 9; | |
| Closure calcHome = { DHParameterKinematics leg -> | |
| TransformNR h=leg.calcHome() | |
| TransformNR legRoot= leg.getRobotToFiducialTransform() | |
| TransformNR tr = leg.forwardOffset(new TransformNR()) | |
| tr.setZ(zLock) | |
| //Bambi-on-ice the legs a bit | |
| if(legRoot.getY()>0){ | |
| tr.translateY(10) | |
| }else{ | |
| tr.translateY(-10) | |
| } | |
| if(legRoot.getX()>0){ | |
| //tr.translateX(10) | |
| } | |
| return tr; | |
| } | |
| boolean usePhysicsToMove = true; | |
| long stepCycleTime =600 | |
| long walkingTimeout =stepCycleTime*2 | |
| int numStepCycleGroups = 2 | |
| double standardHeadTailAngle = -20 | |
| double staticPanOffset = 30 | |
| double coriolisGain = 1.1 | |
| boolean headStable = true | |
| double maxBodyDisplacementPerStep = 40 | |
| double minBodyDisplacementPerStep = 30 | |
| def ar = [stepOverHeight, | |
| stepOverTime, | |
| zLock, | |
| calcHome, | |
| usePhysicsToMove, | |
| stepCycleTime, | |
| numStepCycleGroups, | |
| standardHeadTailAngle, | |
| staticPanOffset, | |
| coriolisGain, | |
| headStable, | |
| maxBodyDisplacementPerStep, | |
| minBodyDisplacementPerStep, | |
| walkingTimeout] | |
| return ScriptingEngine | |
| .gitScriptRun( | |
| "https://github.com/OperationSmallKat/SmallKat_V2.git", // git location of the library | |
| "Bowler/DynamicWalking.groovy" , // file to load | |
| ar | |
| ) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment