public class HingeJoint extends Joint implements IHingeJoint
Constructor and Description |
---|
HingeJoint(IHingeJointConfiguration jointConfig) |
Modifier and Type | Method and Description |
---|---|
void |
adjustAxisPosition(double delta)
Adjusts the desired speed of this joint to reach current position + delta
|
ISensor |
copy() |
boolean |
equals(java.lang.Object o) |
void |
generateJointAction(java.util.Map<java.lang.String,float[]> actions)
Informs the action component to create action commands from this joint.
|
float |
getAcceleration() |
java.util.List<IJoint> |
getAllSubJoints() |
float |
getAxis()
Retrieve the current axis position angle of the joint.
|
org.apache.commons.math3.geometry.euclidean.threed.Vector3D |
getJointAxis() |
float |
getMax() |
float |
getMaxSpeed() |
float |
getMin() |
IMotor |
getMotor() |
float |
getNextAxisSpeed()
Returns the next axis speed to the joint.
|
org.apache.commons.math3.geometry.euclidean.threed.Rotation |
getRotation()
Retrieve the rotation matrix, related to the current axis positions of the
joint.
|
float |
performAxisPosition(double position)
Let the hinge joint perform a movement in direction of the given target
position (at maximum speed)
|
float |
performAxisPosition(double position,
float max_speed)
Let the hinge joint perform a movement in direction of the given target
position with the given speed as maximum speed
|
void |
performAxisSpeed(float speed)
Called to act by setting an angular speed
|
void |
performInitialPosition()
Called to perform a movement towards the initial position of the joint.
|
void |
resetMovement()
Called to reset all currently set movements of the joint and perform no
movement at all (zero axis speed).
|
void |
updateFromPerception(IPerception perception)
Updates the joint values in the body model from perception
|
void |
updateJointPositionFromJoint(IJoint joint)
Upates the speed values of this joint by copying them from the passed
joint
|
void |
updateNoPerception()
Updates the joint values in the body model with no perception
|
getName, getPerceptorName, hashCode, toString, updateSensors
getName, updateSensors
public HingeJoint(IHingeJointConfiguration jointConfig)
public float getAxis()
IHingeJointR
getAxis
in interface IHingeJointR
public float getMin()
getMin
in interface IHingeJointR
public float getMax()
getMax
in interface IHingeJointR
public void performAxisSpeed(float speed)
performAxisSpeed
in interface IHingeJoint
speed
- the angular speed (in degrees per cycle)public void adjustAxisPosition(double delta)
IHingeJoint
adjustAxisPosition
in interface IHingeJoint
delta
- the delta angle (deg) to add to the current positionpublic float performAxisPosition(double position)
IHingeJoint
performAxisPosition
in interface IHingeJoint
position
- - target position of movementpublic float performAxisPosition(double position, float max_speed)
IHingeJoint
performAxisPosition
in interface IHingeJoint
position
- - target position of movementmax_speed
- - maximum allowed speed for movement (in deg/cycle)public void performInitialPosition()
IJoint
performInitialPosition
in interface IJoint
public void resetMovement()
IJoint
resetMovement
in interface IJoint
public float getNextAxisSpeed()
IHingeJointR
getNextAxisSpeed
in interface IHingeJointR
public org.apache.commons.math3.geometry.euclidean.threed.Rotation getRotation()
IJoint
getRotation
in interface IJoint
public org.apache.commons.math3.geometry.euclidean.threed.Vector3D getJointAxis()
getJointAxis
in interface IHingeJointR
public ISensor copy()
public void generateJointAction(java.util.Map<java.lang.String,float[]> actions)
IJoint
generateJointAction
in interface IJoint
actions
- a map of effector name, values pairspublic void updateFromPerception(IPerception perception)
Sensor
updateFromPerception
in interface ISensor
updateFromPerception
in class Sensor
perception
- the new perception we madepublic void updateNoPerception()
ISensor
updateNoPerception
in interface ISensor
updateNoPerception
in class Sensor
public void updateJointPositionFromJoint(IJoint joint)
IJoint
updateJointPositionFromJoint
in interface IJoint
joint
- the joint used as sourcepublic float getMaxSpeed()
getMaxSpeed
in interface IHingeJointR
public IMotor getMotor()
getMotor
in interface IHingeJoint
public float getAcceleration()
getAcceleration
in interface IHingeJointR
public java.util.List<IJoint> getAllSubJoints()
getAllSubJoints
in interface IJoint