TCPConfiguration access from Program Node

I am setting positions in a URCap program node using UserInteraction.getUserDefinedRobotPosition().

For setting certain positions different TCP configurations can be really helpful for jogging, so before entering the jog screen for setting a user defined position I would like to adjust the active TCP based on other parameters input to the program node then reset it after the position has been set or the operation cancelled.

The TCPConfiguration interface looks like the way to do this, but from the examples the only way I can see to get access for it is by implementing GripperContribution, which doesn’t seem like it does what I need.

Per the API documentation is looks like I can also access it via the SystemConfiguration interface, but I can’t figure out how I can get access to that either.

Can anyone help me figure out how to access the TCPConfiguratoin interface or suggest and althernative for quickly and adjusting the TCP with dynamic inputs (obviously you can set it via installation, but I’m trying to cut down on steps for the users).

Hello Daniel,

the API allows you to access the TCPModel for getting information of the currently available TCPs and the TCPContributionModel lets provide your own TCPs to the list of TCPs to select from the user through Polyscope.

It is currently not possible to read the active TCP or to set a TCP through the API.

Having the correct TCP select is crucial, if you need to adjust the TCP afterwards. It would be possible to temporally overwrite the active TCP sending the correspondent script command to one of the client interfaces. But if for the program a different TCP is set active, all the prior taught poses change as well. This can lead to confusion, if the TCP adjustment is not noticed by the user and I would recommend implementing it like this.

sko

Thanks for the response, sko.

I’m not sure if I understand your last paragraph though. Can I temporarily overwrite the active TCP with an API command?

Basically I am generating a custom motion path using servoj and would like to have all positions set utilize the same TCP. However, for rotating around points which are not the TCP it is helpful to temporarily set the TCP to the nodal point then remove it for setting the waypoint.

To give you more details on what I am hoping to do, see the below code snip with comments:

public void setPositionWithNonTCPNodalPoint() {

//Temporarily set active TCP  for the purpose of the below getUserDefinedRobotPosition
//API command to set active TCP?

apiProvider.getUserInterfaceAPI().getUserInteraction().getUserDefinedRobotPosition(new RobotPositionCallback2() {

    public void onOk(PositionParameters parameters) {
        //Reset active TCP to what it was before
        //API command to reset TCP?
        //Calculate if necessary to remove temporary TCP from offset to set model position with TCP matching common points
        model.set(POSITION_KEY, parameters.getPose());
    }

    public void onCancel()
    {
        //Reset active TCP to what it was before
        //API command to reset TCP?
    }

});

}

No worries if those “API Command?” are not possible with the API. But if it isn’t possible I would like to put it in as a feature request :slight_smile :slight_smile: