Page 1 of 1

state information of other robot

Posted: 23 May 2013, 07:48
by yangssoo
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

Re: state information of other robot

Posted: 23 May 2013, 09:55
by coppelia
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