how to get objects handles of the IRB360 model using Matlab

Typically: "How do I... ", "How can I... " questions
Post Reply
Galileo
Posts: 3
Joined: 21 Apr 2024, 20:16

how to get objects handles of the IRB360 model using Matlab

Post 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.

coppelia
Site Admin
Posts: 10378
Joined: 14 Dec 2012, 00:25

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

Post 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

Galileo
Posts: 3
Joined: 21 Apr 2024, 20:16

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

Post 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?

fferri
Posts: 1233
Joined: 09 Sep 2013, 19:28

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

Post by fferri »

Paths starting with . are only available from associated code.

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

Post Reply