Balance

During joint control (choregraphe timeline for example), motion can be stabilized by Whole Body balancer. Consequently, initial motion is modified to the closest motion which respect balance and/or foot state.

Whole Body balancer have to be activated to use the following function (api wbEnable).

Foot State

This api sets the foot state:

  • Fixed. The 6 cartesian degrees of freedom are constrained. The foot are completely fixed.
  • Plane. It constrained the foot in the plane. The following cartesian axis are constrained (Z, WX, WY). Foot can move in X, Y et WZ axis.
  • Free. The foot can move in all the cartesian axis.

# Example showing how to fix the feet. stateName = "Fixed" supportLeg = "Legs" proxy.wbFootState(stateName, supportLeg)

Note:

Use choregraphe box "Keep Balance"!

Balance Constraint

Balance can be activated/disactivated. Support polygon depends of support leg: Legs (both feet), LLeg or RLeg.

# Example showing how to Constraint Balance Motion. isEnable = True supportLeg = "Legs" proxy.wbEnableBalanceConstraint(isEnable, supportLeg)

At last, Foot have to be constrained. The following combination are allowed:

# wbEnableBalanceConstraint(True, "Legs") with: # - wbFootState("Fixed", "Legs") # - wbFootState("Fixed", "LLeg") and wbFootState("Plane", "RLeg") # - wbFootState("Fixed", "RLeg") and wbFootState("Plane", "LLeg") # wbEnableBalanceConstraint(True, "LLeg") with: # - wbFootState("Fixed", "Legs") # - wbFootState("Fixed", "LLeg") and wbFootState("Fixed", "RLeg") # - wbFootState("Fixed", "LLeg") and wbFootState("Plane", "RLeg") # - wbFootState("Fixed", "LLeg") and wbFootState("Free" , "RLeg") # wbEnableBalanceConstraint(True, "RLeg") with: # - wbFootState("Fixed", "Legs") # - wbFootState("Fixed", "RLeg") and wbFootState("Fixed", "LLeg") # - wbFootState("Fixed", "RLeg") and wbFootState("Plane", "LLeg") # - wbFootState("Fixed", "RLeg") and wbFootState("Free" , "LLeg")

Warning:

When asked, if COM is not inside the desired support polygon, this constraint is not activated.

Examples

# Example of a whole body FootState # Warning: Needs a PoseInit before executing # Whole body balancer must be disactivated at the end of the script # Example available: path/to/aldebaran-sdk/modules/src/examples/ # python/motion_wbFootState.py # Activate Whole Body Balancer. isEnabled = True proxy.wbEnable(isEnabled) # Legs are constrained in a plane stateName = "Plane" supportLeg = "Legs" proxy.wbFootState(stateName, supportLeg) # HipYawPitch angleInterpolation # Without Whole Body balancer, foot will not be kept plane. names = "LHipYawPitch" angleLists = [-45.0, 10.0, 0.0] timeLists = [3.0, 6.0, 9.0] isAbsolute = True angleLists = [angle*math.pi/180.0 for angle in angleLists] proxy.angleInterpolation(names, angleLists, timeLists, isAbsolute) # Disactivate Whole Body Balancer. isEnabled = False proxy.wbEnable(isEnabled)

# Example of a whole body Enable Balance Constraint # Warning: Needs a PoseInit before executing # Whole body balancer must be disactivated at the end of the script # Example available: path/to/aldebaran-sdk/modules/src/examples/ # python/motion_wbEnableBalanceConstraint.py # Activate Whole Body Balancer. isEnabled = True proxy.wbEnable(isEnabled) # Legs are constrained in a plane stateName = "Fixed" supportLeg = "Legs" proxy.wbFootState(stateName, supportLeg) # Constraint Balance Motion. isEnable = True supportLeg = "Legs" proxy.wbEnableBalanceConstraint(isEnable, supportLeg) # KneePitch angleInterpolation # Without Whole Body balancer, foot will fall down. names = ["LKneePitch", "RKneePitch"] angleLists = [ [0.0, 40.0*math.pi/180.0], [0.0, 40.0*math.pi/180.0]] timeLists = [ [5.0, 10.0], [5.0, 10.0]] isAbsolute = True proxy.angleInterpolation(names, angleLists, timeLists, isAbsolute) # Disactivate Whole Body Balancer. isEnabled = False proxy.wbEnable(isEnabled)





Copyright © 2010 Aldebaran-Robotics - All rights reserved