Skip to content

Instantly share code, notes, and snippets.

@madhephaestus
Last active November 10, 2019 23:38
Show Gist options
  • Select an option

  • Save madhephaestus/02912fdff9d67de5f36fafd87e40f064 to your computer and use it in GitHub Desktop.

Select an option

Save madhephaestus/02912fdff9d67de5f36fafd87e40f064 to your computer and use it in GitHub Desktop.
gistGetTipLocations.groovy
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