public class UniversalJoint extends Joint implements IUniversalJoint
Constructor and Description |
---|
UniversalJoint(IUniversalJointConfiguration jointConfig)
Instantiates a new UniversalJoint sensor
|
Modifier and Type | Method and Description |
---|---|
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.
|
java.util.List<IJoint> |
getAllSubJoints() |
float |
getAxis1()
Retrieve joint axis1 angle
|
float |
getAxis2()
Retrieve joint axis2 angle
|
float |
getMaxAxis1() |
float |
getMaxAxis2() |
float |
getMinAxis1() |
float |
getMinAxis2() |
float |
getNextAxis1Speed()
Returns the next axis1 speed to the joint.
|
float |
getNextAxis2Speed()
Returns the next axis2 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.
|
int |
hashCode() |
void |
performAxis1Position(float position)
Let the hinge joint perform a movement along axis1 in direction of the
given target position (at maximum speed)
|
void |
performAxis1Position(float position,
float maxSpeed)
Let the hinge joint perform a movement along axis1 in direction of the
given target position with the given speed as maximum speed
|
void |
performAxis1Speed(float speed)
Let the universal joint perform a movement along axis1 with the given
speed in the current cycle.
|
void |
performAxis2Position(float position)
Let the hinge joint perform a movement along axis2 in direction of the
given target position (at maximum speed)
|
void |
performAxis2Position(float position,
float maxSpeed)
Let the hinge joint perform a movement along axis2 in direction of the
given target position with the given speed as maximum speed
|
void |
performAxis2Speed(float speed)
Let the universal joint perform a movement along axis2 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 |
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
|
getName, getPerceptorName, toString, updateNoPerception
getName, updateNoPerception
public UniversalJoint(IUniversalJointConfiguration jointConfig)
jointConfig
- - the joint meta modeleffector1
- effector2
- public float getAxis1()
IUniversalJoint
getAxis1
in interface IUniversalJoint
public float getAxis2()
IUniversalJoint
getAxis2
in interface IUniversalJoint
public float getMinAxis1()
getMinAxis1
in interface IUniversalJoint
public float getMinAxis2()
getMinAxis2
in interface IUniversalJoint
public float getMaxAxis1()
getMaxAxis1
in interface IUniversalJoint
public float getMaxAxis2()
getMaxAxis2
in interface IUniversalJoint
public float getNextAxis1Speed()
IUniversalJoint
getNextAxis1Speed
in interface IUniversalJoint
public float getNextAxis2Speed()
IUniversalJoint
getNextAxis2Speed
in interface IUniversalJoint
public void performAxis1Speed(float speed)
IUniversalJoint
performAxis1Speed
in interface IUniversalJoint
speed
- to move the joint axis1 (in deg/cycle)public void performAxis2Speed(float speed)
IUniversalJoint
performAxis2Speed
in interface IUniversalJoint
speed
- to move the joint axis2 (in deg/cycle)public void performAxis1Position(float position)
IUniversalJoint
performAxis1Position
in interface IUniversalJoint
position
- - target position of axis1 movementpublic void performAxis2Position(float position)
IUniversalJoint
performAxis2Position
in interface IUniversalJoint
position
- - target position of axis2 movementpublic void performAxis1Position(float position, float maxSpeed)
IUniversalJoint
performAxis1Position
in interface IUniversalJoint
position
- - target position of axis1 movementmaxSpeed
- - maximum allowed speed for movement (in deg/cycle)public void performAxis2Position(float position, float maxSpeed)
IUniversalJoint
performAxis2Position
in interface IUniversalJoint
position
- - target position of axis2 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 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