|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object device.Device device.RobotDevice device.Gripper
public class Gripper
A Gripper device represents a mechanical actuator consisting of typically two paddles that can open/close and lift/release to manipulate some objects.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface device.external.IGripper |
---|
IGripper.stateType |
Field Summary | |
---|---|
(package private) Actarray |
aa
Controls a lift on the gripper (if gripper equipped) |
(package private) IGripper.stateType |
currentState
|
(package private) Dio |
dio
Copied from JavaClient: Data: state (PLAYER_GRIPPER_DATA_STATE) The gripper interface returns 3 values that represent the current state of the gripper; the format is given below. |
(package private) java.util.concurrent.CopyOnWriteArrayList<IGripperListener> |
isDoneListeners
Callback listeners |
(package private) java.util.logging.Logger |
logger
Logging support |
(package private) boolean |
timeout
|
Fields inherited from class device.RobotDevice |
---|
device, deviceNode |
Fields inherited from class device.Device |
---|
deviceList, host, id, index, isRunning, isThreaded, port, sleeptime, thread |
Constructor Summary | |
---|---|
Gripper(DeviceNode deviceNode,
Device device)
Creates a Gripper object. |
Method Summary | |
---|---|
void |
addIsDoneListener(IGripperListener cb)
|
void |
close()
Deprecated. Use close(IGripperListener) .
Close the gripper's paddles. |
void |
close(IGripperListener cb)
|
void |
closeLift()
Deprecated. Use closeLift(IGripperListener) . |
void |
closeLift(IGripperListener cb)
|
Actarray |
getAa()
|
IGripper.stateType |
getCurrentState()
|
Dio |
getDio()
|
java.util.logging.Logger |
getLogger()
|
IGripper.stateType |
getState()
|
void |
lift()
Deprecated. Use lift(IGripperListener) .
Lift the gripper's paddles (if supported). |
void |
lift(IGripperListener cb)
|
void |
liftWithObject()
Sets up the gripper to only close and lift paddles when an object is sensed between the paddles. |
(package private) void |
notifyListenersClosed()
|
(package private) void |
notifyListenersClosedLifted()
|
(package private) void |
notifyListenersError()
|
(package private) void |
notifyListenersLifted()
|
(package private) void |
notifyListenersOpened()
|
(package private) void |
notifyListenersReleased()
|
(package private) void |
notifyListenersReleasedOpened()
|
void |
open()
Deprecated. Use open(IGripperListener) .
Opens the gripper's paddles.
If available sensors are used to determine when the paddles are open. |
void |
open(IGripperListener cb)
|
void |
release()
Release the gripper's paddles (if supported). |
void |
release(IGripperListener cb)
|
void |
releaseOpen()
Deprecated. Use releaseOpen(IGripperListener) . |
void |
releaseOpen(IGripperListener cb)
|
void |
removeIsDoneListener(IGripperListener cb)
|
protected void |
setAa(Actarray aa)
|
(package private) void |
setCurrentState(IGripper.stateType newState)
|
protected void |
setDio(Dio dio)
|
void |
shutdown()
Shuts down this (and any sub-) device. |
(package private) void |
startClose()
|
(package private) void |
startLift()
|
(package private) void |
startOpen()
|
(package private) void |
startRelease()
|
void |
stop()
Stops the gripper current motion (if any). |
protected void |
update()
Might be to be implemented by subclass to do something |
(package private) void |
updateActarray()
During runtime checks if an actarray device is available, typically used to lift/release the paddles. |
(package private) void |
updateDio()
During runtime checks if an dio device is available, typically used to sensor gripper states. |
Methods inherited from class device.RobotDevice |
---|
getDevice, getDeviceNode, toString |
Methods inherited from class device.Device |
---|
equals, getDevice, getDeviceIterator, getDeviceList, getDeviceListArray, getHost, getId, getIndex, getPort, getSleepTime, getThreadName, isInList, isRunning, isSupported, isThreaded, matches, matchesList, run, runThreaded, setDeviceList, setHost, setName, setPort, setSleepTime |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
IGripper.stateType currentState
java.util.concurrent.CopyOnWriteArrayList<IGripperListener> isDoneListeners
java.util.logging.Logger logger
Actarray aa
Dio dio
boolean timeout
Constructor Detail |
---|
public Gripper(DeviceNode deviceNode, Device device)
deviceNode
- The device node containing this device.device
- This device' properties.Method Detail |
---|
public void shutdown()
Device
shutdown
in interface IDevice
shutdown
in class Device
protected void update()
Device
update
in class Device
public IGripper.stateType getCurrentState()
void setCurrentState(IGripper.stateType newState)
public void stop()
public void open()
open(IGripperListener)
.
Opens the gripper's paddles.
If available sensors are used to determine when the paddles are open.
public void open(IGripperListener cb)
open
in interface IGripper
void startOpen()
public void close()
close(IGripperListener)
.
Close the gripper's paddles.
public void close(IGripperListener cb)
close
in interface IGripper
void startClose()
public void lift()
lift(IGripperListener)
.
Lift the gripper's paddles (if supported).
public void lift(IGripperListener cb)
lift
in interface IGripper
void startLift()
public void liftWithObject()
public void releaseOpen()
releaseOpen(IGripperListener)
.
public void releaseOpen(IGripperListener cb)
releaseOpen
in interface IGripper
public void closeLift()
closeLift(IGripperListener)
.
public void closeLift(IGripperListener cb)
closeLift
in interface IGripper
public void release()
public void release(IGripperListener cb)
release
in interface IGripper
void startRelease()
void updateActarray()
void updateDio()
public IGripper.stateType getState()
public java.util.logging.Logger getLogger()
getLogger
in class RobotDevice
public Actarray getAa()
public Dio getDio()
protected void setAa(Actarray aa)
aa
- the aa to setprotected void setDio(Dio dio)
dio
- the dio to setpublic void addIsDoneListener(IGripperListener cb)
addIsDoneListener
in interface IGripper
public void removeIsDoneListener(IGripperListener cb)
removeIsDoneListener
in interface IGripper
void notifyListenersOpened()
void notifyListenersClosed()
void notifyListenersLifted()
void notifyListenersReleased()
void notifyListenersClosedLifted()
void notifyListenersReleasedOpened()
void notifyListenersError()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |