$search
00001 """autogenerated by genmsg_py from xsens_state_message.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import geometry_msgs.msg 00006 import roslib.rostime 00007 00008 class xsens_state_message(roslib.message.Message): 00009 _md5sum = "07deb68b3aeac7002d1c041ea95ffeb8" 00010 _type = "tulip_gazebo/xsens_state_message" 00011 _has_header = False #flag to mark the presence of a Header object 00012 _full_text = """time time 00013 geometry_msgs/Pose pose 00014 geometry_msgs/Twist twist 00015 ================================================================================ 00016 MSG: geometry_msgs/Pose 00017 # A representation of pose in free space, composed of postion and orientation. 00018 Point position 00019 Quaternion orientation 00020 00021 ================================================================================ 00022 MSG: geometry_msgs/Point 00023 # This contains the position of a point in free space 00024 float64 x 00025 float64 y 00026 float64 z 00027 00028 ================================================================================ 00029 MSG: geometry_msgs/Quaternion 00030 # This represents an orientation in free space in quaternion form. 00031 00032 float64 x 00033 float64 y 00034 float64 z 00035 float64 w 00036 00037 ================================================================================ 00038 MSG: geometry_msgs/Twist 00039 # This expresses velocity in free space broken into it's linear and angular parts. 00040 Vector3 linear 00041 Vector3 angular 00042 00043 ================================================================================ 00044 MSG: geometry_msgs/Vector3 00045 # This represents a vector in free space. 00046 00047 float64 x 00048 float64 y 00049 float64 z 00050 """ 00051 __slots__ = ['time','pose','twist'] 00052 _slot_types = ['time','geometry_msgs/Pose','geometry_msgs/Twist'] 00053 00054 def __init__(self, *args, **kwds): 00055 """ 00056 Constructor. Any message fields that are implicitly/explicitly 00057 set to None will be assigned a default value. The recommend 00058 use is keyword arguments as this is more robust to future message 00059 changes. You cannot mix in-order arguments and keyword arguments. 00060 00061 The available fields are: 00062 time,pose,twist 00063 00064 @param args: complete set of field values, in .msg order 00065 @param kwds: use keyword arguments corresponding to message field names 00066 to set specific fields. 00067 """ 00068 if args or kwds: 00069 super(xsens_state_message, self).__init__(*args, **kwds) 00070 #message fields cannot be None, assign default values for those that are 00071 if self.time is None: 00072 self.time = roslib.rostime.Time() 00073 if self.pose is None: 00074 self.pose = geometry_msgs.msg.Pose() 00075 if self.twist is None: 00076 self.twist = geometry_msgs.msg.Twist() 00077 else: 00078 self.time = roslib.rostime.Time() 00079 self.pose = geometry_msgs.msg.Pose() 00080 self.twist = geometry_msgs.msg.Twist() 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 00092 @type buff: StringIO 00093 """ 00094 try: 00095 _x = self 00096 buff.write(_struct_2I13d.pack(_x.time.secs, _x.time.nsecs, _x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.twist.linear.x, _x.twist.linear.y, _x.twist.linear.z, _x.twist.angular.x, _x.twist.angular.y, _x.twist.angular.z)) 00097 except struct.error as se: self._check_types(se) 00098 except TypeError as te: self._check_types(te) 00099 00100 def deserialize(self, str): 00101 """ 00102 unpack serialized message in str into this message instance 00103 @param str: byte array of serialized message 00104 @type str: str 00105 """ 00106 try: 00107 if self.time is None: 00108 self.time = roslib.rostime.Time() 00109 if self.pose is None: 00110 self.pose = geometry_msgs.msg.Pose() 00111 if self.twist is None: 00112 self.twist = geometry_msgs.msg.Twist() 00113 end = 0 00114 _x = self 00115 start = end 00116 end += 112 00117 (_x.time.secs, _x.time.nsecs, _x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.twist.linear.x, _x.twist.linear.y, _x.twist.linear.z, _x.twist.angular.x, _x.twist.angular.y, _x.twist.angular.z,) = _struct_2I13d.unpack(str[start:end]) 00118 self.time.canon() 00119 return self 00120 except struct.error as e: 00121 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00122 00123 00124 def serialize_numpy(self, buff, numpy): 00125 """ 00126 serialize message with numpy array types into buffer 00127 @param buff: buffer 00128 @type buff: StringIO 00129 @param numpy: numpy python module 00130 @type numpy module 00131 """ 00132 try: 00133 _x = self 00134 buff.write(_struct_2I13d.pack(_x.time.secs, _x.time.nsecs, _x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.twist.linear.x, _x.twist.linear.y, _x.twist.linear.z, _x.twist.angular.x, _x.twist.angular.y, _x.twist.angular.z)) 00135 except struct.error as se: self._check_types(se) 00136 except TypeError as te: self._check_types(te) 00137 00138 def deserialize_numpy(self, str, numpy): 00139 """ 00140 unpack serialized message in str into this message instance using numpy for array types 00141 @param str: byte array of serialized message 00142 @type str: str 00143 @param numpy: numpy python module 00144 @type numpy: module 00145 """ 00146 try: 00147 if self.time is None: 00148 self.time = roslib.rostime.Time() 00149 if self.pose is None: 00150 self.pose = geometry_msgs.msg.Pose() 00151 if self.twist is None: 00152 self.twist = geometry_msgs.msg.Twist() 00153 end = 0 00154 _x = self 00155 start = end 00156 end += 112 00157 (_x.time.secs, _x.time.nsecs, _x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.twist.linear.x, _x.twist.linear.y, _x.twist.linear.z, _x.twist.angular.x, _x.twist.angular.y, _x.twist.angular.z,) = _struct_2I13d.unpack(str[start:end]) 00158 self.time.canon() 00159 return self 00160 except struct.error as e: 00161 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00162 00163 _struct_I = roslib.message.struct_I 00164 _struct_2I13d = struct.Struct("<2I13d")