I've encountered a small issue recently that has been bothering me for quite some time, and I'm seeking your help. Thank you very much!
I am using CoppeliaSim 4.7, and there is a built-in script file named "Script" under the RG2 gripper object. I've also created a new script file named "rg2control" under the RG2 gripper object. Now, I want to obtain the handle of the second script file "rg2control" in the console. How should I write the code to achieve this? I've tried some methods, but they all return nil.
How to obtain the handle of the second script
Re: How to obtain the handle of the second script
Hello,
you have several possibilities. If there is only one object with such a name, then:
Otherwise you need to specify the name more precisely, e.g.:
Cheers
you have several possibilities. If there is only one object with such a name, then:
Code: Select all
local scriptHandle = sim.getObjectHandle('/rg2control')
Code: Select all
local scriptHandle = sim.getObjectHandle('/UR5/RG2/rg2control')