public class CompositeJoint extends Joint implements ICompositeJoint
Constructor and Description |
---|
CompositeJoint(ICompositeJointConfiguration jointConfig)
Instantiates a new UniversalJoint sensor
|
Modifier and Type | Method and Description |
---|---|
ISensor |
copy() |
void |
generateJointAction(java.util.Map<java.lang.String,float[]> actions)
Informs the action component to create action commands from this joint.
|
java.util.List<IJoint> |
getAllSubJoints() |
float |
getAxis(int i)
Retrieve joint axis[index] angle
|
float |
getMaxAxis(int i) |
float |
getMinAxis(int i) |
float |
getNextAxisSpeed(int i)
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.
|
void |
performAxisPosition(int i,
float position)
Let the joint perform a movement along axis in direction of the given
target position (at maximum speed)
|
void |
performAxisPosition(int i,
float position,
float maxSpeed)
Let the hinge joint perform a movement along axis in direction of the
given target position with the given speed as maximum speed
|
void |
performAxisSpeed(int i,
float speed)
Let the joint perform a movement along axis with the given speed in the
current cycle.
|
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
|
void |
updateSensors(java.util.Map<java.lang.String,ISensor> flatSensors,
java.util.Map<java.lang.String,ISensor> structuredSensors)
Adds this sensor the appropriate list depending if it is structured or not
|
public CompositeJoint(ICompositeJointConfiguration jointConfig)
jointConfig
- - the joint meta modeleffector1
- effector2
- public float getAxis(int i)
ICompositeJoint
getAxis
in interface ICompositeJoint
i
- index of the joint to work onpublic float getMinAxis(int i)
getMinAxis
in interface ICompositeJoint
i
- index of the joint to work onpublic float getMaxAxis(int i)
getMaxAxis
in interface ICompositeJoint
i
- index of the joint to work onpublic float getNextAxisSpeed(int i)
ICompositeJoint
getNextAxisSpeed
in interface ICompositeJoint
i
- index of the joint to work onpublic void performAxisSpeed(int i, float speed)
ICompositeJoint
performAxisSpeed
in interface ICompositeJoint
i
- index of the joint to work onspeed
- to move the joint axis (in deg/cycle)public void performAxisPosition(int i, float position)
ICompositeJoint
performAxisPosition
in interface ICompositeJoint
i
- index of the joint to work onposition
- - target position of axis1 movementpublic void performAxisPosition(int i, float position, float maxSpeed)
ICompositeJoint
performAxisPosition
in interface ICompositeJoint
i
- index of the joint to work onposition
- - target position of axis movementmaxSpeed
- - 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 org.apache.commons.math3.geometry.euclidean.threed.Rotation getRotation()
IJoint
getRotation
in interface IJoint
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 java.util.List<IJoint> getAllSubJoints()
getAllSubJoints
in interface IJoint
public void updateSensors(java.util.Map<java.lang.String,ISensor> flatSensors, java.util.Map<java.lang.String,ISensor> structuredSensors)
ISensor
updateSensors
in interface ISensor
updateSensors
in class Sensor