_RequestMoveRobot.py
Go to the documentation of this file.
00001 """autogenerated by genpy from demo_msgs/RequestMoveRobot.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 geometry_msgs.msg
00008 
00009 class RequestMoveRobot(genpy.Message):
00010   _md5sum = "7c3e3400c315dccc5332e101a2d673ad"
00011   _type = "demo_msgs/RequestMoveRobot"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """int16 task_id
00014 geometry_msgs/Pose pose
00015 
00016 ================================================================================
00017 MSG: geometry_msgs/Pose
00018 # A representation of pose in free space, composed of postion and orientation. 
00019 Point position
00020 Quaternion orientation
00021 
00022 ================================================================================
00023 MSG: geometry_msgs/Point
00024 # This contains the position of a point in free space
00025 float64 x
00026 float64 y
00027 float64 z
00028 
00029 ================================================================================
00030 MSG: geometry_msgs/Quaternion
00031 # This represents an orientation in free space in quaternion form.
00032 
00033 float64 x
00034 float64 y
00035 float64 z
00036 float64 w
00037 
00038 """
00039   __slots__ = ['task_id','pose']
00040   _slot_types = ['int16','geometry_msgs/Pose']
00041 
00042   def __init__(self, *args, **kwds):
00043     """
00044     Constructor. Any message fields that are implicitly/explicitly
00045     set to None will be assigned a default value. The recommend
00046     use is keyword arguments as this is more robust to future message
00047     changes.  You cannot mix in-order arguments and keyword arguments.
00048 
00049     The available fields are:
00050        task_id,pose
00051 
00052     :param args: complete set of field values, in .msg order
00053     :param kwds: use keyword arguments corresponding to message field names
00054     to set specific fields.
00055     """
00056     if args or kwds:
00057       super(RequestMoveRobot, self).__init__(*args, **kwds)
00058       #message fields cannot be None, assign default values for those that are
00059       if self.task_id is None:
00060         self.task_id = 0
00061       if self.pose is None:
00062         self.pose = geometry_msgs.msg.Pose()
00063     else:
00064       self.task_id = 0
00065       self.pose = geometry_msgs.msg.Pose()
00066 
00067   def _get_types(self):
00068     """
00069     internal API method
00070     """
00071     return self._slot_types
00072 
00073   def serialize(self, buff):
00074     """
00075     serialize message into buffer
00076     :param buff: buffer, ``StringIO``
00077     """
00078     try:
00079       _x = self
00080       buff.write(_struct_h7d.pack(_x.task_id, _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))
00081     except struct.error as se: self._check_types(se)
00082     except TypeError as te: self._check_types(te)
00083 
00084   def deserialize(self, str):
00085     """
00086     unpack serialized message in str into this message instance
00087     :param str: byte array of serialized message, ``str``
00088     """
00089     try:
00090       if self.pose is None:
00091         self.pose = geometry_msgs.msg.Pose()
00092       end = 0
00093       _x = self
00094       start = end
00095       end += 58
00096       (_x.task_id, _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,) = _struct_h7d.unpack(str[start:end])
00097       return self
00098     except struct.error as e:
00099       raise genpy.DeserializationError(e) #most likely buffer underfill
00100 
00101 
00102   def serialize_numpy(self, buff, numpy):
00103     """
00104     serialize message with numpy array types into buffer
00105     :param buff: buffer, ``StringIO``
00106     :param numpy: numpy python module
00107     """
00108     try:
00109       _x = self
00110       buff.write(_struct_h7d.pack(_x.task_id, _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))
00111     except struct.error as se: self._check_types(se)
00112     except TypeError as te: self._check_types(te)
00113 
00114   def deserialize_numpy(self, str, numpy):
00115     """
00116     unpack serialized message in str into this message instance using numpy for array types
00117     :param str: byte array of serialized message, ``str``
00118     :param numpy: numpy python module
00119     """
00120     try:
00121       if self.pose is None:
00122         self.pose = geometry_msgs.msg.Pose()
00123       end = 0
00124       _x = self
00125       start = end
00126       end += 58
00127       (_x.task_id, _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,) = _struct_h7d.unpack(str[start:end])
00128       return self
00129     except struct.error as e:
00130       raise genpy.DeserializationError(e) #most likely buffer underfill
00131 
00132 _struct_I = genpy.struct_I
00133 _struct_h7d = struct.Struct("<h7d")
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends


demo_msgs
Author(s): Jihoon
autogenerated on Tue Jan 15 2013 17:43:22