|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectRobot
class Robot
The class Robot provides methods for initialising the AF2 robot's hardware and axes, moving the axis motors, and getting the status of the robot. It also provides methods for viewing and moving fibres.
Constructor Summary | |
---|---|
private |
Robot()
Robot private constructor |
Method Summary | |
---|---|
(package private) void |
closeGripper()
Close the gripper |
private void |
defineAuxiliaryEncoderPosition(MotionControllerAxis theAxis,
int encoderPosition)
Define the auxiliary encoder position |
private void |
defineEncoderPosition(MotionControllerAxis theAxis,
int encoderPosition)
Define the encoder position |
private void |
dragFibre(Fibre theFibre,
int xOffset,
int yOffset)
Drag the fibre on the field plate by an offset in x and y |
(package private) void |
extract()
Extract the robot from its limit switches |
(package private) long |
getAcceleration(MotionControllerAxis theAxis)
Get the axis acceleration |
private long |
getClosestThetaAngle(long deltaThetaInArcMins)
Get the closer theta angle to a given rotation angle |
private long |
getClosestThetaDemandEncoderPosition(long demandThetaInArcMins)
Get the closest theta demand position to an angle |
(package private) RobotConfiguration |
getConfiguration()
Get the robot's configuration |
private java.awt.Point |
getFibrePosition(Fibre theFibre)
Get the fibre's position in the true robot coordinates |
(package private) int |
getFibrePositioningIterations()
Get the number of fibre positioning iterations |
(package private) int |
getFibrePositioningTolerance()
Get the fibre positioning tolerance |
(package private) long |
getPEncoderPosition()
Get the probe encoder position |
(package private) long |
getPPositionInMicrons()
Get the probe position in microns |
(package private) java.awt.Point |
getSkyViewingProbePositionInMicrons()
Get the robot's sky viewing probe position in microns, corrected for temperature expansion and non-orthogonality |
(package private) long |
getSpeed(MotionControllerAxis theAxis)
Get the axis speed |
(package private) double |
getTemperature()
Get the robot temperature |
(package private) long |
getTEncoderPosition()
Get the theta encoder position |
(package private) long |
getTPositionInArcmins()
Get the theta angle |
(package private) long |
getTPositionInArcmins(long tEncoderPosition)
Get the theta angle |
(package private) long |
getXEncoderPosition()
Get the y encoder position |
(package private) java.awt.Point |
getXYCorrectedPositionInMicrons()
Get the robot's true position in microns, corrected for temperature expansion and non-orthogonality |
private java.awt.Point |
getXYCorrectedPositionInMicrons(java.awt.Point theXYEncoderPosition)
Get the true xy position in microns, corrected for thermal expansion, axis straightness, and non-orthogonality |
private java.awt.Point |
getXYDistance(java.awt.Point point1,
java.awt.Point point2)
Get the distance in x and y between two points |
(package private) java.awt.Point |
getXYLinearEncoderPosition()
Get the x-y position of the robot from its linear encoders |
private java.awt.Point |
getXYOthogonalityCorrectedPosition(java.awt.Point thePosition,
double theNonOrthogonalityAngle)
Get the othogonality corrected position of the XY axes |
private java.awt.Point |
getXYTemperatureCorrectedPosition(java.awt.Point thePosition,
double theTemperature)
Get the position of the XY axes compensated for temperature |
(package private) long |
getYEncoderPosition()
Get the x encoder position |
(package private) long |
getZEncoderPosition()
Get the x encoder position |
private boolean |
hasPositionError(MotionControllerAxis theAxis)
Check whether an axis has a position error |
private void |
homeP()
Find the home position of the off-axis probe axis |
private void |
homeT()
Find the home position of the Theta axis |
private void |
homeXY()
Find the home position of the XY axes |
private void |
homeZ()
Find the home position of the Z axis |
(package private) void |
initialise()
Initialise the robot |
(package private) void |
initialisePAxis()
Initialise the Probe axis |
(package private) void |
initialiseTAxis()
Initialise the Theta axis |
(package private) void |
initialiseXYAxis()
Initialise the X-Y axes of the robot |
(package private) void |
initialiseZAxis()
Initialise the Z axis |
static Robot |
instance()
The instance class method |
(package private) boolean |
isAirPressureOn()
Is the air pressure power on |
(package private) boolean |
isGripperClosed()
Is the gripper closed |
(package private) boolean |
isGripperLowered()
Is the gripper lowered to the field plate |
(package private) boolean |
isGripperLowered(long zPosition)
Is the gripper lowered to the field plate |
(package private) boolean |
isGuideFibreBackIlluminationOn()
Is the guide fibre back illumination on |
(package private) boolean |
isInForwardLimit(MotionControllerAxis theAxis)
Is the axis in its forward limit |
(package private) boolean |
isInReverseLimit(MotionControllerAxis theAxis)
Is the axis in its reverse limit |
(package private) boolean |
isInspectionLightOn()
Is the inspection light on |
(package private) boolean |
isInstrumentPowerOn()
Is the insturment power on |
(package private) boolean |
isLargeFibreModuleSwitchOn()
Is the large fibre module switch on |
(package private) boolean |
isMotorPowerOn()
Is the motor power on |
(package private) boolean |
isScienceFibreBackIlluminationOn()
Is the science fibre back illumination on |
(package private) boolean |
isServoAmplifierOn()
Is the servo amplifier on |
(package private) boolean |
isSmallFibreModuleSwitchOn()
Is the small fibre module switch on |
private void |
jog(MotionControllerAxis theAxis,
long jogSpeed)
Jog the axis |
private void |
liftGripper()
Lift the gripper above the fibre buttons |
(package private) void |
loadFibre(Fibre theFibre,
FibreModule theFibreModule)
Update the true position of the fibre based on the centroid from the gripper camera system |
(package private) void |
loadModule(FibreModule theFibreModule)
Load all of the fibres in the fibre module |
(package private) void |
loadModuleAll(FibreModule theFibreModule)
Load all of the fibres in the fibre module continuing in the event of lost fibres |
private void |
lowerGripper()
Lower the gripper to the height of the fibre button |
(package private) void |
moveFibre(Fibre theFibre,
TargetFibre theTarget,
FibreModule theFibreModule)
Move a fibre from its current position to the target fibre's position |
(package private) void |
moveProbe(long positionInMicrons)
Move the single axis probe |
(package private) void |
moveTheta(long positionInArcminutes)
Move the theta axis |
private void |
moveToFibre(Fibre theFibre)
Move the robot in X, Y and T, to a fibre |
private void |
moveToFibre(Fibre theFibre,
java.awt.Point theOffsetFromFibre)
Move the robot to a fibre, but offset the position by an X-Y offset |
private void |
moveXY(long x,
long y)
Move the robot to the specified x-y coordinates |
(package private) void |
moveXY(long x,
long y,
FibreModule theFibreModule)
Move the robot to the requested X-Y position, moving theta to the angle of the nearest fibre |
private void |
moveXYT(long x,
long y,
long theta)
Move the robot to the specified x-y-t coordinates |
(package private) void |
moveZ(long position)
Move the z axis |
private void |
offset(MotionControllerAxis theAxis,
int offset)
Offset (position relative) an axis by a given amount |
(package private) void |
offsetFibre(Fibre theFibre,
int xOffset,
int yOffset,
FibreModule theFibreModule)
Offset a fibre |
private void |
offsetXY(long xoffset,
long yoffset)
Offset the XY axes in encoder units |
(package private) void |
offsetXYMicrons(long xoffset,
long yoffset)
Offset the XY axes in microns |
(package private) void |
openGripper()
Open the gripper |
(package private) void |
park()
Park the robot |
(package private) void |
parkFibre(Fibre theFibre,
FibreModule theFibreModule)
Park a fibre in the park ring |
private void |
pickUp()
Lower the gripper to the fibre button, close the gripper, and lift the gripper |
private void |
putDown()
Lower the gripper to the fibre button, open the gripper, and lift the gripper |
private void |
putDownFibre(Fibre theFibre,
TargetFibre theTarget,
FibreModule theFibreModule)
Put a fibre down on the field plate at the target position, and load its new position |
(package private) void |
recoverFibre(Fibre theFibre,
FibreModule theFibreModule)
Recover a lost fibre by searching first in the expected position, and then in the fibre's previous known position |
(package private) void |
setAcceleration(MotionControllerAxis theAxis,
int Acceleration)
Set the axis acceleration |
(package private) void |
setBackIlluminationOff()
Set the fibre back illumination off |
(package private) void |
setBackIlluminationOn()
Set the fibre back illumination on |
(package private) void |
setDeceleration(MotionControllerAxis theAxis,
int Deceleration)
Set the axis deceleration |
private void |
setErrorLimit(long errorLimit)
Set the error limit for all axes |
(package private) void |
setFibrePositioningIterations(int numberOfFibrePlacementIterations)
Set the number of fibre placement iterations |
(package private) void |
setFibrePositioningTolerance(int fibrePositioningToleranceInMicrons)
Set the fibre positioning tolerance in microns |
(package private) void |
setInspectionLightsOff()
Set the inspection lights off |
(package private) void |
setInspectionLightsOn()
Set the inspection lights on |
(package private) void |
setInstrumentPowerOff()
Set the instrument power off |
(package private) void |
setInstrumentPowerOn()
Set the instrument power on |
(package private) void |
setLimitSwitchOverrideOff()
Override the limit switches |
(package private) void |
setLimitSwitchOverrideOn()
Enable the limit switches |
(package private) void |
setMotorPowerOff()
Set the motor power off |
(package private) void |
setMotorPowerOn()
Set the motor power on |
private void |
setPID(MotionControllerAxis theAxis,
double ProportionalConstant,
double Integrator,
double DerivativeConstant)
Set the axis PID filter constants |
private void |
setPositionLimits(MotionControllerAxis theAxis,
long ReversePositionLimit,
long ForwardPositionLimit)
Set the axis position limits |
(package private) void |
setSmoothing(MotionControllerAxis theAxis,
double Smoothing)
Set the axis smoothing |
(package private) void |
setSpeed(MotionControllerAxis theAxis,
int Speed)
Set the axis speed |
(package private) void |
sleep()
Sleep the robot |
(package private) void |
stop()
Stop motion on all axes |
(package private) void |
viewFibre(Fibre theFibre)
Move the gripper camera over a fibre in order to view it |
(package private) void |
viewObject(Fibre theFibre)
View an object at the position of a fibre or fiducial object |
(package private) void |
viewSky(long x,
long y)
Move the robot such that its sky viewing probe is at the required position |
private void |
wait(MotionControllerAxis theAxis)
Wait for axis motion to complete |
private void |
waitP()
Wait for Probe motion to complete |
private void |
waitT()
Wait for Theta motion to complete |
private void |
waitXYT()
Wait for XYT motion to complete |
private void |
waitZ()
Wait for Z motion to complete |
(package private) void |
wake()
Wake the robot |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final boolean SIMULATION
private final boolean ENCODER_SIMULATION
static final MotionControllerAxis AXIS_X
static final MotionControllerAxis AXIS_Y
static final MotionControllerAxis AXIS_Z
static final MotionControllerAxis AXIS_T
static final MotionControllerAxis AXIS_P
static final MotionControllerAxis AXIS_S
private final int INPUT_PORT_INSTRUMENT_POWER_STATUS
private final int INPUT_PORT_AIR_PRESSURE_STATUS
private final int INPUT_PORT_MOTOR_RELAY_STATUS
private final int INPUT_PORT_FIBRE_MODULE_SWITCH_A
private final int INPUT_PORT_FIBRE_MODULE_SWITCH_B
private final int INPUT_PORT_SERVO_AMPLIFIER_STATUS
private final int INPUT_PORT_SCIENCE_FIBRE_BACK_ILLUM_STATUS
private final int INPUT_PORT_GUIDE_FIBRE_BACK_ILLUM_STATUS
private final int OUTPUT_PORT_INSTRUMENT_POWER
private final int OUTPUT_PORT_MOTOR_POWER
private final int OUTPUT_PORT_GRIPPER_CONTROL
private final int OUTPUT_PORT_INSPECTION_LIGHTS
private final int OUTPUT_PORT_LIMIT_SWITCH_OVERRIDE
private final int OUTPUT_PORT_GUIDE_FIBRE_BACK_ILLUMINATION
private final int AXIS_ERROR_LIMIT
private final int AXIS_ERROR_LIMIT_DISABLE
private final int AXIS_MAX_ALLOWED_ERROR
private final int P_ROBOT_SEPARATION
private final double XY_NON_ORTHOGONALITY
private RobotXYAxisStraightness theRobotXYAxisStraightness
private final int GRIPPER_DELAY
private final int FIBRE_MAX_DRAG_DISTANCE
private final int FIBRE_MAX_OFFSET
private final int FIBRE_MAX_POS_ERROR
private final int FIBRE_PLACEMENT_ITERATIONS
private static Robot _instance
private RobotError Error
private RobotTemperature theRobotTemperature
private MotionController theMotionController
RobotConfiguration theRobotConfiguration
private RobotAxisConfigurationX theAxisXConfiguration
private RobotAxisConfigurationY theAxisYConfiguration
private RobotAxisConfigurationZ theAxisZConfiguration
private RobotAxisConfigurationT theAxisTConfiguration
private RobotAxisConfigurationP theAxisPConfiguration
private SkyViewingProbe theSkyViewingProbe
private int fibrePlacementIterations
private int fibrePositioningTolerance
Constructor Detail |
---|
private Robot()
Method Detail |
---|
public static Robot instance()
void initialise()
void initialiseXYAxis()
void initialiseZAxis()
void initialiseTAxis()
void initialisePAxis()
void loadModule(FibreModule theFibreModule) throws FibreNotFound
theFibreModule
- The fibre module
FibreNotFound
void loadModuleAll(FibreModule theFibreModule)
theFibreModule
- The fibre modulevoid loadFibre(Fibre theFibre, FibreModule theFibreModule) throws FibreNotFound
theFibre
- The fibre to be loadedtheFibreModule
- The fibre module
FibreNotFound
void viewFibre(Fibre theFibre)
theFibre
- The fibrevoid moveFibre(Fibre theFibre, TargetFibre theTarget, FibreModule theFibreModule)
theFibre
- The fibre to be movedtheTarget
- The target fibretheFibreModule
- The fibre modulevoid offsetFibre(Fibre theFibre, int xOffset, int yOffset, FibreModule theFibreModule)
theFibre
- The fibrexOffset
- The offset in xyOffset
- The offset in ytheFibreModule
- the fibre modulevoid parkFibre(Fibre theFibre, FibreModule theFibreModule)
theFibre
- The fibretheFibreModule
- The fibre modulevoid recoverFibre(Fibre theFibre, FibreModule theFibreModule)
theFibre
- The fibretheFibreModule
- The fibre moduleprivate void putDownFibre(Fibre theFibre, TargetFibre theTarget, FibreModule theFibreModule)
theFibre
- The fibretheTarget
- The targettheFibreModule
- The fibre modulevoid viewObject(Fibre theFibre)
theFibre
- The fibre associated with the objectvoid viewSky(long x, long y)
x
- The x sky position in robot coordinatesy
- The y sky position in robot coordinatesvoid wake()
void sleep()
void park()
void extract()
void offsetXYMicrons(long xoffset, long yoffset)
xoffset
- The offset in x in micronsyoffset
- The offset in y in micronsvoid moveXY(long x, long y, FibreModule theFibreModule)
x
- Demanded x positiony
- Demanded y positiontheFibreModule
- The fibre modulevoid moveTheta(long positionInArcminutes)
positionInArcminutes
- The position in arcminutesvoid moveZ(long position)
position
- The position in encoder countsvoid moveProbe(long positionInMicrons)
positionInMicrons
- The demand position in micronsvoid openGripper()
void closeGripper()
double getTemperature()
java.awt.Point getXYLinearEncoderPosition()
java.awt.Point getXYCorrectedPositionInMicrons()
java.awt.Point getSkyViewingProbePositionInMicrons()
long getXEncoderPosition()
long getYEncoderPosition()
long getZEncoderPosition()
long getTEncoderPosition()
long getTPositionInArcmins()
long getTPositionInArcmins(long tEncoderPosition)
tEncoderPosition
- The theta encoder position
long getPEncoderPosition()
long getPPositionInMicrons()
long getSpeed(MotionControllerAxis theAxis)
theAxis
- The axis
long getAcceleration(MotionControllerAxis theAxis)
theAxis
- The axis
int getFibrePositioningTolerance()
int getFibrePositioningIterations()
RobotConfiguration getConfiguration()
void setInstrumentPowerOn()
void setInstrumentPowerOff()
void setMotorPowerOn()
void setMotorPowerOff()
void setInspectionLightsOn()
void setInspectionLightsOff()
void setLimitSwitchOverrideOn()
void setLimitSwitchOverrideOff()
void setBackIlluminationOn()
void setBackIlluminationOff()
void setAcceleration(MotionControllerAxis theAxis, int Acceleration)
theAxis
- The axisAcceleration
- The accelerationvoid setDeceleration(MotionControllerAxis theAxis, int Deceleration)
theAxis
- The axisDeceleration
- The decelerationvoid setSmoothing(MotionControllerAxis theAxis, double Smoothing)
theAxis
- The axisSmoothing
- The smoothingvoid setSpeed(MotionControllerAxis theAxis, int Speed)
theAxis
- The axisSpeed
- The speedvoid stop()
boolean isInstrumentPowerOn()
boolean isAirPressureOn()
boolean isMotorPowerOn()
boolean isLargeFibreModuleSwitchOn()
boolean isSmallFibreModuleSwitchOn()
boolean isServoAmplifierOn()
boolean isScienceFibreBackIlluminationOn()
boolean isGuideFibreBackIlluminationOn()
boolean isInspectionLightOn()
boolean isGripperClosed()
boolean isGripperLowered()
boolean isGripperLowered(long zPosition)
zPosition
- The Z position
boolean isInReverseLimit(MotionControllerAxis theAxis)
theAxis
- The axis
boolean isInForwardLimit(MotionControllerAxis theAxis)
theAxis
- The axis
private void setPositionLimits(MotionControllerAxis theAxis, long ReversePositionLimit, long ForwardPositionLimit)
theAxis
- The axisReversePositionLimit
- The reverse position limitForwardPositionLimit
- The forward position limitvoid setFibrePositioningIterations(int numberOfFibrePlacementIterations)
numberOfFibrePlacementIterations
- The number of fibre placement iterationsvoid setFibrePositioningTolerance(int fibrePositioningToleranceInMicrons)
fibrePositioningToleranceInMicrons
- The fibre positioning tolerance in micronsprivate void dragFibre(Fibre theFibre, int xOffset, int yOffset)
theFibre
- The fibre to be draggedxOffset
- The distance in x that the fibre is to be draggedyOffset
- The distance in y that the fibre is to be draggedprivate java.awt.Point getFibrePosition(Fibre theFibre)
theFibre
- The fibre
private java.awt.Point getXYCorrectedPositionInMicrons(java.awt.Point theXYEncoderPosition)
theXYEncoderPosition
- The encoder position of the xy axes
private java.awt.Point getXYTemperatureCorrectedPosition(java.awt.Point thePosition, double theTemperature)
thePosition
- The robot's encoer positiontheTemperature
- The temperature
private java.awt.Point getXYOthogonalityCorrectedPosition(java.awt.Point thePosition, double theNonOrthogonalityAngle)
thePosition
- The position to be correctedtheNonOrthogonalityAngle
- The non othogonality angle in radians
private long getClosestThetaDemandEncoderPosition(long demandThetaInArcMins)
demandThetaInArcMins
- The demanded angle in armins
private long getClosestThetaAngle(long deltaThetaInArcMins)
deltaThetaInArcMins
- The rotation angle in arcmins
private java.awt.Point getXYDistance(java.awt.Point point1, java.awt.Point point2)
point1
- The first pointpoint2
- The second point
private void defineEncoderPosition(MotionControllerAxis theAxis, int encoderPosition)
theAxis
- The axisencoderPosition
- The encoder position to be definedprivate void defineAuxiliaryEncoderPosition(MotionControllerAxis theAxis, int encoderPosition)
theAxis
- The axisencoderPosition
- The auxiliary encoder position to be definedprivate void offset(MotionControllerAxis theAxis, int offset)
theAxis
- The axisoffset
- The offsetprivate void jog(MotionControllerAxis theAxis, long jogSpeed)
theAxis
- The axisjogSpeed
- The joggin speedprivate void homeXY()
private void homeZ()
private void homeT()
private void homeP()
private void waitXYT()
private void waitZ()
private void waitT()
private void waitP()
private void moveXY(long x, long y)
x
- Demanded x positiony
- Demanded y positionprivate void moveXYT(long x, long y, long theta)
x
- Demanded x positiony
- Demanded y positiontheta
- Demanded theta positionprivate void offsetXY(long xoffset, long yoffset)
xoffset
- The offset in x in encoder unitsyoffset
- The offset in y in encoder unitsprivate void setPID(MotionControllerAxis theAxis, double ProportionalConstant, double Integrator, double DerivativeConstant)
theAxis
- The axisProportionalConstant
- The proportional constantIntegrator
- The integratorDerivativeConstant
- The derivative constantprivate void setErrorLimit(long errorLimit)
errorLimit
- The error limit in encoder countsprivate boolean hasPositionError(MotionControllerAxis theAxis)
theAxis
- The axis
private void wait(MotionControllerAxis theAxis)
theAxis
- The axisprivate void moveToFibre(Fibre theFibre)
theFibre
- The fibre to be moved toprivate void moveToFibre(Fibre theFibre, java.awt.Point theOffsetFromFibre)
theFibre
- The fibre to be moved totheOffsetFromFibre
- The offset from the fibre positionprivate void lowerGripper()
private void liftGripper()
private void pickUp()
private void putDown()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |