_SegwayRMP400Status.py
Go to the documentation of this file.
00001 """autogenerated by genpy from iri_segway_rmp_msgs/SegwayRMP400Status.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 iri_segway_rmp_msgs.msg
00008 import std_msgs.msg
00009 
00010 class SegwayRMP400Status(genpy.Message):
00011   _md5sum = "a9cfb6fa904ed9bed91fd4248f49e1f0"
00012   _type = "iri_segway_rmp_msgs/SegwayRMP400Status"
00013   _has_header = False #flag to mark the presence of a Header object
00014   _full_text = """iri_segway_rmp_msgs/SegwayRMP200Status[2] rmp200
00015 
00016 ================================================================================
00017 MSG: iri_segway_rmp_msgs/SegwayRMP200Status
00018 Header header
00019 float32 pitch_angle
00020 float32 pitch_rate
00021 float32 roll_angle
00022 float32 roll_rate
00023 float32 left_wheel_velocity
00024 float32 right_wheel_velocity
00025 float32 yaw_rate
00026 float32 uptime
00027 float32 left_wheel_displacement
00028 float32 right_wheel_displacement
00029 float32 forward_displacement
00030 float32 yaw_displacement
00031 float32 left_motor_torque
00032 float32 right_motor_torque
00033 int8 operation_mode
00034 int8 gain_schedule
00035 float32 ui_battery
00036 float32 powerbase_battery
00037 
00038 ================================================================================
00039 MSG: std_msgs/Header
00040 # Standard metadata for higher-level stamped data types.
00041 # This is generally used to communicate timestamped data 
00042 # in a particular coordinate frame.
00043 # 
00044 # sequence ID: consecutively increasing ID 
00045 uint32 seq
00046 #Two-integer timestamp that is expressed as:
00047 # * stamp.secs: seconds (stamp_secs) since epoch
00048 # * stamp.nsecs: nanoseconds since stamp_secs
00049 # time-handling sugar is provided by the client library
00050 time stamp
00051 #Frame this data is associated with
00052 # 0: no frame
00053 # 1: global frame
00054 string frame_id
00055 
00056 """
00057   __slots__ = ['rmp200']
00058   _slot_types = ['iri_segway_rmp_msgs/SegwayRMP200Status[2]']
00059 
00060   def __init__(self, *args, **kwds):
00061     """
00062     Constructor. Any message fields that are implicitly/explicitly
00063     set to None will be assigned a default value. The recommend
00064     use is keyword arguments as this is more robust to future message
00065     changes.  You cannot mix in-order arguments and keyword arguments.
00066 
00067     The available fields are:
00068        rmp200
00069 
00070     :param args: complete set of field values, in .msg order
00071     :param kwds: use keyword arguments corresponding to message field names
00072     to set specific fields.
00073     """
00074     if args or kwds:
00075       super(SegwayRMP400Status, self).__init__(*args, **kwds)
00076       #message fields cannot be None, assign default values for those that are
00077       if self.rmp200 is None:
00078         self.rmp200 = [iri_segway_rmp_msgs.msg.SegwayRMP200Status(),iri_segway_rmp_msgs.msg.SegwayRMP200Status()]
00079     else:
00080       self.rmp200 = [iri_segway_rmp_msgs.msg.SegwayRMP200Status(),iri_segway_rmp_msgs.msg.SegwayRMP200Status()]
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       for val1 in self.rmp200:
00095         _v1 = val1.header
00096         buff.write(_struct_I.pack(_v1.seq))
00097         _v2 = _v1.stamp
00098         _x = _v2
00099         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00100         _x = _v1.frame_id
00101         length = len(_x)
00102         if python3 or type(_x) == unicode:
00103           _x = _x.encode('utf-8')
00104           length = len(_x)
00105         buff.write(struct.pack('<I%ss'%length, length, _x))
00106         _x = val1
00107         buff.write(_struct_14f2b2f.pack(_x.pitch_angle, _x.pitch_rate, _x.roll_angle, _x.roll_rate, _x.left_wheel_velocity, _x.right_wheel_velocity, _x.yaw_rate, _x.uptime, _x.left_wheel_displacement, _x.right_wheel_displacement, _x.forward_displacement, _x.yaw_displacement, _x.left_motor_torque, _x.right_motor_torque, _x.operation_mode, _x.gain_schedule, _x.ui_battery, _x.powerbase_battery))
00108     except struct.error as se: self._check_types(se)
00109     except TypeError as te: self._check_types(te)
00110 
00111   def deserialize(self, str):
00112     """
00113     unpack serialized message in str into this message instance
00114     :param str: byte array of serialized message, ``str``
00115     """
00116     try:
00117       if self.rmp200 is None:
00118         self.rmp200 = None
00119       end = 0
00120       self.rmp200 = []
00121       for i in range(0, 2):
00122         val1 = iri_segway_rmp_msgs.msg.SegwayRMP200Status()
00123         _v3 = val1.header
00124         start = end
00125         end += 4
00126         (_v3.seq,) = _struct_I.unpack(str[start:end])
00127         _v4 = _v3.stamp
00128         _x = _v4
00129         start = end
00130         end += 8
00131         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00132         start = end
00133         end += 4
00134         (length,) = _struct_I.unpack(str[start:end])
00135         start = end
00136         end += length
00137         if python3:
00138           _v3.frame_id = str[start:end].decode('utf-8')
00139         else:
00140           _v3.frame_id = str[start:end]
00141         _x = val1
00142         start = end
00143         end += 66
00144         (_x.pitch_angle, _x.pitch_rate, _x.roll_angle, _x.roll_rate, _x.left_wheel_velocity, _x.right_wheel_velocity, _x.yaw_rate, _x.uptime, _x.left_wheel_displacement, _x.right_wheel_displacement, _x.forward_displacement, _x.yaw_displacement, _x.left_motor_torque, _x.right_motor_torque, _x.operation_mode, _x.gain_schedule, _x.ui_battery, _x.powerbase_battery,) = _struct_14f2b2f.unpack(str[start:end])
00145         self.rmp200.append(val1)
00146       return self
00147     except struct.error as e:
00148       raise genpy.DeserializationError(e) #most likely buffer underfill
00149 
00150 
00151   def serialize_numpy(self, buff, numpy):
00152     """
00153     serialize message with numpy array types into buffer
00154     :param buff: buffer, ``StringIO``
00155     :param numpy: numpy python module
00156     """
00157     try:
00158       for val1 in self.rmp200:
00159         _v5 = val1.header
00160         buff.write(_struct_I.pack(_v5.seq))
00161         _v6 = _v5.stamp
00162         _x = _v6
00163         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00164         _x = _v5.frame_id
00165         length = len(_x)
00166         if python3 or type(_x) == unicode:
00167           _x = _x.encode('utf-8')
00168           length = len(_x)
00169         buff.write(struct.pack('<I%ss'%length, length, _x))
00170         _x = val1
00171         buff.write(_struct_14f2b2f.pack(_x.pitch_angle, _x.pitch_rate, _x.roll_angle, _x.roll_rate, _x.left_wheel_velocity, _x.right_wheel_velocity, _x.yaw_rate, _x.uptime, _x.left_wheel_displacement, _x.right_wheel_displacement, _x.forward_displacement, _x.yaw_displacement, _x.left_motor_torque, _x.right_motor_torque, _x.operation_mode, _x.gain_schedule, _x.ui_battery, _x.powerbase_battery))
00172     except struct.error as se: self._check_types(se)
00173     except TypeError as te: self._check_types(te)
00174 
00175   def deserialize_numpy(self, str, numpy):
00176     """
00177     unpack serialized message in str into this message instance using numpy for array types
00178     :param str: byte array of serialized message, ``str``
00179     :param numpy: numpy python module
00180     """
00181     try:
00182       if self.rmp200 is None:
00183         self.rmp200 = None
00184       end = 0
00185       self.rmp200 = []
00186       for i in range(0, 2):
00187         val1 = iri_segway_rmp_msgs.msg.SegwayRMP200Status()
00188         _v7 = val1.header
00189         start = end
00190         end += 4
00191         (_v7.seq,) = _struct_I.unpack(str[start:end])
00192         _v8 = _v7.stamp
00193         _x = _v8
00194         start = end
00195         end += 8
00196         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00197         start = end
00198         end += 4
00199         (length,) = _struct_I.unpack(str[start:end])
00200         start = end
00201         end += length
00202         if python3:
00203           _v7.frame_id = str[start:end].decode('utf-8')
00204         else:
00205           _v7.frame_id = str[start:end]
00206         _x = val1
00207         start = end
00208         end += 66
00209         (_x.pitch_angle, _x.pitch_rate, _x.roll_angle, _x.roll_rate, _x.left_wheel_velocity, _x.right_wheel_velocity, _x.yaw_rate, _x.uptime, _x.left_wheel_displacement, _x.right_wheel_displacement, _x.forward_displacement, _x.yaw_displacement, _x.left_motor_torque, _x.right_motor_torque, _x.operation_mode, _x.gain_schedule, _x.ui_battery, _x.powerbase_battery,) = _struct_14f2b2f.unpack(str[start:end])
00210         self.rmp200.append(val1)
00211       return self
00212     except struct.error as e:
00213       raise genpy.DeserializationError(e) #most likely buffer underfill
00214 
00215 _struct_I = genpy.struct_I
00216 _struct_14f2b2f = struct.Struct("<14f2b2f")
00217 _struct_2I = struct.Struct("<2I")


iri_segway_rmp_msgs
Author(s):
autogenerated on Fri Dec 6 2013 20:36:59