"""autogenerated by genmsg_py from Position_RPY.msg. Do not edit.""" import roslib.message import struct import modelquad.msg class Position_RPY(roslib.message.Message): _md5sum = "8bcbed41efcb95c56653e9f4ef7fbbbb" _type = "modelquad/Position_RPY" _has_header = False #flag to mark the presence of a Header object _full_text = """# Mensaje creado por mi debido a la inexistencia de ningun otro tipo de mensaje igual (POS+RPY) Point posicion # Es equivalente a: # float64 x Posicion (x,y,z) # float64 y # float64 z Point orientacion # Es equivalente a: # float64 r Orientacion angulos de euler (r,p,y) # float64 p # float64 y ================================================================================ MSG: modelquad/Point # This contains the position of a point in free space float64 x float64 y float64 z """ __slots__ = ['posicion','orientacion'] _slot_types = ['modelquad/Point','modelquad/Point'] def __init__(self, *args, **kwds): """ Constructor. Any message fields that are implicitly/explicitly set to None will be assigned a default value. The recommend use is keyword arguments as this is more robust to future message changes. You cannot mix in-order arguments and keyword arguments. The available fields are: posicion,orientacion @param args: complete set of field values, in .msg order @param kwds: use keyword arguments corresponding to message field names to set specific fields. """ if args or kwds: super(Position_RPY, self).__init__(*args, **kwds) #message fields cannot be None, assign default values for those that are if self.posicion is None: self.posicion = modelquad.msg.Point() if self.orientacion is None: self.orientacion = modelquad.msg.Point() else: self.posicion = modelquad.msg.Point() self.orientacion = modelquad.msg.Point() def _get_types(self): """ internal API method """ return self._slot_types def serialize(self, buff): """ serialize message into buffer @param buff: buffer @type buff: StringIO """ try: _x = self buff.write(_struct_6d.pack(_x.posicion.x, _x.posicion.y, _x.posicion.z, _x.orientacion.x, _x.orientacion.y, _x.orientacion.z)) except struct.error as se: self._check_types(se) except TypeError as te: self._check_types(te) def deserialize(self, str): """ unpack serialized message in str into this message instance @param str: byte array of serialized message @type str: str """ try: if self.posicion is None: self.posicion = modelquad.msg.Point() if self.orientacion is None: self.orientacion = modelquad.msg.Point() end = 0 _x = self start = end end += 48 (_x.posicion.x, _x.posicion.y, _x.posicion.z, _x.orientacion.x, _x.orientacion.y, _x.orientacion.z,) = _struct_6d.unpack(str[start:end]) return self except struct.error as e: raise roslib.message.DeserializationError(e) #most likely buffer underfill def serialize_numpy(self, buff, numpy): """ serialize message with numpy array types into buffer @param buff: buffer @type buff: StringIO @param numpy: numpy python module @type numpy module """ try: _x = self buff.write(_struct_6d.pack(_x.posicion.x, _x.posicion.y, _x.posicion.z, _x.orientacion.x, _x.orientacion.y, _x.orientacion.z)) except struct.error as se: self._check_types(se) except TypeError as te: self._check_types(te) def deserialize_numpy(self, str, numpy): """ unpack serialized message in str into this message instance using numpy for array types @param str: byte array of serialized message @type str: str @param numpy: numpy python module @type numpy: module """ try: if self.posicion is None: self.posicion = modelquad.msg.Point() if self.orientacion is None: self.orientacion = modelquad.msg.Point() end = 0 _x = self start = end end += 48 (_x.posicion.x, _x.posicion.y, _x.posicion.z, _x.orientacion.x, _x.orientacion.y, _x.orientacion.z,) = _struct_6d.unpack(str[start:end]) return self except struct.error as e: raise roslib.message.DeserializationError(e) #most likely buffer underfill _struct_I = roslib.message.struct_I _struct_6d = struct.Struct("<6d")