hmi.physics.controller
Class BalanceController

java.lang.Object
  extended by hmi.physics.controller.BalanceController
All Implemented Interfaces:
PhysicalController

public class BalanceController
extends Object
implements PhysicalController

Balance controller Entry condition: both feet are flat on the ground Uses the rotation of both feet to determine the local facing direction of the physical humanoid.

Author:
welberge

Field Summary
private  float[] balanceOffset
           
private  float[] center
           
private  String[] desjointIDs
           
private  boolean firstRun
           
private  boolean groundCheck
           
private  String[] jointIDs
           
private  float kpKnee
           
private  float kpx
           
private  float kpz
           
private  float kvKnee
           
private  float kvx
           
private  float kvz
           
private  float[] left
           
private  PhysicalJoint leftAnkle
           
private  PhysicalSegment leftFoot
           
private  float[] leftFw
           
private  PhysicalJoint leftHip
           
private  PhysicalJoint leftKnee
           
private  float lHipC
           
private  float lHipCZ
           
private  float lKneeC
           
private  float ll
           
private  float[] offset
           
private  float pelH
           
private  PhysicalHumanoid ph
           
private  float[] qBody
           
private  float[] qLeftFoot
           
private  float[] qRightFoot
           
private  float[] relCoM
           
private  float[] relCoMDiff
           
private  float rHipC
           
private  float rHipCZ
           
private  float[] right
           
private  PhysicalJoint rightAnkle
           
private  PhysicalSegment rightFoot
           
private  float[] rightFw
           
private  PhysicalJoint rightHip
           
private  PhysicalJoint rightKnee
           
private  float rKneeC
           
private  float rotXLFoot
           
private  float rotXRFoot
           
private  float rotZLFoot
           
private  float rotZRFoot
           
private  float s
           
private  float ul
           
private  float[] v1
           
 
Constructor Summary
BalanceController()
           
BalanceController(PhysicalHumanoid p)
           
BalanceController(PhysicalHumanoid p, boolean gcheck)
           
 
Method Summary
 PhysicalController copy(PhysicalHumanoid ph)
          Creates a copy of the controller
 String[] getDesiredJointIDs()
          Gets the ids of joints the controller would like to steer if available
 String getParameterValue(String name)
          Get the parameter value of parameter name, return null if not found
 String[] getRequiredJointIDs()
          Gets the ids of controlled joints
 void reset()
          Clears out all previous time dependen variables
 void setKMultiplier(float km)
           
 void setParameterValue(String name, float value)
           
 void setParameterValue(String name, String value)
           
 void setPelH(float pelH)
           
 void setPhysicalHumanoid(PhysicalHumanoid p)
          Links the controller to a new set of physical joints
 void update(double timeDiff)
          Updates the controller
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ph

private PhysicalHumanoid ph

leftFoot

private PhysicalSegment leftFoot

rightFoot

private PhysicalSegment rightFoot

leftAnkle

private PhysicalJoint leftAnkle

rightAnkle

private PhysicalJoint rightAnkle

rightHip

private PhysicalJoint rightHip

leftHip

private PhysicalJoint leftHip

rightKnee

private PhysicalJoint rightKnee

leftKnee

private PhysicalJoint leftKnee

qLeftFoot

private float[] qLeftFoot

qRightFoot

private float[] qRightFoot

qBody

private float[] qBody

relCoM

private float[] relCoM

relCoMDiff

private float[] relCoMDiff

left

private float[] left

right

private float[] right

center

private float[] center

offset

private float[] offset

balanceOffset

private final float[] balanceOffset

leftFw

private float[] leftFw

rightFw

private float[] rightFw

kpx

private float kpx

kvx

private float kvx

kpz

private float kpz

kvz

private float kvz

kpKnee

private float kpKnee

kvKnee

private float kvKnee

rotXLFoot

private float rotXLFoot

rotXRFoot

private float rotXRFoot

rotZLFoot

private float rotZLFoot

rotZRFoot

private float rotZRFoot

lKneeC

private float lKneeC

rKneeC

private float rKneeC

lHipC

private float lHipC

rHipC

private float rHipC

lHipCZ

private float lHipCZ

rHipCZ

private float rHipCZ

ul

private float ul

ll

private float ll

pelH

private float pelH

v1

private float[] v1

groundCheck

private boolean groundCheck

s

private float s

jointIDs

private final String[] jointIDs

desjointIDs

private String[] desjointIDs

firstRun

private boolean firstRun
Constructor Detail

BalanceController

public BalanceController()

BalanceController

public BalanceController(PhysicalHumanoid p)

BalanceController

public BalanceController(PhysicalHumanoid p,
                         boolean gcheck)
Method Detail

reset

public void reset()
Description copied from interface: PhysicalController
Clears out all previous time dependen variables

Specified by:
reset in interface PhysicalController

setKMultiplier

public void setKMultiplier(float km)

setPhysicalHumanoid

public void setPhysicalHumanoid(PhysicalHumanoid p)
Description copied from interface: PhysicalController
Links the controller to a new set of physical joints

Specified by:
setPhysicalHumanoid in interface PhysicalController
Parameters:
p - physical humanoid to link to

getRequiredJointIDs

public String[] getRequiredJointIDs()
Description copied from interface: PhysicalController
Gets the ids of controlled joints

Specified by:
getRequiredJointIDs in interface PhysicalController

update

public void update(double timeDiff)
Description copied from interface: PhysicalController
Updates the controller

Specified by:
update in interface PhysicalController
Parameters:
timeDiff - time since last update

setPelH

public void setPelH(float pelH)
Parameters:
pelH - the pelH to set

copy

public PhysicalController copy(PhysicalHumanoid ph)
Description copied from interface: PhysicalController
Creates a copy of the controller

Specified by:
copy in interface PhysicalController

getParameterValue

public String getParameterValue(String name)
Description copied from interface: PhysicalController
Get the parameter value of parameter name, return null if not found

Specified by:
getParameterValue in interface PhysicalController

setParameterValue

public void setParameterValue(String name,
                              String value)
Specified by:
setParameterValue in interface PhysicalController

setParameterValue

public void setParameterValue(String name,
                              float value)
Specified by:
setParameterValue in interface PhysicalController

getDesiredJointIDs

public String[] getDesiredJointIDs()
Description copied from interface: PhysicalController
Gets the ids of joints the controller would like to steer if available

Specified by:
getDesiredJointIDs in interface PhysicalController