I have a program using the RoboDK Python API that performs a simple tool change. The program was working perfectly with RoboDK version 5.7, but after updating to version 5.7.5, the tool does not change during execution. The simulation runs as expected, but when I use the actual robot, it continues to use the tool that was last active. How can I correct this?
08-22-2024, 09:07 AM (This post was last modified: 08-22-2024, 09:09 AM by Niko_Riko_BODE.)
The program I'm working on uses a camera tool to first detect an object and calculate its position. After that, it switches to a laser tool, which travels around all the edges to demonstrate the accuracy of our postprocessor and calibration method. This program has worked before without issues.
Recently, I saw in the documentation that it's important to provide the reference frame and the tool frames when generating programs offline. However, I hadn't used that before, and the program still worked. I tried adding it to my current program, but it didn't resolve the issue. The virtual version of the program works perfectly, but in real life, it defaults to the last active tool, which could even be the flange, despite it not being specified.
Below are some snippets of the code where I initialize the tools and call them. Could you help me understand why this might be happening and how to fix it?
Do you mean you use the Connect command on your script?
Can you share your RoboDK project so we can better understand the context and reproduce the issue?
Very little has changed between version 5.7.4 and 5.7.5. What version did you have before?
You can also try reverting to default settings by selecting Tools-Options-Set default settings.
setTool and setPoseTool are the same command (however, setTool is deprecated)
Before, I was using RoboDK 5.7.1. In this project, there is a virtual version that uses the RoboDK camera and a real-life version where the camera feed is captured from Intel's D455. Both programs are otherwise quite similar. There is also a program called "TC_test," which is just to check if the tool change is working properly.
I will try that, thanks!
I was just using setPoseTool(), but I added setTool() just to be sure.
I have tested the 'TC_test' program on RoboDK 5.7.1, and it works as expected, so I believe that RoboDK 5.7.4 may be the reason the program is not performing as expected.
I'm unable to reproduce this issue with RoboDK version 5.7.4 or version 5.7.5. Please note that we released a new version this week
When changing the tool, just providing the tool item with setPoseTool should update the tool linked with the robot and update the tool pose at the same time.
What difference do you see? Does this issue happen only when you are connected to the robot?
Could you try with the latest version of RoboDK 5.7.5?
I am sorry fo my error, I did not use 5.7.4, I used 5.7.5 (the newest version).
In the simulation, both versions (5.7.1 and 5.7.5) perform identically and correctly, but when connected to the robot the latest version py-API does not update the tool pose it just takes the last active tool, even the ones which are not specified in the python program. Otherwise, there were no other errors and the whole program ran as expected.