kuavo-humanoid-sdk 1.1.2a921__py3-none-any.whl → 1.1.2a922__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of kuavo-humanoid-sdk might be problematic. Click here for more details.

Files changed (82) hide show
  1. kuavo_humanoid_sdk/msg/__init__.py +4 -0
  2. kuavo_humanoid_sdk/msg/kuavo_msgs/__init__.py +7 -0
  3. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_Metadata.py +199 -0
  4. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/__init__.py +26 -0
  5. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armPoseWithTimeStamp.py +168 -0
  6. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armTargetPoses.py +151 -0
  7. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandCommand.py +229 -0
  8. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandTouchState.py +256 -0
  9. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_endEffectorData.py +227 -0
  10. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose.py +122 -0
  11. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseTargetTrajectories.py +203 -0
  12. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gaitTimeName.py +147 -0
  13. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureInfo.py +218 -0
  14. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureTask.py +149 -0
  15. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_headBodyPose.py +145 -0
  16. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_imuData.py +165 -0
  17. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointCmd.py +390 -0
  18. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointData.py +205 -0
  19. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawCommand.py +320 -0
  20. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawState.py +341 -0
  21. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_questJoySticks.py +191 -0
  22. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHandPosition.py +225 -0
  23. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHeadMotionData.py +128 -0
  24. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotState.py +222 -0
  25. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_sensorsData.py +495 -0
  26. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_switchGaitByName.py +200 -0
  27. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_touchSensorStatus.py +162 -0
  28. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloDetection.py +251 -0
  29. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloOutputData.py +168 -0
  30. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/__init__.py +15 -0
  31. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeArmCtrlMode.py +275 -0
  32. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeTorsoCtrlMode.py +274 -0
  33. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_controlLejuClaw.py +408 -0
  34. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_enableHandTouchSensor.py +304 -0
  35. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_footPoseTargetTrajectoriesSrv.py +321 -0
  36. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecute.py +339 -0
  37. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecuteState.py +257 -0
  38. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureList.py +418 -0
  39. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getCurrentGaitName.py +253 -0
  40. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_handForceLevel.py +330 -0
  41. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_jointMoveTo.py +302 -0
  42. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setHwIntialState.py +304 -0
  43. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setMotorEncoderRoundService.py +283 -0
  44. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setTagId.py +275 -0
  45. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_singleStepControl.py +356 -0
  46. kuavo_humanoid_sdk/msg/motion_capture_ik/__init__.py +7 -0
  47. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/__init__.py +9 -0
  48. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_armHandPose.py +160 -0
  49. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_handPose.py +136 -0
  50. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_headBodyPose.py +145 -0
  51. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_ikSolveError.py +171 -0
  52. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_ikSolveParam.py +140 -0
  53. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_robotArmQVVD.py +177 -0
  54. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_robotHandPosition.py +225 -0
  55. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_twoArmHandPose.py +272 -0
  56. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_twoArmHandPoseCmd.py +311 -0
  57. kuavo_humanoid_sdk/msg/motion_capture_ik/srv/__init__.py +4 -0
  58. kuavo_humanoid_sdk/msg/motion_capture_ik/srv/_changeArmCtrlMode.py +275 -0
  59. kuavo_humanoid_sdk/msg/motion_capture_ik/srv/_changeArmCtrlModeKuavo.py +236 -0
  60. kuavo_humanoid_sdk/msg/motion_capture_ik/srv/_fkSrv.py +394 -0
  61. kuavo_humanoid_sdk/msg/motion_capture_ik/srv/_twoArmHandPoseCmdSrv.py +661 -0
  62. kuavo_humanoid_sdk/msg/ocs2_msgs/__init__.py +7 -0
  63. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/__init__.py +12 -0
  64. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_constraint.py +142 -0
  65. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_controller_data.py +121 -0
  66. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_lagrangian_metrics.py +148 -0
  67. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mode_schedule.py +150 -0
  68. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_flattened_controller.py +666 -0
  69. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_input.py +122 -0
  70. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_observation.py +209 -0
  71. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_performance_indices.py +140 -0
  72. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_solver_data.py +886 -0
  73. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_state.py +122 -0
  74. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_target_trajectories.py +239 -0
  75. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_multiplier.py +148 -0
  76. kuavo_humanoid_sdk/msg/ocs2_msgs/srv/__init__.py +1 -0
  77. kuavo_humanoid_sdk/msg/ocs2_msgs/srv/_reset.py +376 -0
  78. {kuavo_humanoid_sdk-1.1.2a921.dist-info → kuavo_humanoid_sdk-1.1.2a922.dist-info}/METADATA +1 -1
  79. kuavo_humanoid_sdk-1.1.2a922.dist-info/RECORD +104 -0
  80. kuavo_humanoid_sdk-1.1.2a921.dist-info/RECORD +0 -27
  81. {kuavo_humanoid_sdk-1.1.2a921.dist-info → kuavo_humanoid_sdk-1.1.2a922.dist-info}/WHEEL +0 -0
  82. {kuavo_humanoid_sdk-1.1.2a921.dist-info → kuavo_humanoid_sdk-1.1.2a922.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,191 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/questJoySticks.msg. Do not edit."""
3
+ import codecs
4
+ import sys
5
+ python3 = True if sys.hexversion > 0x03000000 else False
6
+ import genpy
7
+ import struct
8
+
9
+
10
+ class questJoySticks(genpy.Message):
11
+ _md5sum = "c686b65cdd180a9046db651d6492ec65"
12
+ _type = "kuavo_msgs/questJoySticks"
13
+ _has_header = False # flag to mark the presence of a Header object
14
+ _full_text = """float32 left_x
15
+ float32 left_y
16
+ float32 left_trigger
17
+ float32 left_grip
18
+ bool left_first_button_pressed
19
+ bool left_second_button_pressed
20
+ bool left_first_button_touched
21
+ bool left_second_button_touched
22
+ float32 right_x
23
+ float32 right_y
24
+ float32 right_trigger
25
+ float32 right_grip
26
+ bool right_first_button_pressed
27
+ bool right_second_button_pressed
28
+ bool right_first_button_touched
29
+ bool right_second_button_touched
30
+ """
31
+ __slots__ = ['left_x','left_y','left_trigger','left_grip','left_first_button_pressed','left_second_button_pressed','left_first_button_touched','left_second_button_touched','right_x','right_y','right_trigger','right_grip','right_first_button_pressed','right_second_button_pressed','right_first_button_touched','right_second_button_touched']
32
+ _slot_types = ['float32','float32','float32','float32','bool','bool','bool','bool','float32','float32','float32','float32','bool','bool','bool','bool']
33
+
34
+ def __init__(self, *args, **kwds):
35
+ """
36
+ Constructor. Any message fields that are implicitly/explicitly
37
+ set to None will be assigned a default value. The recommend
38
+ use is keyword arguments as this is more robust to future message
39
+ changes. You cannot mix in-order arguments and keyword arguments.
40
+
41
+ The available fields are:
42
+ left_x,left_y,left_trigger,left_grip,left_first_button_pressed,left_second_button_pressed,left_first_button_touched,left_second_button_touched,right_x,right_y,right_trigger,right_grip,right_first_button_pressed,right_second_button_pressed,right_first_button_touched,right_second_button_touched
43
+
44
+ :param args: complete set of field values, in .msg order
45
+ :param kwds: use keyword arguments corresponding to message field names
46
+ to set specific fields.
47
+ """
48
+ if args or kwds:
49
+ super(questJoySticks, self).__init__(*args, **kwds)
50
+ # message fields cannot be None, assign default values for those that are
51
+ if self.left_x is None:
52
+ self.left_x = 0.
53
+ if self.left_y is None:
54
+ self.left_y = 0.
55
+ if self.left_trigger is None:
56
+ self.left_trigger = 0.
57
+ if self.left_grip is None:
58
+ self.left_grip = 0.
59
+ if self.left_first_button_pressed is None:
60
+ self.left_first_button_pressed = False
61
+ if self.left_second_button_pressed is None:
62
+ self.left_second_button_pressed = False
63
+ if self.left_first_button_touched is None:
64
+ self.left_first_button_touched = False
65
+ if self.left_second_button_touched is None:
66
+ self.left_second_button_touched = False
67
+ if self.right_x is None:
68
+ self.right_x = 0.
69
+ if self.right_y is None:
70
+ self.right_y = 0.
71
+ if self.right_trigger is None:
72
+ self.right_trigger = 0.
73
+ if self.right_grip is None:
74
+ self.right_grip = 0.
75
+ if self.right_first_button_pressed is None:
76
+ self.right_first_button_pressed = False
77
+ if self.right_second_button_pressed is None:
78
+ self.right_second_button_pressed = False
79
+ if self.right_first_button_touched is None:
80
+ self.right_first_button_touched = False
81
+ if self.right_second_button_touched is None:
82
+ self.right_second_button_touched = False
83
+ else:
84
+ self.left_x = 0.
85
+ self.left_y = 0.
86
+ self.left_trigger = 0.
87
+ self.left_grip = 0.
88
+ self.left_first_button_pressed = False
89
+ self.left_second_button_pressed = False
90
+ self.left_first_button_touched = False
91
+ self.left_second_button_touched = False
92
+ self.right_x = 0.
93
+ self.right_y = 0.
94
+ self.right_trigger = 0.
95
+ self.right_grip = 0.
96
+ self.right_first_button_pressed = False
97
+ self.right_second_button_pressed = False
98
+ self.right_first_button_touched = False
99
+ self.right_second_button_touched = False
100
+
101
+ def _get_types(self):
102
+ """
103
+ internal API method
104
+ """
105
+ return self._slot_types
106
+
107
+ def serialize(self, buff):
108
+ """
109
+ serialize message into buffer
110
+ :param buff: buffer, ``StringIO``
111
+ """
112
+ try:
113
+ _x = self
114
+ buff.write(_get_struct_4f4B4f4B().pack(_x.left_x, _x.left_y, _x.left_trigger, _x.left_grip, _x.left_first_button_pressed, _x.left_second_button_pressed, _x.left_first_button_touched, _x.left_second_button_touched, _x.right_x, _x.right_y, _x.right_trigger, _x.right_grip, _x.right_first_button_pressed, _x.right_second_button_pressed, _x.right_first_button_touched, _x.right_second_button_touched))
115
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
116
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
117
+
118
+ def deserialize(self, str):
119
+ """
120
+ unpack serialized message in str into this message instance
121
+ :param str: byte array of serialized message, ``str``
122
+ """
123
+ if python3:
124
+ codecs.lookup_error("rosmsg").msg_type = self._type
125
+ try:
126
+ end = 0
127
+ _x = self
128
+ start = end
129
+ end += 40
130
+ (_x.left_x, _x.left_y, _x.left_trigger, _x.left_grip, _x.left_first_button_pressed, _x.left_second_button_pressed, _x.left_first_button_touched, _x.left_second_button_touched, _x.right_x, _x.right_y, _x.right_trigger, _x.right_grip, _x.right_first_button_pressed, _x.right_second_button_pressed, _x.right_first_button_touched, _x.right_second_button_touched,) = _get_struct_4f4B4f4B().unpack(str[start:end])
131
+ self.left_first_button_pressed = bool(self.left_first_button_pressed)
132
+ self.left_second_button_pressed = bool(self.left_second_button_pressed)
133
+ self.left_first_button_touched = bool(self.left_first_button_touched)
134
+ self.left_second_button_touched = bool(self.left_second_button_touched)
135
+ self.right_first_button_pressed = bool(self.right_first_button_pressed)
136
+ self.right_second_button_pressed = bool(self.right_second_button_pressed)
137
+ self.right_first_button_touched = bool(self.right_first_button_touched)
138
+ self.right_second_button_touched = bool(self.right_second_button_touched)
139
+ return self
140
+ except struct.error as e:
141
+ raise genpy.DeserializationError(e) # most likely buffer underfill
142
+
143
+
144
+ def serialize_numpy(self, buff, numpy):
145
+ """
146
+ serialize message with numpy array types into buffer
147
+ :param buff: buffer, ``StringIO``
148
+ :param numpy: numpy python module
149
+ """
150
+ try:
151
+ _x = self
152
+ buff.write(_get_struct_4f4B4f4B().pack(_x.left_x, _x.left_y, _x.left_trigger, _x.left_grip, _x.left_first_button_pressed, _x.left_second_button_pressed, _x.left_first_button_touched, _x.left_second_button_touched, _x.right_x, _x.right_y, _x.right_trigger, _x.right_grip, _x.right_first_button_pressed, _x.right_second_button_pressed, _x.right_first_button_touched, _x.right_second_button_touched))
153
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
154
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
155
+
156
+ def deserialize_numpy(self, str, numpy):
157
+ """
158
+ unpack serialized message in str into this message instance using numpy for array types
159
+ :param str: byte array of serialized message, ``str``
160
+ :param numpy: numpy python module
161
+ """
162
+ if python3:
163
+ codecs.lookup_error("rosmsg").msg_type = self._type
164
+ try:
165
+ end = 0
166
+ _x = self
167
+ start = end
168
+ end += 40
169
+ (_x.left_x, _x.left_y, _x.left_trigger, _x.left_grip, _x.left_first_button_pressed, _x.left_second_button_pressed, _x.left_first_button_touched, _x.left_second_button_touched, _x.right_x, _x.right_y, _x.right_trigger, _x.right_grip, _x.right_first_button_pressed, _x.right_second_button_pressed, _x.right_first_button_touched, _x.right_second_button_touched,) = _get_struct_4f4B4f4B().unpack(str[start:end])
170
+ self.left_first_button_pressed = bool(self.left_first_button_pressed)
171
+ self.left_second_button_pressed = bool(self.left_second_button_pressed)
172
+ self.left_first_button_touched = bool(self.left_first_button_touched)
173
+ self.left_second_button_touched = bool(self.left_second_button_touched)
174
+ self.right_first_button_pressed = bool(self.right_first_button_pressed)
175
+ self.right_second_button_pressed = bool(self.right_second_button_pressed)
176
+ self.right_first_button_touched = bool(self.right_first_button_touched)
177
+ self.right_second_button_touched = bool(self.right_second_button_touched)
178
+ return self
179
+ except struct.error as e:
180
+ raise genpy.DeserializationError(e) # most likely buffer underfill
181
+
182
+ _struct_I = genpy.struct_I
183
+ def _get_struct_I():
184
+ global _struct_I
185
+ return _struct_I
186
+ _struct_4f4B4f4B = None
187
+ def _get_struct_4f4B4f4B():
188
+ global _struct_4f4B4f4B
189
+ if _struct_4f4B4f4B is None:
190
+ _struct_4f4B4f4B = struct.Struct("<4f4B4f4B")
191
+ return _struct_4f4B4f4B
@@ -0,0 +1,225 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/robotHandPosition.msg. Do not edit."""
3
+ import codecs
4
+ import sys
5
+ python3 = True if sys.hexversion > 0x03000000 else False
6
+ import genpy
7
+ import struct
8
+
9
+ import std_msgs.msg
10
+
11
+ class robotHandPosition(genpy.Message):
12
+ _md5sum = "ee45ac8dfb6e0c9a4c7712025fd69d4f"
13
+ _type = "kuavo_msgs/robotHandPosition"
14
+ _has_header = True # flag to mark the presence of a Header object
15
+ _full_text = """Header header
16
+ uint8[] left_hand_position
17
+ uint8[] right_hand_position
18
+ ================================================================================
19
+ MSG: std_msgs/Header
20
+ # Standard metadata for higher-level stamped data types.
21
+ # This is generally used to communicate timestamped data
22
+ # in a particular coordinate frame.
23
+ #
24
+ # sequence ID: consecutively increasing ID
25
+ uint32 seq
26
+ #Two-integer timestamp that is expressed as:
27
+ # * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')
28
+ # * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')
29
+ # time-handling sugar is provided by the client library
30
+ time stamp
31
+ #Frame this data is associated with
32
+ string frame_id
33
+ """
34
+ __slots__ = ['header','left_hand_position','right_hand_position']
35
+ _slot_types = ['std_msgs/Header','uint8[]','uint8[]']
36
+
37
+ def __init__(self, *args, **kwds):
38
+ """
39
+ Constructor. Any message fields that are implicitly/explicitly
40
+ set to None will be assigned a default value. The recommend
41
+ use is keyword arguments as this is more robust to future message
42
+ changes. You cannot mix in-order arguments and keyword arguments.
43
+
44
+ The available fields are:
45
+ header,left_hand_position,right_hand_position
46
+
47
+ :param args: complete set of field values, in .msg order
48
+ :param kwds: use keyword arguments corresponding to message field names
49
+ to set specific fields.
50
+ """
51
+ if args or kwds:
52
+ super(robotHandPosition, self).__init__(*args, **kwds)
53
+ # message fields cannot be None, assign default values for those that are
54
+ if self.header is None:
55
+ self.header = std_msgs.msg.Header()
56
+ if self.left_hand_position is None:
57
+ self.left_hand_position = b''
58
+ if self.right_hand_position is None:
59
+ self.right_hand_position = b''
60
+ else:
61
+ self.header = std_msgs.msg.Header()
62
+ self.left_hand_position = b''
63
+ self.right_hand_position = b''
64
+
65
+ def _get_types(self):
66
+ """
67
+ internal API method
68
+ """
69
+ return self._slot_types
70
+
71
+ def serialize(self, buff):
72
+ """
73
+ serialize message into buffer
74
+ :param buff: buffer, ``StringIO``
75
+ """
76
+ try:
77
+ _x = self
78
+ buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
79
+ _x = self.header.frame_id
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.Struct('<I%ss'%length).pack(length, _x))
85
+ _x = self.left_hand_position
86
+ length = len(_x)
87
+ # - if encoded as a list instead, serialize as bytes instead of string
88
+ if type(_x) in [list, tuple]:
89
+ buff.write(struct.Struct('<I%sB'%length).pack(length, *_x))
90
+ else:
91
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
92
+ _x = self.right_hand_position
93
+ length = len(_x)
94
+ # - if encoded as a list instead, serialize as bytes instead of string
95
+ if type(_x) in [list, tuple]:
96
+ buff.write(struct.Struct('<I%sB'%length).pack(length, *_x))
97
+ else:
98
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
99
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
100
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
101
+
102
+ def deserialize(self, str):
103
+ """
104
+ unpack serialized message in str into this message instance
105
+ :param str: byte array of serialized message, ``str``
106
+ """
107
+ if python3:
108
+ codecs.lookup_error("rosmsg").msg_type = self._type
109
+ try:
110
+ if self.header is None:
111
+ self.header = std_msgs.msg.Header()
112
+ end = 0
113
+ _x = self
114
+ start = end
115
+ end += 12
116
+ (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
117
+ start = end
118
+ end += 4
119
+ (length,) = _struct_I.unpack(str[start:end])
120
+ start = end
121
+ end += length
122
+ if python3:
123
+ self.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
124
+ else:
125
+ self.header.frame_id = str[start:end]
126
+ start = end
127
+ end += 4
128
+ (length,) = _struct_I.unpack(str[start:end])
129
+ start = end
130
+ end += length
131
+ self.left_hand_position = str[start:end]
132
+ start = end
133
+ end += 4
134
+ (length,) = _struct_I.unpack(str[start:end])
135
+ start = end
136
+ end += length
137
+ self.right_hand_position = str[start:end]
138
+ return self
139
+ except struct.error as e:
140
+ raise genpy.DeserializationError(e) # most likely buffer underfill
141
+
142
+
143
+ def serialize_numpy(self, buff, numpy):
144
+ """
145
+ serialize message with numpy array types into buffer
146
+ :param buff: buffer, ``StringIO``
147
+ :param numpy: numpy python module
148
+ """
149
+ try:
150
+ _x = self
151
+ buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
152
+ _x = self.header.frame_id
153
+ length = len(_x)
154
+ if python3 or type(_x) == unicode:
155
+ _x = _x.encode('utf-8')
156
+ length = len(_x)
157
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
158
+ _x = self.left_hand_position
159
+ length = len(_x)
160
+ # - if encoded as a list instead, serialize as bytes instead of string
161
+ if type(_x) in [list, tuple]:
162
+ buff.write(struct.Struct('<I%sB'%length).pack(length, *_x))
163
+ else:
164
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
165
+ _x = self.right_hand_position
166
+ length = len(_x)
167
+ # - if encoded as a list instead, serialize as bytes instead of string
168
+ if type(_x) in [list, tuple]:
169
+ buff.write(struct.Struct('<I%sB'%length).pack(length, *_x))
170
+ else:
171
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
172
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
173
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
174
+
175
+ def deserialize_numpy(self, str, numpy):
176
+ """
177
+ unpack serialized message in str into this message instance using numpy for array types
178
+ :param str: byte array of serialized message, ``str``
179
+ :param numpy: numpy python module
180
+ """
181
+ if python3:
182
+ codecs.lookup_error("rosmsg").msg_type = self._type
183
+ try:
184
+ if self.header is None:
185
+ self.header = std_msgs.msg.Header()
186
+ end = 0
187
+ _x = self
188
+ start = end
189
+ end += 12
190
+ (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
191
+ start = end
192
+ end += 4
193
+ (length,) = _struct_I.unpack(str[start:end])
194
+ start = end
195
+ end += length
196
+ if python3:
197
+ self.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
198
+ else:
199
+ self.header.frame_id = str[start:end]
200
+ start = end
201
+ end += 4
202
+ (length,) = _struct_I.unpack(str[start:end])
203
+ start = end
204
+ end += length
205
+ self.left_hand_position = str[start:end]
206
+ start = end
207
+ end += 4
208
+ (length,) = _struct_I.unpack(str[start:end])
209
+ start = end
210
+ end += length
211
+ self.right_hand_position = str[start:end]
212
+ return self
213
+ except struct.error as e:
214
+ raise genpy.DeserializationError(e) # most likely buffer underfill
215
+
216
+ _struct_I = genpy.struct_I
217
+ def _get_struct_I():
218
+ global _struct_I
219
+ return _struct_I
220
+ _struct_3I = None
221
+ def _get_struct_3I():
222
+ global _struct_3I
223
+ if _struct_3I is None:
224
+ _struct_3I = struct.Struct("<3I")
225
+ return _struct_3I
@@ -0,0 +1,128 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/robotHeadMotionData.msg. Do not edit."""
3
+ import codecs
4
+ import sys
5
+ python3 = True if sys.hexversion > 0x03000000 else False
6
+ import genpy
7
+ import struct
8
+
9
+
10
+ class robotHeadMotionData(genpy.Message):
11
+ _md5sum = "400001e7cf73111efbced59084cb481a"
12
+ _type = "kuavo_msgs/robotHeadMotionData"
13
+ _has_header = False # flag to mark the presence of a Header object
14
+ _full_text = """# robotHeadMotionData.msg
15
+ #
16
+ # - joint_data[0] : yaw, [-30, 30]
17
+ # - joint_data[1] : pitch, [-25, 25]
18
+ #
19
+ # - [-8.000000, 0.000000]
20
+
21
+ float64[] joint_data
22
+ """
23
+ __slots__ = ['joint_data']
24
+ _slot_types = ['float64[]']
25
+
26
+ def __init__(self, *args, **kwds):
27
+ """
28
+ Constructor. Any message fields that are implicitly/explicitly
29
+ set to None will be assigned a default value. The recommend
30
+ use is keyword arguments as this is more robust to future message
31
+ changes. You cannot mix in-order arguments and keyword arguments.
32
+
33
+ The available fields are:
34
+ joint_data
35
+
36
+ :param args: complete set of field values, in .msg order
37
+ :param kwds: use keyword arguments corresponding to message field names
38
+ to set specific fields.
39
+ """
40
+ if args or kwds:
41
+ super(robotHeadMotionData, self).__init__(*args, **kwds)
42
+ # message fields cannot be None, assign default values for those that are
43
+ if self.joint_data is None:
44
+ self.joint_data = []
45
+ else:
46
+ self.joint_data = []
47
+
48
+ def _get_types(self):
49
+ """
50
+ internal API method
51
+ """
52
+ return self._slot_types
53
+
54
+ def serialize(self, buff):
55
+ """
56
+ serialize message into buffer
57
+ :param buff: buffer, ``StringIO``
58
+ """
59
+ try:
60
+ length = len(self.joint_data)
61
+ buff.write(_struct_I.pack(length))
62
+ pattern = '<%sd'%length
63
+ buff.write(struct.Struct(pattern).pack(*self.joint_data))
64
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
65
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
66
+
67
+ def deserialize(self, str):
68
+ """
69
+ unpack serialized message in str into this message instance
70
+ :param str: byte array of serialized message, ``str``
71
+ """
72
+ if python3:
73
+ codecs.lookup_error("rosmsg").msg_type = self._type
74
+ try:
75
+ end = 0
76
+ start = end
77
+ end += 4
78
+ (length,) = _struct_I.unpack(str[start:end])
79
+ pattern = '<%sd'%length
80
+ start = end
81
+ s = struct.Struct(pattern)
82
+ end += s.size
83
+ self.joint_data = s.unpack(str[start:end])
84
+ return self
85
+ except struct.error as e:
86
+ raise genpy.DeserializationError(e) # most likely buffer underfill
87
+
88
+
89
+ def serialize_numpy(self, buff, numpy):
90
+ """
91
+ serialize message with numpy array types into buffer
92
+ :param buff: buffer, ``StringIO``
93
+ :param numpy: numpy python module
94
+ """
95
+ try:
96
+ length = len(self.joint_data)
97
+ buff.write(_struct_I.pack(length))
98
+ pattern = '<%sd'%length
99
+ buff.write(self.joint_data.tostring())
100
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
101
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
102
+
103
+ def deserialize_numpy(self, str, numpy):
104
+ """
105
+ unpack serialized message in str into this message instance using numpy for array types
106
+ :param str: byte array of serialized message, ``str``
107
+ :param numpy: numpy python module
108
+ """
109
+ if python3:
110
+ codecs.lookup_error("rosmsg").msg_type = self._type
111
+ try:
112
+ end = 0
113
+ start = end
114
+ end += 4
115
+ (length,) = _struct_I.unpack(str[start:end])
116
+ pattern = '<%sd'%length
117
+ start = end
118
+ s = struct.Struct(pattern)
119
+ end += s.size
120
+ self.joint_data = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
121
+ return self
122
+ except struct.error as e:
123
+ raise genpy.DeserializationError(e) # most likely buffer underfill
124
+
125
+ _struct_I = genpy.struct_I
126
+ def _get_struct_I():
127
+ global _struct_I
128
+ return _struct_I