Last active
November 10, 2019 23:38
-
-
Save madhephaestus/02912fdff9d67de5f36fafd87e40f064 to your computer and use it in GitHub Desktop.
gistGetTipLocations.groovy
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
| def base; | |
| //Check if the device already exists in the device Manager | |
| if(args==null){ | |
| base=DeviceManager.getSpecificDevice( "MediumKat",{ScriptingEngine.gitScriptRun( "https://github.com/OperationSmallKat/SmallKat_V2.git", "loadRobot.groovy", [ "https://github.com/OperationSmallKat/greycat.git", "MediumKat.xml","GameController_22"] )}) | |
| }else | |
| base=args.get(0) | |
| HashMap<DHParameterKinematics,TransformNR > getTipLocations(def base){ | |
| def legs = base.getLegs() | |
| def tipList = new HashMap<DHParameterKinematics,TransformNR >() | |
| for(def leg:legs){ | |
| // Read the location of the foot before moving the body | |
| def home =leg.getCurrentPoseTarget() | |
| tipList.put(leg,home) | |
| } | |
| return tipList | |
| } | |
| println getTipLocations(base) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment