# Revision history [back]

### Get model position from objects ( Position is not exact)

Hello guys,

i never get an answer to my problem so i think i will describe the problem a bit better this time.

So i want to get the position of the Objects in my world. It worked good so far the problem is that the x value is 0.5 above or below the correct position. System is Linux 16.04. Ros Kinetic. Gezabo 7.0

Here is my code:

class Block:
def __init__(self, name, relative_entity_name):
self._name = name
self._relative_entity_name = relative_entity_name
class Tutorial:
_blockListDict = {

}
def update_gazebo_modelPoints(self):
try:
i = 0
plist = []
model_coordinates = rospy.ServiceProxy('/gazebo/get_model_state',GetModelState)
for block in self._blockListDict.itervalues():
blockName = str(block._name)
resp_coordinates = model_coordinates(blockName,block._relative_entity_name)
plist.append(Point(resp_coordinates.pose.position.x,resp_coordinates.pose.position.y,0))
return plist
except rospy.ServiceException as e:
rospy.loginfo("Get Model State service call failed:  {0}".format(e))


So my first object stands on Point(5,5,0)

Here is the screenshot from simulation:

If i run the code i got this:

Its the same with all objects .

Hope u can help me !