_PlanarBaseVelLimits.py
Go to the documentation of this file.
00001 """autogenerated by genpy from hrl_lib/PlanarBaseVelLimits.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 import std_msgs.msg
00008 
00009 class PlanarBaseVelLimits(genpy.Message):
00010   _md5sum = "79d6a8bc99f5988deabb3198a791ba92"
00011   _type = "hrl_lib/PlanarBaseVelLimits"
00012   _has_header = True #flag to mark the presence of a Header object
00013   _full_text = """# max allowable velocities in positive and negative X and Y directions
00014 # and max allowable angular velocity.
00015 Header header
00016 float64 xvel_pos_max
00017 float64 xvel_neg_max
00018 float64 yvel_pos_max
00019 float64 yvel_neg_max
00020 float64 avel_max
00021 
00022 
00023 ================================================================================
00024 MSG: std_msgs/Header
00025 # Standard metadata for higher-level stamped data types.
00026 # This is generally used to communicate timestamped data 
00027 # in a particular coordinate frame.
00028 # 
00029 # sequence ID: consecutively increasing ID 
00030 uint32 seq
00031 #Two-integer timestamp that is expressed as:
00032 # * stamp.secs: seconds (stamp_secs) since epoch
00033 # * stamp.nsecs: nanoseconds since stamp_secs
00034 # time-handling sugar is provided by the client library
00035 time stamp
00036 #Frame this data is associated with
00037 # 0: no frame
00038 # 1: global frame
00039 string frame_id
00040 
00041 """
00042   __slots__ = ['header','xvel_pos_max','xvel_neg_max','yvel_pos_max','yvel_neg_max','avel_max']
00043   _slot_types = ['std_msgs/Header','float64','float64','float64','float64','float64']
00044 
00045   def __init__(self, *args, **kwds):
00046     """
00047     Constructor. Any message fields that are implicitly/explicitly
00048     set to None will be assigned a default value. The recommend
00049     use is keyword arguments as this is more robust to future message
00050     changes.  You cannot mix in-order arguments and keyword arguments.
00051 
00052     The available fields are:
00053        header,xvel_pos_max,xvel_neg_max,yvel_pos_max,yvel_neg_max,avel_max
00054 
00055     :param args: complete set of field values, in .msg order
00056     :param kwds: use keyword arguments corresponding to message field names
00057     to set specific fields.
00058     """
00059     if args or kwds:
00060       super(PlanarBaseVelLimits, self).__init__(*args, **kwds)
00061       #message fields cannot be None, assign default values for those that are
00062       if self.header is None:
00063         self.header = std_msgs.msg.Header()
00064       if self.xvel_pos_max is None:
00065         self.xvel_pos_max = 0.
00066       if self.xvel_neg_max is None:
00067         self.xvel_neg_max = 0.
00068       if self.yvel_pos_max is None:
00069         self.yvel_pos_max = 0.
00070       if self.yvel_neg_max is None:
00071         self.yvel_neg_max = 0.
00072       if self.avel_max is None:
00073         self.avel_max = 0.
00074     else:
00075       self.header = std_msgs.msg.Header()
00076       self.xvel_pos_max = 0.
00077       self.xvel_neg_max = 0.
00078       self.yvel_pos_max = 0.
00079       self.yvel_neg_max = 0.
00080       self.avel_max = 0.
00081 
00082   def _get_types(self):
00083     """
00084     internal API method
00085     """
00086     return self._slot_types
00087 
00088   def serialize(self, buff):
00089     """
00090     serialize message into buffer
00091     :param buff: buffer, ``StringIO``
00092     """
00093     try:
00094       _x = self
00095       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00096       _x = self.header.frame_id
00097       length = len(_x)
00098       if python3 or type(_x) == unicode:
00099         _x = _x.encode('utf-8')
00100         length = len(_x)
00101       buff.write(struct.pack('<I%ss'%length, length, _x))
00102       _x = self
00103       buff.write(_struct_5d.pack(_x.xvel_pos_max, _x.xvel_neg_max, _x.yvel_pos_max, _x.yvel_neg_max, _x.avel_max))
00104     except struct.error as se: self._check_types(se)
00105     except TypeError as te: self._check_types(te)
00106 
00107   def deserialize(self, str):
00108     """
00109     unpack serialized message in str into this message instance
00110     :param str: byte array of serialized message, ``str``
00111     """
00112     try:
00113       if self.header is None:
00114         self.header = std_msgs.msg.Header()
00115       end = 0
00116       _x = self
00117       start = end
00118       end += 12
00119       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00120       start = end
00121       end += 4
00122       (length,) = _struct_I.unpack(str[start:end])
00123       start = end
00124       end += length
00125       if python3:
00126         self.header.frame_id = str[start:end].decode('utf-8')
00127       else:
00128         self.header.frame_id = str[start:end]
00129       _x = self
00130       start = end
00131       end += 40
00132       (_x.xvel_pos_max, _x.xvel_neg_max, _x.yvel_pos_max, _x.yvel_neg_max, _x.avel_max,) = _struct_5d.unpack(str[start:end])
00133       return self
00134     except struct.error as e:
00135       raise genpy.DeserializationError(e) #most likely buffer underfill
00136 
00137 
00138   def serialize_numpy(self, buff, numpy):
00139     """
00140     serialize message with numpy array types into buffer
00141     :param buff: buffer, ``StringIO``
00142     :param numpy: numpy python module
00143     """
00144     try:
00145       _x = self
00146       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00147       _x = self.header.frame_id
00148       length = len(_x)
00149       if python3 or type(_x) == unicode:
00150         _x = _x.encode('utf-8')
00151         length = len(_x)
00152       buff.write(struct.pack('<I%ss'%length, length, _x))
00153       _x = self
00154       buff.write(_struct_5d.pack(_x.xvel_pos_max, _x.xvel_neg_max, _x.yvel_pos_max, _x.yvel_neg_max, _x.avel_max))
00155     except struct.error as se: self._check_types(se)
00156     except TypeError as te: self._check_types(te)
00157 
00158   def deserialize_numpy(self, str, numpy):
00159     """
00160     unpack serialized message in str into this message instance using numpy for array types
00161     :param str: byte array of serialized message, ``str``
00162     :param numpy: numpy python module
00163     """
00164     try:
00165       if self.header is None:
00166         self.header = std_msgs.msg.Header()
00167       end = 0
00168       _x = self
00169       start = end
00170       end += 12
00171       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00172       start = end
00173       end += 4
00174       (length,) = _struct_I.unpack(str[start:end])
00175       start = end
00176       end += length
00177       if python3:
00178         self.header.frame_id = str[start:end].decode('utf-8')
00179       else:
00180         self.header.frame_id = str[start:end]
00181       _x = self
00182       start = end
00183       end += 40
00184       (_x.xvel_pos_max, _x.xvel_neg_max, _x.yvel_pos_max, _x.yvel_neg_max, _x.avel_max,) = _struct_5d.unpack(str[start:end])
00185       return self
00186     except struct.error as e:
00187       raise genpy.DeserializationError(e) #most likely buffer underfill
00188 
00189 _struct_I = genpy.struct_I
00190 _struct_5d = struct.Struct("<5d")
00191 _struct_3I = struct.Struct("<3I")


hrl_lib
Author(s): Cressel Anderson, Travis Deyle, Advait Jain, Hai Nguyen, Advisor: Prof. Charlie Kemp, Lab: Healthcare Robotics Lab at Georgia Tech
autogenerated on Wed Nov 27 2013 11:34:06