state information of other robot

Typically: "How do I... ", "How can I... " questions
Post Reply
yangssoo
Posts: 2
Joined: 20 May 2013, 10:20

state information of other robot

Post by yangssoo » 23 May 2013, 07:48

Hi,

I'm trying to control multiple robot, and my controller need state(coordinate) information of other robot.

In child script, can I get information about other robot? (Is there a function? such as simGetJointPosition for other robot information)

Thanks

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

Re: state information of other robot

Post by coppelia » 23 May 2013, 09:55

Hello,

Yes you can do that. But in that case you have to specify the object's name explicitely with its suffix:
  • if the other object's name is myRobot, then get its handle with simGetObjectHandle('myRobot#')
  • if the other object's name is myRobot#42, then get its handle with simGetObjectHandle('myRobot#42')
  • etc.
If you access objects on the same robot, then you should not specify the name suffix, so that copied robots will behave correctly. Make sure you understand how object handles are retrieved in V-REP.

Cheers

Post Reply