public interface IBodyModel
Modifier and Type | Method and Description |
---|---|
void |
adjustHingeJointPosition(java.lang.String name,
double delta)
Adjusts the desired speed of the passed joint to reach current position +
delta
|
IBodyPart |
getBodyPart(java.lang.String name) |
org.apache.commons.math3.geometry.euclidean.threed.Vector3D |
getCenterOfGravity()
Center of Mass relative to the ground
TODO: Should be renamed to "Center of Stability" or something, since
"center of Gravity" would resoult in the same as "Center of Mass" as all
Body Parts have the same density
|
org.apache.commons.math3.geometry.euclidean.threed.Vector3D |
getCenterOfMass()
Center of Mass
|
org.apache.commons.math3.geometry.euclidean.threed.Vector3D[] |
getCorners(IBodyPart part)
Get the position of the corners of the given BodyPart relative to the
torso center.
|
IJoint |
getJoint(java.lang.String name) |
ISensor |
getSensor(java.lang.String name) |
org.apache.commons.math3.geometry.euclidean.threed.Vector3D[] |
getStabilityHull()
4 Vectors that define the stability hull
0: Left foot, left tiptoe 1: Left foot, left heel 2: Right foot, right tiptoe 3: Right foot, right heel |
IBodyPart |
getTorso() |
boolean |
moveBodyPartToPose(java.lang.String targetBodyName,
Pose6D targetPose)
Convenient method for
moveBodyPartToPose(String, Vector3D, Vector3D) . |
boolean |
moveBodyPartToPose(java.lang.String targetBodyName,
org.apache.commons.math3.geometry.euclidean.threed.Vector3D targetPosition,
org.apache.commons.math3.geometry.euclidean.threed.Vector3D targetAngles)
Move the targetBodyPart to the specified target pose relative to the torso
using the underlying agent IK-solver.
|
void |
performInitialPose()
Moves all joints towards their zero position.
|
void |
resetAllMovements()
Reset all movements (set all joint speeds to 0).
|
void |
setHingeJointPosition(java.lang.String name,
double value) |
ISensor getSensor(java.lang.String name)
name
- the name of the sensor to returnIJoint getJoint(java.lang.String name)
name
- name of the joint to retrieveIBodyPart getTorso()
IBodyPart getBodyPart(java.lang.String name)
name
- the name of the body part to returnorg.apache.commons.math3.geometry.euclidean.threed.Vector3D getCenterOfMass()
org.apache.commons.math3.geometry.euclidean.threed.Vector3D getCenterOfGravity()
org.apache.commons.math3.geometry.euclidean.threed.Vector3D[] getStabilityHull()
void setHingeJointPosition(java.lang.String name, double value)
name
- the name of the hinge joint to change axis speedvalue
- the position this joint should reach (in degrees?)void performInitialPose()
void resetAllMovements()
void adjustHingeJointPosition(java.lang.String name, double delta)
name
- the name of the hinge joint to change axis speeddelta
- the delta angle (deg) to add to the current positionorg.apache.commons.math3.geometry.euclidean.threed.Vector3D[] getCorners(IBodyPart part)
6___________4 /| /| / | / | 7___________5 | | | | | | 3________|__1 z | / | / | x |/ |/ | / 2___________0 |/_____yTODO: change the method (BodyPart.getCorners()) that the sequence makes more sense
part
- The BodyPartboolean moveBodyPartToPose(java.lang.String targetBodyName, Pose6D targetPose)
moveBodyPartToPose(String, Vector3D, Vector3D)
.targetBodyName
- the name of the body part that should be movedtargetPose
- the target poseboolean moveBodyPartToPose(java.lang.String targetBodyName, org.apache.commons.math3.geometry.euclidean.threed.Vector3D targetPosition, org.apache.commons.math3.geometry.euclidean.threed.Vector3D targetAngles)
targetBodyName
- the name of the body part that should be movedtargetPosition
- the target positiontargetAngles
- the target angles