MarkerArray to vector
I am trying to get some information which is being published in RViz from other nodes I did not programmed. I checked the type of messages are being post in the topics I am interested in. The one that is giving me problems is the MarkerArray type of message. I know this type have inside different Marker type. Therefore I imported both Marker and MarkerArray from visualization_msg.msgs (I am programming the node in Python, in Ubuntu 16.04). I checked the message type and I want to obtain all the position of the markers. Hence, I tried printing msg.markers.pose.position.x and msg.markers.points.x but both of them trigger the same error, msg.markers does not have that attribute. Actually it does not have any of the attributes it should but others. Those are the attributes I am getting with:
dir(msg.markers)
['__add__', '__class__', '__contains__', '__delattr__', '__delitem__', '__delslice__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getslice__', '__gt__', '__hash__', '__iadd__', '__imul__', '__init__', '__iter__', '__le__', '__len__', '__lt__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__reversed__', '__rmul__', '__setattr__', '__setitem__', '__setslice__', '__sizeof__', '__str__', '__subclasshook__', 'append', 'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'sort']
Do I have to declare the markers as something else to be able to obtain those data? I know Markers are supposed to be just to print but it is the only topic with the data I need to use.