_PointCloudElement.py
Go to the documentation of this file.
1 """autogenerated by genpy from next_best_view/PointCloudElement.msg. Do not edit."""
2 import sys
3 python3 = True if sys.hexversion > 0x03000000 else False
4 import genpy
5 import struct
6 
7 import geometry_msgs.msg
8 
9 class PointCloudElement(genpy.Message):
10  _md5sum = "0da2bb70a0d7aa5d39de0e0fb845657b"
11  _type = "asr_next_best_view/PointCloudElement"
12  _has_header = False #flag to mark the presence of a Header object
13  _full_text = """
14 string object_type
15 geometry_msgs/Pose pose
16 ================================================================================
17 MSG: geometry_msgs/Pose
18 # A representation of pose in free space, composed of postion and orientation.
19 Point position
20 Quaternion orientation
21 
22 ================================================================================
23 MSG: geometry_msgs/Point
24 # This contains the position of a point in free space
25 float64 x
26 float64 y
27 float64 z
28 
29 ================================================================================
30 MSG: geometry_msgs/Quaternion
31 # This represents an orientation in free space in quaternion form.
32 
33 float64 x
34 float64 y
35 float64 z
36 float64 w
37 
38 """
39  __slots__ = ['object_type','pose']
40  _slot_types = ['string','geometry_msgs/Pose']
41 
42  def __init__(self, *args, **kwds):
43  """
44  Constructor. Any message fields that are implicitly/explicitly
45  set to None will be assigned a default value. The recommend
46  use is keyword arguments as this is more robust to future message
47  changes. You cannot mix in-order arguments and keyword arguments.
48 
49  The available fields are:
50  object_type,pose
51 
52  :param args: complete set of field values, in .msg order
53  :param kwds: use keyword arguments corresponding to message field names
54  to set specific fields.
55  """
56  if args or kwds:
57  super(PointCloudElement, self).__init__(*args, **kwds)
58  #message fields cannot be None, assign default values for those that are
59  if self.object_type is None:
60  self.object_type = ''
61  if self.pose is None:
62  self.pose = geometry_msgs.msg.Pose()
63  else:
64  self.object_type = ''
65  self.pose = geometry_msgs.msg.Pose()
66 
67  def _get_types(self):
68  """
69  internal API method
70  """
71  return self._slot_types
72 
73  def serialize(self, buff):
74  """
75  serialize message into buffer
76  :param buff: buffer, ``StringIO``
77  """
78  try:
79  _x = self.object_type
80  length = len(_x)
81  if python3 or type(_x) == unicode:
82  _x = _x.encode('utf-8')
83  length = len(_x)
84  buff.write(struct.pack('<I%ss'%length, length, _x))
85  _x = self
86  buff.write(_struct_7d.pack(_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))
87  except struct.error as se: self._check_types(se)
88  except TypeError as te: self._check_types(te)
89 
90  def deserialize(self, str):
91  """
92  unpack serialized message in str into this message instance
93  :param str: byte array of serialized message, ``str``
94  """
95  try:
96  if self.pose is None:
97  self.pose = geometry_msgs.msg.Pose()
98  end = 0
99  start = end
100  end += 4
101  (length,) = _struct_I.unpack(str[start:end])
102  start = end
103  end += length
104  if python3:
105  self.object_type = str[start:end].decode('utf-8')
106  else:
107  self.object_type = str[start:end]
108  _x = self
109  start = end
110  end += 56
111  (_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_7d.unpack(str[start:end])
112  return self
113  except struct.error as e:
114  raise genpy.DeserializationError(e) #most likely buffer underfill
115 
116 
117  def serialize_numpy(self, buff, numpy):
118  """
119  serialize message with numpy array types into buffer
120  :param buff: buffer, ``StringIO``
121  :param numpy: numpy python module
122  """
123  try:
124  _x = self.object_type
125  length = len(_x)
126  if python3 or type(_x) == unicode:
127  _x = _x.encode('utf-8')
128  length = len(_x)
129  buff.write(struct.pack('<I%ss'%length, length, _x))
130  _x = self
131  buff.write(_struct_7d.pack(_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))
132  except struct.error as se: self._check_types(se)
133  except TypeError as te: self._check_types(te)
134 
135  def deserialize_numpy(self, str, numpy):
136  """
137  unpack serialized message in str into this message instance using numpy for array types
138  :param str: byte array of serialized message, ``str``
139  :param numpy: numpy python module
140  """
141  try:
142  if self.pose is None:
143  self.pose = geometry_msgs.msg.Pose()
144  end = 0
145  start = end
146  end += 4
147  (length,) = _struct_I.unpack(str[start:end])
148  start = end
149  end += length
150  if python3:
151  self.object_type = str[start:end].decode('utf-8')
152  else:
153  self.object_type = str[start:end]
154  _x = self
155  start = end
156  end += 56
157  (_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_7d.unpack(str[start:end])
158  return self
159  except struct.error as e:
160  raise genpy.DeserializationError(e) #most likely buffer underfill
161 
162 _struct_I = genpy.struct_I
163 _struct_7d = struct.Struct("<7d")


asr_next_best_view
Author(s): Aumann Florian, Borella Jocelyn, Heller Florian, Meißner Pascal, Schleicher Ralf, Stöckle Patrick, Stroh Daniel, Trautmann Jeremias, Walter Milena, Wittenbeck Valerij
autogenerated on Thu Jan 9 2020 07:20:18