_direction.py
Go to the documentation of this file.
00001 # autogenerated by genmsg_py from direction.msg. Do not edit.
00002 import roslib.message
00003 import struct
00004 
00005 ## \htmlinclude direction.msg.html
00006 
00007 class direction(roslib.message.Message):
00008   _md5sum = "260b8897f970e5623bdcdc313ccbab8e"
00009   _type = "tele_mobile/direction"
00010   _has_header = False #flag to mark the presence of a Header object
00011   _full_text = """float64 x
00012 float64 y
00013 float64 reset
00014 float64 zen
00015 float64 xvel
00016 float64 yvel
00017 float64 avel
00018 float64 zen_reset
00019 float64 lock
00020 
00021 """
00022   __slots__ = ['x','y','reset','zen','xvel','yvel','avel','zen_reset','lock']
00023   _slot_types = ['float64','float64','float64','float64','float64','float64','float64','float64','float64']
00024 
00025   ## Constructor. Any message fields that are implicitly/explicitly
00026   ## set to None will be assigned a default value. The recommend
00027   ## use is keyword arguments as this is more robust to future message
00028   ## changes.  You cannot mix in-order arguments and keyword arguments.
00029   ##
00030   ## The available fields are:
00031   ##   x,y,reset,zen,xvel,yvel,avel,zen_reset,lock
00032   ##
00033   ## @param args: complete set of field values, in .msg order
00034   ## @param kwds: use keyword arguments corresponding to message field names
00035   ## to set specific fields. 
00036   def __init__(self, *args, **kwds):
00037     super(direction, self).__init__(*args, **kwds)
00038     #message fields cannot be None, assign default values for those that are
00039     if self.x is None:
00040       self.x = 0.
00041     if self.y is None:
00042       self.y = 0.
00043     if self.reset is None:
00044       self.reset = 0.
00045     if self.zen is None:
00046       self.zen = 0.
00047     if self.xvel is None:
00048       self.xvel = 0.
00049     if self.yvel is None:
00050       self.yvel = 0.
00051     if self.avel is None:
00052       self.avel = 0.
00053     if self.zen_reset is None:
00054       self.zen_reset = 0.
00055     if self.lock is None:
00056       self.lock = 0.
00057 
00058   ## internal API method
00059   def _get_types(self): return direction._slot_types
00060 
00061   ## serialize message into buffer
00062   ## @param buff StringIO: buffer
00063   def serialize(self, buff):
00064     try:
00065       buff.write(struct.pack('<9d', self.x, self.y, self.reset, self.zen, self.xvel, self.yvel, self.avel, self.zen_reset, self.lock))
00066     except struct.error, se: self._check_types(se)
00067     except TypeError, te: self._check_types(te)
00068 
00069   ## unpack serialized message in str into this message instance
00070   ## @param str str: byte array of serialized message
00071   def deserialize(self, str):
00072     try:
00073       end = 0
00074       start = end
00075       end += 72
00076       (self.x, self.y, self.reset, self.zen, self.xvel, self.yvel, self.avel, self.zen_reset, self.lock,) = struct.unpack('<9d',str[start:end])
00077       return self
00078     except struct.error, e:
00079       raise roslib.message.DeserializationError(e) #most likely buffer underfill
00080 
00081 
00082   ## serialize message with numpy array types into buffer
00083   ## @param buff StringIO: buffer
00084   ## @param numpy module: numpy python module
00085   def serialize_numpy(self, buff, numpy):
00086     try:
00087       buff.write(struct.pack('<9d', self.x, self.y, self.reset, self.zen, self.xvel, self.yvel, self.avel, self.zen_reset, self.lock))
00088     except struct.error, se: self._check_types(se)
00089     except TypeError, te: self._check_types(te)
00090 
00091   ## unpack serialized message in str into this message instance using numpy for array types
00092   ## @param str str: byte array of serialized message
00093   ## @param numpy module: numpy python module
00094   def deserialize_numpy(self, str, numpy):
00095     try:
00096       end = 0
00097       start = end
00098       end += 72
00099       (self.x, self.y, self.reset, self.zen, self.xvel, self.yvel, self.avel, self.zen_reset, self.lock,) = struct.unpack('<9d',str[start:end])
00100       return self
00101     except struct.error, e:
00102       raise roslib.message.DeserializationError(e) #most likely buffer underfill
00103 


tele_mobile
Author(s): Chih-Hung King, Advisor: Prof. Charlie Kemp, Lab: Healthcare Robotics Lab at Georgia Tech
autogenerated on Wed Nov 27 2013 11:57:13