Get current position of a robot from a world file (Stage)
I have C++ code where I am defining the behaviour of a group of robots. However right now the initial positions of each robots are defined in a .world file for the Stage simulation. Is there a way of possibly getting the position and theta defined in the .world file and referring to it in the C++ code?
I need some sort of way to set the following in the C++ code:
x = theXNumberDefinedInWorldFile
y = theYNumberDefinedinWorldFile
z = 0
theta = theAngleNumberDefinedInWorldFile
Sorry if this is hard to understand but I couldn't think of any other way of putting it as I'm still new to ROS. Any help would be much appreciated.
Thanks.