Page 1 of 1

how to get objects handles of the IRB360 model using Matlab

Posted: 23 Apr 2024, 20:15
by Galileo
Hi.

I am new to coppeliasim. and have just tried the IK toturial up to now.

currently I'm trying to work with the irb 360 parallel robot from the model library
I'm trying to get the 'ikTip' dummy handle from Matlab.
somehow the returned handle number is 0.
same for 'drivingJoint1..3'

at the client side im using the legacy API: simxGetObjectHandle (deprecated)

Code: Select all

    [~, Tip] = sim.simxGetObjectHandle(clientID, 'ikTip', sim.simx_opmode_blocking);
    [~, Joint1] = sim.simxGetObjectHandle(clientID, 'drivingJoint1', sim.simx_opmode_blocking);
    [~, Joint2] = sim.simxGetObjectHandle(clientID, 'drivingJoint2', sim.simx_opmode_blocking);
    [~, Joint3] = sim.simxGetObjectHandle(clientID, 'drivingJoint3', sim.simx_opmode_blocking);
once trying

Code: Select all

    [~, Tip] = sim.simxGetObjectHandle(clientID, 'irb 360', sim.simx_opmode_blocking);
i have got some handle number different from 0

what do i miss there?

* i have changed the built in child script for the model.
changed the threaded script to actuation, and moved the kinematic chain generation script to the init function.
(also changed the requiered local parameters to be global)

* i have ran it at the new structure i have made, and it worked well as with the original script

* then i removed the main route script and left the initial positioning intact.

Re: how to get objects handles of the IRB360 model using Matlab

Posted: 24 Apr 2024, 08:08
by coppelia
Hello,

please do not use the legacy remote API anymore. Instead, use the ZeroMQ remote API, which is more flexible, complete, and faster.

To retrieve the handle of an object via the ZeroMQ remote API, do this:

Code: Select all

objectHandle = sim.getObject('/path/to/object');
Cheers

Re: how to get objects handles of the IRB360 model using Matlab

Posted: 24 Apr 2024, 22:27
by Galileo
Thanks
I will start using it

Where do the path starts? First object at the hierarchy?
I have seen the usage of "./path". Where is it eligible?

Re: how to get objects handles of the IRB360 model using Matlab

Posted: 25 Apr 2024, 07:54
by fferri
Paths starting with . are only available from associated code.

More info at https://manual.coppeliarobotics.com/en/ ... bjects.htm