I am yet to find a solution to my problem. I want to select a TCP from a combo box in my Installation URCap and set it as the active TCP, but when I choose one, not only the active TCP stays the same, but the combo box doesn’t change either, even though I can choose from other combo boxes.
the active TCP can only be changed by the user in the correspondent Polyscope TCP Installation. You can provide a TCP using the TCP Contribution Model, which the user can then choose from.
If the program should run with the selected TCP you can add it in the Script-Code you provide. But this should be handled with care, as changing the TCP most often impacts the trajectory of the Robot in the running program afterwards.
Hi,
In my URCap I don’t add TCPs (yet), so I can’t use user-added TCPs. In this URCap I set a plane using 3 points and I would ideally be able to select which TCP I want to use to set the plane or select a TCP to replay the 3 points of the plane.
In the script writer method I inserted set_tcp(“selectedTCP”), but nothing changes.
This will only take effect once the program was started and so the Script code is executed.
Additionally, this will not contribute to the TCP model, but the TCP provided by the Script Code is still active once the program is finished.
I am just writing a URCap which also features a TCP selection from a combobox.
Then by using a button the user can set the position of a waypoint. I wrote a similar question as yours yesterday in this forum, because I couldn’t find a command in the API to set the TCP in advance of the UserInteraction-call.
I decided to solve this the following way:
Since it seems not possible to set the TCP in advance, I will update the Pose of the waypoint after the ‘onOK’ of the UserInteraction using the new function RobotPositionCallback2() which also return the TCP-offset. With this it is not too difficult to calculate the Pose of the wayoint in the TCP-frame chosen in the combobox. Then I update the waypoint.