public interface GripperContribution
This interface defines an API for adding functionality for gripping devices to PolyScope.
Implementing this interface will create a program node contribution, an installation contribution and a toolbar contribution exposing gripper functionality to the end user. Note that the toolbar contribution is not supported on CB3 robots.
The program node contribution allows the end user to program grip and release actions. The configuration options
available to the end user are based on the properties and capabilities supported by the gripper. As a minimum, all
grippers must support "default" grip and release actions. All other capabilities are optional to support and can be
registered when the configureGripper(GripperConfiguration, GripperAPIProvider)
method is
called.
The installation node contribution can be used, if any custom input from the end user is required to setup the gripper,
e.g. specifying an IP address. This functionality is optional, since such configuration properties are specific for
each gripper. Access to create a custom configuration based on user inputs is provided when the
configureInstallation(CustomUserInputConfiguration, SystemConfiguration, TCPConfiguration, GripperAPIProvider)
method is called.
The toolbar contribution provides the end user quick access to perform grip and release actions using "default" gripper action parameters.
Modifier and Type | Method and Description |
---|---|
void |
configureContribution(ContributionConfiguration configuration)
When this method is called, optional PolyScope properties for this gripper contribution can be configured.
|
void |
configureGripper(GripperConfiguration gripperConfiguration,
GripperAPIProvider apiProvider)
When this method is called, use the configuration parameter to register or setup optional properties and capabilities
of the gripper.
|
void |
configureInstallation(CustomUserInputConfiguration customConfiguration,
SystemConfiguration systemConfiguration,
TCPConfiguration tcpConfiguration,
GripperAPIProvider apiProvider)
When this method is called, required configuration related to the setup of the gripper can be defined/performed,
e.g.
|
void |
generateGripActionScript(ScriptWriter scriptWriter,
GripActionParameters parameters)
When this method is called, the script code for performing a grip action with the gripper must be generated.
|
void |
generatePreambleScript(ScriptWriter scriptWriter)
Generate script code that must be executed before any gripper actions can be performed (such as required
initialization) when this method is called.
|
void |
generateReleaseActionScript(ScriptWriter scriptWriter,
ReleaseActionParameters parameters)
When this method is called, the script code for performing a release action with the gripper must be generated.
|
String |
getTitle(Locale locale)
This method should return the title of the gripper contribution.
|
String getTitle(Locale locale)
locale
- the current locale of PolyScope. Can be used for supporting titles in several languages.null
nor an empty string.void configureContribution(ContributionConfiguration configuration)
When this method is called, optional PolyScope properties for this gripper contribution can be configured. The method is called once after this gripper contribution is registered.
Modify the configuration parameter to configure your contribution. The configuration object will already have default values for its properties.
The values of the contribution configuration object will be read once immediately after this method call. Changing values at a later stage will have no effect, so do not store a reference to the configuration object.
If the default values are appropriate, leave the implementation of this method empty.configuration
- a modifiable configuration instance with default values that can be used for configuring
the PolyScope properties of this contributionvoid configureGripper(GripperConfiguration gripperConfiguration, GripperAPIProvider apiProvider)
When this method is called, use the configuration parameter to register or setup optional properties and capabilities of the gripper.
The method is called in the Gripper Configuration phase after this contribution has been registered when a new installation is loaded or created.
Note: If the gripper only supports basic "default" grip and release actions, leave the implementation of this method empty.gripperConfiguration
- a configuration instance that can be used for registering or setting up the
properties and capabilities of the gripper.apiProvider
- provides access to functionality and services available from within PolyScope which can be
relevant for setting up the gripper capabilities (e.g. the SystemAPI
interface
with functionality for querying information about the robot).void configureInstallation(CustomUserInputConfiguration customConfiguration, SystemConfiguration systemConfiguration, TCPConfiguration tcpConfiguration, GripperAPIProvider apiProvider)
When this method is called, required configuration related to the setup of the gripper can be defined/performed, e.g. defining custom user inputs, adding a TCP contribution for the gripper and configuring the settings of the Tool I/O Interface.
The method is called in the Installation Configuration phase after this contribution has been registered when a new installation is loaded or created.
If no configuration is needed, leave the implementation of this method empty.customConfiguration
- use this instance to register custom user inputs for setting up the gripper. The
corresponding generated UI will be accessible in the installation node.systemConfiguration
- use this instance to configure the robot system for this gripper, e.g. configure the
Tool I/O interface settingstcpConfiguration
- use this instance to add a TCP for this gripper to PolyScope as well as update the TCP's
offset and remove the TCP again. A gripper contribution can only contribute one TCP to PolyScope.apiProvider
- Provides access to functionality and services available from within PolyScope which can be
relevant for the defining the installation of the gripper (e.g. the PoseFactory
interface which is needed for creating TCPs)void generatePreambleScript(ScriptWriter scriptWriter)
Generate script code that must be executed before any gripper actions can be performed (such as required initialization) when this method is called.
The method is called in several scenarios where the script code generated by this method is:scriptWriter
- use this script writer instance to generate the script code that must be executed before
gripper actions can be performedvoid generateGripActionScript(ScriptWriter scriptWriter, GripActionParameters parameters)
When this method is called, the script code for performing a grip action with the gripper must be generated.
The parameters for the registered optional gripper capabilities defined/configured by the end user are provided as input to the script generation.
The method is called in the following scenarios:scriptWriter
- use this script writer instance to generate the script code for grippingparameters
- the parameters for the gripper action defined/configured by the end uservoid generateReleaseActionScript(ScriptWriter scriptWriter, ReleaseActionParameters parameters)
When this method is called, the script code for performing a release action with the gripper must be generated.
The parameters for the registered optional gripper capabilities defined/configured by the end user are provided as input to the script generation.
The method is called in the following scenarios:scriptWriter
- use this script writer instance to generate the script code for releasing the gripperparameters
- the parameters for the gripper action defined/configured by the end userCopyright © 2019. All rights reserved.