public interface GripperListBuilder
This interface is used for creating the list of individual grippers/zones available in a multi-gripper device, i.e. a
gripper which has registered the multi-gripper capability (using the method
GripperCapabilities.registerMultiGripperCapability(GripperListProvider)
). It must be used to create and add
all supported grippers/zones, and build the final list to be returned from
GripperListProvider.getGripperList(GripperListBuilder, Locale)
.
At least two grippers/zones must be created, and all added grippers/zones must have a unique identifier and name. Note that the identifier of all the grippers must be constant over time and versions of the URCap as this is used for persistence of the gripper as well as, it can be used by other contributions (for example contributed by other 3rd party URCaps) to identify the gripper.
For each of the created grippers, it is possible individually to:MultiGripperCapability.setEnabled(SelectableGripper, boolean)
TCPConfiguration
instance returned by
SystemConfiguration.getTCPConfiguration(SelectableGripper)
Modifier and Type | Method and Description |
---|---|
GripperList |
buildList()
Build the final list with all created grippers/zones.
|
SelectableGripper |
createGripper(String id,
String displayName,
boolean initialEnabledState)
Creates an individual gripper/zone and adds it to the list of gripper (which will be returned when the method
buildList() is called). |
SelectableGripper createGripper(String id, String displayName, boolean initialEnabledState)
Creates an individual gripper/zone and adds it to the list of gripper (which will be returned when the method
buildList()
is called).
The returned SelectableGripper
instance can be used to disable/enable the gripper using
MultiGripperCapability.setEnabled(SelectableGripper, boolean)
. It can also be used to add a TCP for the
gripper with the TCPConfiguration
instance returned by
SystemConfiguration.getTCPConfiguration(SelectableGripper)
. A reference to this gripper instance can be
stored in the contribution class for easy access.
For a URCap implementing the GripperContribution
interface, a SelectableGripper
instance will be
provided as input to script generation for grip and release actions (see the GripActionParameters
and
ReleaseActionParameters
interfaces). The provided gripper instance should be used to identify which gripper
to generate script code for. A SelectableGripper
instance will also be provided as input for script code
generation for feedback capabilities (see the GripDetectedParameters
and ReleaseDetectedParameters
interfaces).
Each created SelectableGripper
instance will also be included in the list returned by
MultiGripperSupport.getSelectableGrippers()
. This list is used by other contributions (for example
contributed by other 3rd party URCaps) to select a specific gripper when creating a configuration for a
GripperNode
which is using a multi-gripper device. Note that only enabled grippers will be included in
this list.
id
- The unique identifier for the gripper/zone, not null
nor an empty string. Must be unique
and constant over time and versions of the URCap as this is used for persistence of the gripper as well
as, it can be used by other contributions (for example contributed by other 3rd party URCaps) to
identify the gripper.displayName
- The name of the griper/zone to be shown in the PolyScope user interface, not null
nor
an empty string. For instance, for UCRaps implementing the GripperContribution
interface,
it will be displayed in the Gripper toolbar and program node. The name will also be used as a
prefix in the program tree title of the Gripper node, except for when only one gripper is
enabled, in which case the prefix will be the title of the gripper contribution (returned by
GripperContribution.getTitle(Locale)
).initialEnabledState
- The initial enablement state of the new gripper/zone. If true
, the gripper will
initially by enabled, otherwise the gripper will initially be disabled and not available
in PolyScope. After creation of the gripper, it can be disabled/enabled using
MultiGripperCapability.setEnabled(SelectableGripper, boolean)
.MultiGripperCapability.setEnabled(SelectableGripper, boolean)
. It can also be used to add a TCP for the
gripper with SystemConfiguration.getTCPConfiguration(SelectableGripper)
. A reference to this gripper
instance can be stored in the contribution class for easy access.DuplicateGripperID
- if a gripper/zone with the same identifier (as specified by id
) has already
been addedDuplicateGripperName
- if a gripper/zone with the same name (as specified by displayName
) has
already been addedGripperList buildList()
createGripper(String, String, boolean)
method before calling this method.LessThanTwoGrippers
- if less than two grippers/zones have been added with
createGripper(String, String, boolean)
Copyright © 2020. All rights reserved.