Robot names in case of more than 1 robot

Typically: "How do I... ", "How can I... " questions
Post Reply
sumi_boss
Posts: 33
Joined: 21 Sep 2020, 11:44

Robot names in case of more than 1 robot

Post by sumi_boss »

Hello Coppelia,

I have several UR5 robots in my scene, and I was using parts of your code from an example scene you provided. However, you only had 1 robot in your scene, named 'UR5', while I have several, 'UR5#1', 'UR5#2', etc. The problem is I now have a problem with object handles and names since I have several robots. Is there an easy way to include the numbering of robots? Can I somehow just add the number suffix onto 'UR5' and just use similar code everywhere?

Thanks in advance!

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

Re: Robot names in case of more than 1 robot

Post by coppelia »

Hello,

you can use the exact same code on all robots, if the robots' names only differ by a # and a number. Have a look at how object handles are retrieved from associated code.

Cheers

Post Reply