|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.physics.controller.BallJointController
public class BallJointController
A PD-controller that guides a ball joint to a certain desired angle and (optionally) desired avelocity for each angle: torque = ks * (desiredangle-currentangle) + ds * (desiredavelocity - currentavelocity) with ks the spring gain, ds the damper gain Note that this controller requires a high physical simulation rate (3 ms or less)
| Field Summary | |
|---|---|
private float |
anglex
|
private float |
angley
|
private float |
anglez
|
private float |
aprevx
|
private float |
aprevy
|
private float |
aprevz
|
private float |
avelx
|
private float |
avely
|
private float |
avelz
|
private static float |
DEFAULT_DSX
|
private static float |
DEFAULT_DSY
|
private static float |
DEFAULT_DSZ
|
private static float |
DEFAULT_KSX
|
private static float |
DEFAULT_KSY
|
private static float |
DEFAULT_KSZ
|
private String[] |
desJointIDs
|
private float |
dsx
|
private float |
dsy
|
private float |
dsz
|
private boolean |
firstRun
|
private PhysicalJoint |
joint
|
private String |
jointId
|
private String[] |
jointIDs
|
private float |
ksx
|
private float |
ksy
|
private float |
ksz
|
private org.slf4j.Logger |
logger
|
private PhysicalHumanoid |
pHuman
|
| Constructor Summary | |
|---|---|
BallJointController()
|
|
BallJointController(PhysicalJoint j,
float ax,
float ay,
float az)
Constructor, sets up a PD-controller with 0 desired velocity Spring and damper gains are set up to dampen a shoulder joint that loosely hangs down |
|
BallJointController(PhysicalJoint j,
float ax,
float ay,
float az,
float avx,
float avy,
float avz,
float kx,
float ky,
float kz,
float dx,
float dy,
float dz)
Constructor |
|
| 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 ph)
Links the controller to a new set of physical joints |
void |
setSprings(float kx,
float ky,
float kz)
Sets new spring values |
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 |
|---|
private org.slf4j.Logger logger
private PhysicalJoint joint
private String jointId
private float anglex
private float angley
private float anglez
private float avelx
private float avely
private float avelz
private float aprevx
private float aprevy
private float aprevz
private float ksx
private float dsx
private float ksy
private float dsy
private float ksz
private float dsz
private static final float DEFAULT_KSX
private static final float DEFAULT_DSX
private static final float DEFAULT_KSY
private static final float DEFAULT_DSY
private static final float DEFAULT_KSZ
private static final float DEFAULT_DSZ
private String[] jointIDs
private String[] desJointIDs
private boolean firstRun
private PhysicalHumanoid pHuman
| Constructor Detail |
|---|
public BallJointController(PhysicalJoint j,
float ax,
float ay,
float az,
float avx,
float avy,
float avz,
float kx,
float ky,
float kz,
float dx,
float dy,
float dz)
j - physical joint that is controlledax - desired x angleay - desired y angleaz - desired z angleavx - desired x avelocityavy - desired y avelocityavz - desired z avelocitykx - spring gain xky - spring gain ykz - spring gain zdx - damper gain xdy - damper gain ydz - damper gain z
Note that x y and z are just the 1st, 2nd and 3rd axis as set up in the physical joint,
not necessarily x y and z axis.
public BallJointController(PhysicalJoint j,
float ax,
float ay,
float az)
j - controlled physical jointax - desired x angleay - desired y angleaz - desired z anglepublic BallJointController()
| Method Detail |
|---|
public void setSprings(float kx,
float ky,
float kz)
public void reset()
PhysicalController
reset in interface PhysicalControllerpublic void update(double timeDiff)
PhysicalController
update in interface PhysicalControllertimeDiff - time since last updatepublic String[] getRequiredJointIDs()
PhysicalController
getRequiredJointIDs in interface PhysicalControllerpublic void setPhysicalHumanoid(PhysicalHumanoid ph)
PhysicalController
setPhysicalHumanoid in interface PhysicalControllerph - physical humanoid to link topublic PhysicalController copy(PhysicalHumanoid ph)
PhysicalController
copy in interface PhysicalControllerpublic String getParameterValue(String name)
PhysicalController
getParameterValue in interface PhysicalController
public void setParameterValue(String name,
String value)
setParameterValue in interface PhysicalController
public void setParameterValue(String name,
float value)
setParameterValue in interface PhysicalControllerpublic String[] getDesiredJointIDs()
PhysicalController
getDesiredJointIDs in interface PhysicalController
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||