hmi.physics.controller
Class MeathookBalanceController

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

public class MeathookBalanceController
extends Object
implements PhysicalController

TODO: test this

Author:
welberge

Field Summary
private  float d0
           
private  String[] desJointIDs
           
private  float[] dir
           
private  float[] dirDiff
           
private  float dOffset
           
private  float dRest
           
private  float Fold
           
private  String[] jointIDs
           
private  float kd
           
private  float kv
           
private  float mass
           
private  PhysicalHumanoid pHuman
           
private  float[] pos
           
private  PhysicalSegment seg
           
private  float[] springOrig
           
 
Constructor Summary
MeathookBalanceController(PhysicalHumanoid p)
           
 
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 setParameterValue(String name, float value)
           
 void setParameterValue(String name, String value)
           
 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

springOrig

private float[] springOrig

dir

private float[] dir

dirDiff

private float[] dirDiff

pos

private float[] pos

d0

private float d0

dOffset

private float dOffset

mass

private float mass

dRest

private float dRest

kv

private float kv

kd

private float kd

Fold

private float Fold

pHuman

private PhysicalHumanoid pHuman

seg

private PhysicalSegment seg

jointIDs

private final String[] jointIDs

desJointIDs

private String[] desJointIDs
Constructor Detail

MeathookBalanceController

public MeathookBalanceController(PhysicalHumanoid p)
Method Detail

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

reset

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

Specified by:
reset 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

getRequiredJointIDs

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

Specified by:
getRequiredJointIDs in interface PhysicalController

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