kuavo-humanoid-sdk 1.2.2__20250922181216-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 (137) hide show
  1. kuavo_humanoid_sdk/__init__.py +6 -0
  2. kuavo_humanoid_sdk/common/logger.py +45 -0
  3. kuavo_humanoid_sdk/interfaces/__init__.py +4 -0
  4. kuavo_humanoid_sdk/interfaces/data_types.py +276 -0
  5. kuavo_humanoid_sdk/interfaces/end_effector.py +62 -0
  6. kuavo_humanoid_sdk/interfaces/robot.py +22 -0
  7. kuavo_humanoid_sdk/interfaces/robot_info.py +56 -0
  8. kuavo_humanoid_sdk/kuavo/__init__.py +11 -0
  9. kuavo_humanoid_sdk/kuavo/core/audio.py +32 -0
  10. kuavo_humanoid_sdk/kuavo/core/core.py +612 -0
  11. kuavo_humanoid_sdk/kuavo/core/dex_hand_control.py +114 -0
  12. kuavo_humanoid_sdk/kuavo/core/leju_claw_control.py +67 -0
  13. kuavo_humanoid_sdk/kuavo/core/ros/audio.py +92 -0
  14. kuavo_humanoid_sdk/kuavo/core/ros/control.py +1309 -0
  15. kuavo_humanoid_sdk/kuavo/core/ros/observation.py +94 -0
  16. kuavo_humanoid_sdk/kuavo/core/ros/param.py +183 -0
  17. kuavo_humanoid_sdk/kuavo/core/ros/sat_utils.py +103 -0
  18. kuavo_humanoid_sdk/kuavo/core/ros/state.py +605 -0
  19. kuavo_humanoid_sdk/kuavo/core/ros/tools.py +219 -0
  20. kuavo_humanoid_sdk/kuavo/core/ros/vision.py +234 -0
  21. kuavo_humanoid_sdk/kuavo/core/ros_env.py +237 -0
  22. kuavo_humanoid_sdk/kuavo/dexterous_hand.py +201 -0
  23. kuavo_humanoid_sdk/kuavo/leju_claw.py +235 -0
  24. kuavo_humanoid_sdk/kuavo/robot.py +465 -0
  25. kuavo_humanoid_sdk/kuavo/robot_arm.py +210 -0
  26. kuavo_humanoid_sdk/kuavo/robot_audio.py +39 -0
  27. kuavo_humanoid_sdk/kuavo/robot_head.py +50 -0
  28. kuavo_humanoid_sdk/kuavo/robot_info.py +113 -0
  29. kuavo_humanoid_sdk/kuavo/robot_observation.py +64 -0
  30. kuavo_humanoid_sdk/kuavo/robot_state.py +299 -0
  31. kuavo_humanoid_sdk/kuavo/robot_tool.py +82 -0
  32. kuavo_humanoid_sdk/kuavo/robot_vision.py +83 -0
  33. kuavo_humanoid_sdk/kuavo_strategy/__init__.py +2 -0
  34. kuavo_humanoid_sdk/kuavo_strategy/grasp_box/grasp_box_strategy.py +1126 -0
  35. kuavo_humanoid_sdk/kuavo_strategy/kuavo_strategy.py +104 -0
  36. kuavo_humanoid_sdk/msg/__init__.py +4 -0
  37. kuavo_humanoid_sdk/msg/kuavo_msgs/__init__.py +7 -0
  38. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_AprilTagDetection.py +306 -0
  39. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_AprilTagDetectionArray.py +437 -0
  40. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_JoySticks.py +191 -0
  41. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_Metadata.py +199 -0
  42. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_RobotActionState.py +112 -0
  43. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_TFArray.py +323 -0
  44. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/__init__.py +48 -0
  45. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armHandPose.py +160 -0
  46. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armHandPoseFree.py +171 -0
  47. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armPoseWithTimeStamp.py +168 -0
  48. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armTargetPoses.py +151 -0
  49. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_bezierCurveCubicPoint.py +178 -0
  50. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandCommand.py +229 -0
  51. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandTouchState.py +256 -0
  52. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_endEffectorData.py +227 -0
  53. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose.py +123 -0
  54. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseTargetTrajectories.py +301 -0
  55. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoses.py +149 -0
  56. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_fullBodyTargetTrajectories.py +258 -0
  57. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gaitTimeName.py +147 -0
  58. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureInfo.py +218 -0
  59. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureTask.py +149 -0
  60. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_handPose.py +136 -0
  61. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_headBodyPose.py +145 -0
  62. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_ikSolveError.py +171 -0
  63. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_ikSolveParam.py +140 -0
  64. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_imuData.py +165 -0
  65. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointBezierTrajectory.py +201 -0
  66. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointCmd.py +390 -0
  67. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointData.py +205 -0
  68. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawCommand.py +320 -0
  69. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawState.py +341 -0
  70. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_motorParam.py +122 -0
  71. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_planArmState.py +120 -0
  72. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_questJoySticks.py +191 -0
  73. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_qv.py +121 -0
  74. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotArmQVVD.py +177 -0
  75. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHandPosition.py +225 -0
  76. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHeadMotionData.py +128 -0
  77. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotState.py +222 -0
  78. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_sensorsData.py +495 -0
  79. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_switchGaitByName.py +200 -0
  80. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_touchSensorStatus.py +162 -0
  81. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPose.py +272 -0
  82. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseCmd.py +315 -0
  83. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseCmdFree.py +338 -0
  84. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseFree.py +299 -0
  85. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloDetection.py +251 -0
  86. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloOutputData.py +168 -0
  87. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_ExecuteArmAction.py +281 -0
  88. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_RepublishTFs.py +373 -0
  89. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetJoyTopic.py +282 -0
  90. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SpeechSynthesis.py +270 -0
  91. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/__init__.py +29 -0
  92. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeArmCtrlMode.py +275 -0
  93. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeArmCtrlModeKuavo.py +236 -0
  94. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeMotorParam.py +299 -0
  95. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeTorsoCtrlMode.py +274 -0
  96. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_controlLejuClaw.py +408 -0
  97. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_enableHandTouchSensor.py +304 -0
  98. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_fkSrv.py +394 -0
  99. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_footPoseTargetTrajectoriesSrv.py +409 -0
  100. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecute.py +339 -0
  101. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecuteState.py +257 -0
  102. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureList.py +418 -0
  103. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getCurrentGaitName.py +253 -0
  104. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getMotorParam.py +299 -0
  105. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_handForceLevel.py +330 -0
  106. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_jointMoveTo.py +302 -0
  107. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_planArmTrajectoryBezierCurve.py +421 -0
  108. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_planArmTrajectoryCubicSpline.py +490 -0
  109. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_playmusic.py +268 -0
  110. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setHwIntialState.py +304 -0
  111. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setMmCtrlFrame.py +273 -0
  112. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setMotorEncoderRoundService.py +283 -0
  113. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setTagId.py +275 -0
  114. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_singleStepControl.py +444 -0
  115. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_twoArmHandPoseCmdFreeSrv.py +716 -0
  116. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_twoArmHandPoseCmdSrv.py +662 -0
  117. kuavo_humanoid_sdk/msg/motion_capture_ik/__init__.py +7 -0
  118. kuavo_humanoid_sdk/msg/ocs2_msgs/__init__.py +7 -0
  119. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/__init__.py +12 -0
  120. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_constraint.py +142 -0
  121. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_controller_data.py +121 -0
  122. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_lagrangian_metrics.py +148 -0
  123. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mode_schedule.py +150 -0
  124. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_flattened_controller.py +666 -0
  125. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_input.py +122 -0
  126. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_observation.py +209 -0
  127. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_performance_indices.py +140 -0
  128. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_solver_data.py +886 -0
  129. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_state.py +122 -0
  130. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_target_trajectories.py +239 -0
  131. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_multiplier.py +148 -0
  132. kuavo_humanoid_sdk/msg/ocs2_msgs/srv/__init__.py +1 -0
  133. kuavo_humanoid_sdk/msg/ocs2_msgs/srv/_reset.py +376 -0
  134. kuavo_humanoid_sdk-1.2.2.dist-info/METADATA +291 -0
  135. kuavo_humanoid_sdk-1.2.2.dist-info/RECORD +137 -0
  136. kuavo_humanoid_sdk-1.2.2.dist-info/WHEEL +6 -0
  137. kuavo_humanoid_sdk-1.2.2.dist-info/top_level.txt +1 -0
@@ -0,0 +1,315 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/twoArmHandPoseCmd.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 kuavo_msgs.msg
10
+ import std_msgs.msg
11
+
12
+ class twoArmHandPoseCmd(genpy.Message):
13
+ _md5sum = "cd5f0a3dc4154eb55aff1c874e2dc81e"
14
+ _type = "kuavo_msgs/twoArmHandPoseCmd"
15
+ _has_header = False # flag to mark the presence of a Header object
16
+ _full_text = """twoArmHandPose hand_poses
17
+ # params for the IK solver
18
+ bool use_custom_ik_param
19
+ bool joint_angles_as_q0
20
+ ikSolveParam ik_param
21
+ int32 frame # 0 keep current frame 1 world frame (based on odom) 2 local frame 3 manipulation world frame
22
+ ================================================================================
23
+ MSG: kuavo_msgs/twoArmHandPose
24
+ Header header
25
+ armHandPose left_pose
26
+ armHandPose right_pose
27
+ ================================================================================
28
+ MSG: std_msgs/Header
29
+ # Standard metadata for higher-level stamped data types.
30
+ # This is generally used to communicate timestamped data
31
+ # in a particular coordinate frame.
32
+ #
33
+ # sequence ID: consecutively increasing ID
34
+ uint32 seq
35
+ #Two-integer timestamp that is expressed as:
36
+ # * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')
37
+ # * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')
38
+ # time-handling sugar is provided by the client library
39
+ time stamp
40
+ #Frame this data is associated with
41
+ string frame_id
42
+
43
+ ================================================================================
44
+ MSG: kuavo_msgs/armHandPose
45
+ float64[3] pos_xyz
46
+ float64[4] quat_xyzw
47
+
48
+ float64[3] elbow_pos_xyz
49
+
50
+ float64[7] joint_angles
51
+ ================================================================================
52
+ MSG: kuavo_msgs/ikSolveParam
53
+ # snopt params
54
+ float64 major_optimality_tol
55
+ float64 major_feasibility_tol
56
+ float64 minor_feasibility_tol
57
+ float64 major_iterations_limit
58
+ # constraint and cost params
59
+ float64 oritation_constraint_tol
60
+ float64 pos_constraint_tol # work when pos_cost_weight > 0.0
61
+ float64 pos_cost_weight"""
62
+ __slots__ = ['hand_poses','use_custom_ik_param','joint_angles_as_q0','ik_param','frame']
63
+ _slot_types = ['kuavo_msgs/twoArmHandPose','bool','bool','kuavo_msgs/ikSolveParam','int32']
64
+
65
+ def __init__(self, *args, **kwds):
66
+ """
67
+ Constructor. Any message fields that are implicitly/explicitly
68
+ set to None will be assigned a default value. The recommend
69
+ use is keyword arguments as this is more robust to future message
70
+ changes. You cannot mix in-order arguments and keyword arguments.
71
+
72
+ The available fields are:
73
+ hand_poses,use_custom_ik_param,joint_angles_as_q0,ik_param,frame
74
+
75
+ :param args: complete set of field values, in .msg order
76
+ :param kwds: use keyword arguments corresponding to message field names
77
+ to set specific fields.
78
+ """
79
+ if args or kwds:
80
+ super(twoArmHandPoseCmd, self).__init__(*args, **kwds)
81
+ # message fields cannot be None, assign default values for those that are
82
+ if self.hand_poses is None:
83
+ self.hand_poses = kuavo_msgs.msg.twoArmHandPose()
84
+ if self.use_custom_ik_param is None:
85
+ self.use_custom_ik_param = False
86
+ if self.joint_angles_as_q0 is None:
87
+ self.joint_angles_as_q0 = False
88
+ if self.ik_param is None:
89
+ self.ik_param = kuavo_msgs.msg.ikSolveParam()
90
+ if self.frame is None:
91
+ self.frame = 0
92
+ else:
93
+ self.hand_poses = kuavo_msgs.msg.twoArmHandPose()
94
+ self.use_custom_ik_param = False
95
+ self.joint_angles_as_q0 = False
96
+ self.ik_param = kuavo_msgs.msg.ikSolveParam()
97
+ self.frame = 0
98
+
99
+ def _get_types(self):
100
+ """
101
+ internal API method
102
+ """
103
+ return self._slot_types
104
+
105
+ def serialize(self, buff):
106
+ """
107
+ serialize message into buffer
108
+ :param buff: buffer, ``StringIO``
109
+ """
110
+ try:
111
+ _x = self
112
+ buff.write(_get_struct_3I().pack(_x.hand_poses.header.seq, _x.hand_poses.header.stamp.secs, _x.hand_poses.header.stamp.nsecs))
113
+ _x = self.hand_poses.header.frame_id
114
+ length = len(_x)
115
+ if python3 or type(_x) == unicode:
116
+ _x = _x.encode('utf-8')
117
+ length = len(_x)
118
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
119
+ buff.write(_get_struct_3d().pack(*self.hand_poses.left_pose.pos_xyz))
120
+ buff.write(_get_struct_4d().pack(*self.hand_poses.left_pose.quat_xyzw))
121
+ buff.write(_get_struct_3d().pack(*self.hand_poses.left_pose.elbow_pos_xyz))
122
+ buff.write(_get_struct_7d().pack(*self.hand_poses.left_pose.joint_angles))
123
+ buff.write(_get_struct_3d().pack(*self.hand_poses.right_pose.pos_xyz))
124
+ buff.write(_get_struct_4d().pack(*self.hand_poses.right_pose.quat_xyzw))
125
+ buff.write(_get_struct_3d().pack(*self.hand_poses.right_pose.elbow_pos_xyz))
126
+ buff.write(_get_struct_7d().pack(*self.hand_poses.right_pose.joint_angles))
127
+ _x = self
128
+ buff.write(_get_struct_2B7di().pack(_x.use_custom_ik_param, _x.joint_angles_as_q0, _x.ik_param.major_optimality_tol, _x.ik_param.major_feasibility_tol, _x.ik_param.minor_feasibility_tol, _x.ik_param.major_iterations_limit, _x.ik_param.oritation_constraint_tol, _x.ik_param.pos_constraint_tol, _x.ik_param.pos_cost_weight, _x.frame))
129
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
130
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
131
+
132
+ def deserialize(self, str):
133
+ """
134
+ unpack serialized message in str into this message instance
135
+ :param str: byte array of serialized message, ``str``
136
+ """
137
+ if python3:
138
+ codecs.lookup_error("rosmsg").msg_type = self._type
139
+ try:
140
+ if self.hand_poses is None:
141
+ self.hand_poses = kuavo_msgs.msg.twoArmHandPose()
142
+ if self.ik_param is None:
143
+ self.ik_param = kuavo_msgs.msg.ikSolveParam()
144
+ end = 0
145
+ _x = self
146
+ start = end
147
+ end += 12
148
+ (_x.hand_poses.header.seq, _x.hand_poses.header.stamp.secs, _x.hand_poses.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
149
+ start = end
150
+ end += 4
151
+ (length,) = _struct_I.unpack(str[start:end])
152
+ start = end
153
+ end += length
154
+ if python3:
155
+ self.hand_poses.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
156
+ else:
157
+ self.hand_poses.header.frame_id = str[start:end]
158
+ start = end
159
+ end += 24
160
+ self.hand_poses.left_pose.pos_xyz = _get_struct_3d().unpack(str[start:end])
161
+ start = end
162
+ end += 32
163
+ self.hand_poses.left_pose.quat_xyzw = _get_struct_4d().unpack(str[start:end])
164
+ start = end
165
+ end += 24
166
+ self.hand_poses.left_pose.elbow_pos_xyz = _get_struct_3d().unpack(str[start:end])
167
+ start = end
168
+ end += 56
169
+ self.hand_poses.left_pose.joint_angles = _get_struct_7d().unpack(str[start:end])
170
+ start = end
171
+ end += 24
172
+ self.hand_poses.right_pose.pos_xyz = _get_struct_3d().unpack(str[start:end])
173
+ start = end
174
+ end += 32
175
+ self.hand_poses.right_pose.quat_xyzw = _get_struct_4d().unpack(str[start:end])
176
+ start = end
177
+ end += 24
178
+ self.hand_poses.right_pose.elbow_pos_xyz = _get_struct_3d().unpack(str[start:end])
179
+ start = end
180
+ end += 56
181
+ self.hand_poses.right_pose.joint_angles = _get_struct_7d().unpack(str[start:end])
182
+ _x = self
183
+ start = end
184
+ end += 62
185
+ (_x.use_custom_ik_param, _x.joint_angles_as_q0, _x.ik_param.major_optimality_tol, _x.ik_param.major_feasibility_tol, _x.ik_param.minor_feasibility_tol, _x.ik_param.major_iterations_limit, _x.ik_param.oritation_constraint_tol, _x.ik_param.pos_constraint_tol, _x.ik_param.pos_cost_weight, _x.frame,) = _get_struct_2B7di().unpack(str[start:end])
186
+ self.use_custom_ik_param = bool(self.use_custom_ik_param)
187
+ self.joint_angles_as_q0 = bool(self.joint_angles_as_q0)
188
+ return self
189
+ except struct.error as e:
190
+ raise genpy.DeserializationError(e) # most likely buffer underfill
191
+
192
+
193
+ def serialize_numpy(self, buff, numpy):
194
+ """
195
+ serialize message with numpy array types into buffer
196
+ :param buff: buffer, ``StringIO``
197
+ :param numpy: numpy python module
198
+ """
199
+ try:
200
+ _x = self
201
+ buff.write(_get_struct_3I().pack(_x.hand_poses.header.seq, _x.hand_poses.header.stamp.secs, _x.hand_poses.header.stamp.nsecs))
202
+ _x = self.hand_poses.header.frame_id
203
+ length = len(_x)
204
+ if python3 or type(_x) == unicode:
205
+ _x = _x.encode('utf-8')
206
+ length = len(_x)
207
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
208
+ buff.write(self.hand_poses.left_pose.pos_xyz.tostring())
209
+ buff.write(self.hand_poses.left_pose.quat_xyzw.tostring())
210
+ buff.write(self.hand_poses.left_pose.elbow_pos_xyz.tostring())
211
+ buff.write(self.hand_poses.left_pose.joint_angles.tostring())
212
+ buff.write(self.hand_poses.right_pose.pos_xyz.tostring())
213
+ buff.write(self.hand_poses.right_pose.quat_xyzw.tostring())
214
+ buff.write(self.hand_poses.right_pose.elbow_pos_xyz.tostring())
215
+ buff.write(self.hand_poses.right_pose.joint_angles.tostring())
216
+ _x = self
217
+ buff.write(_get_struct_2B7di().pack(_x.use_custom_ik_param, _x.joint_angles_as_q0, _x.ik_param.major_optimality_tol, _x.ik_param.major_feasibility_tol, _x.ik_param.minor_feasibility_tol, _x.ik_param.major_iterations_limit, _x.ik_param.oritation_constraint_tol, _x.ik_param.pos_constraint_tol, _x.ik_param.pos_cost_weight, _x.frame))
218
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
219
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
220
+
221
+ def deserialize_numpy(self, str, numpy):
222
+ """
223
+ unpack serialized message in str into this message instance using numpy for array types
224
+ :param str: byte array of serialized message, ``str``
225
+ :param numpy: numpy python module
226
+ """
227
+ if python3:
228
+ codecs.lookup_error("rosmsg").msg_type = self._type
229
+ try:
230
+ if self.hand_poses is None:
231
+ self.hand_poses = kuavo_msgs.msg.twoArmHandPose()
232
+ if self.ik_param is None:
233
+ self.ik_param = kuavo_msgs.msg.ikSolveParam()
234
+ end = 0
235
+ _x = self
236
+ start = end
237
+ end += 12
238
+ (_x.hand_poses.header.seq, _x.hand_poses.header.stamp.secs, _x.hand_poses.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
239
+ start = end
240
+ end += 4
241
+ (length,) = _struct_I.unpack(str[start:end])
242
+ start = end
243
+ end += length
244
+ if python3:
245
+ self.hand_poses.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
246
+ else:
247
+ self.hand_poses.header.frame_id = str[start:end]
248
+ start = end
249
+ end += 24
250
+ self.hand_poses.left_pose.pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
251
+ start = end
252
+ end += 32
253
+ self.hand_poses.left_pose.quat_xyzw = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=4)
254
+ start = end
255
+ end += 24
256
+ self.hand_poses.left_pose.elbow_pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
257
+ start = end
258
+ end += 56
259
+ self.hand_poses.left_pose.joint_angles = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=7)
260
+ start = end
261
+ end += 24
262
+ self.hand_poses.right_pose.pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
263
+ start = end
264
+ end += 32
265
+ self.hand_poses.right_pose.quat_xyzw = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=4)
266
+ start = end
267
+ end += 24
268
+ self.hand_poses.right_pose.elbow_pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
269
+ start = end
270
+ end += 56
271
+ self.hand_poses.right_pose.joint_angles = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=7)
272
+ _x = self
273
+ start = end
274
+ end += 62
275
+ (_x.use_custom_ik_param, _x.joint_angles_as_q0, _x.ik_param.major_optimality_tol, _x.ik_param.major_feasibility_tol, _x.ik_param.minor_feasibility_tol, _x.ik_param.major_iterations_limit, _x.ik_param.oritation_constraint_tol, _x.ik_param.pos_constraint_tol, _x.ik_param.pos_cost_weight, _x.frame,) = _get_struct_2B7di().unpack(str[start:end])
276
+ self.use_custom_ik_param = bool(self.use_custom_ik_param)
277
+ self.joint_angles_as_q0 = bool(self.joint_angles_as_q0)
278
+ return self
279
+ except struct.error as e:
280
+ raise genpy.DeserializationError(e) # most likely buffer underfill
281
+
282
+ _struct_I = genpy.struct_I
283
+ def _get_struct_I():
284
+ global _struct_I
285
+ return _struct_I
286
+ _struct_2B7di = None
287
+ def _get_struct_2B7di():
288
+ global _struct_2B7di
289
+ if _struct_2B7di is None:
290
+ _struct_2B7di = struct.Struct("<2B7di")
291
+ return _struct_2B7di
292
+ _struct_3I = None
293
+ def _get_struct_3I():
294
+ global _struct_3I
295
+ if _struct_3I is None:
296
+ _struct_3I = struct.Struct("<3I")
297
+ return _struct_3I
298
+ _struct_3d = None
299
+ def _get_struct_3d():
300
+ global _struct_3d
301
+ if _struct_3d is None:
302
+ _struct_3d = struct.Struct("<3d")
303
+ return _struct_3d
304
+ _struct_4d = None
305
+ def _get_struct_4d():
306
+ global _struct_4d
307
+ if _struct_4d is None:
308
+ _struct_4d = struct.Struct("<4d")
309
+ return _struct_4d
310
+ _struct_7d = None
311
+ def _get_struct_7d():
312
+ global _struct_7d
313
+ if _struct_7d is None:
314
+ _struct_7d = struct.Struct("<7d")
315
+ return _struct_7d
@@ -0,0 +1,338 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/twoArmHandPoseCmdFree.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 kuavo_msgs.msg
10
+ import std_msgs.msg
11
+
12
+ class twoArmHandPoseCmdFree(genpy.Message):
13
+ _md5sum = "1e8530cd23f68060b2c08649baf4bbe8"
14
+ _type = "kuavo_msgs/twoArmHandPoseCmdFree"
15
+ _has_header = False # flag to mark the presence of a Header object
16
+ _full_text = """twoArmHandPoseFree hand_poses
17
+ # params for the IK solver
18
+ bool use_custom_ik_param
19
+ bool joint_angles_as_q0
20
+ ikSolveParam ik_param
21
+ ================================================================================
22
+ MSG: kuavo_msgs/twoArmHandPoseFree
23
+ Header header
24
+ armHandPoseFree left_pose
25
+ armHandPoseFree right_pose
26
+ ================================================================================
27
+ MSG: std_msgs/Header
28
+ # Standard metadata for higher-level stamped data types.
29
+ # This is generally used to communicate timestamped data
30
+ # in a particular coordinate frame.
31
+ #
32
+ # sequence ID: consecutively increasing ID
33
+ uint32 seq
34
+ #Two-integer timestamp that is expressed as:
35
+ # * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')
36
+ # * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')
37
+ # time-handling sugar is provided by the client library
38
+ time stamp
39
+ #Frame this data is associated with
40
+ string frame_id
41
+
42
+ ================================================================================
43
+ MSG: kuavo_msgs/armHandPoseFree
44
+ float64[3] pos_xyz
45
+ float64[4] quat_xyzw
46
+
47
+ float64[3] elbow_pos_xyz
48
+
49
+ float64[] joint_angles
50
+
51
+ ================================================================================
52
+ MSG: kuavo_msgs/ikSolveParam
53
+ # snopt params
54
+ float64 major_optimality_tol
55
+ float64 major_feasibility_tol
56
+ float64 minor_feasibility_tol
57
+ float64 major_iterations_limit
58
+ # constraint and cost params
59
+ float64 oritation_constraint_tol
60
+ float64 pos_constraint_tol # work when pos_cost_weight > 0.0
61
+ float64 pos_cost_weight"""
62
+ __slots__ = ['hand_poses','use_custom_ik_param','joint_angles_as_q0','ik_param']
63
+ _slot_types = ['kuavo_msgs/twoArmHandPoseFree','bool','bool','kuavo_msgs/ikSolveParam']
64
+
65
+ def __init__(self, *args, **kwds):
66
+ """
67
+ Constructor. Any message fields that are implicitly/explicitly
68
+ set to None will be assigned a default value. The recommend
69
+ use is keyword arguments as this is more robust to future message
70
+ changes. You cannot mix in-order arguments and keyword arguments.
71
+
72
+ The available fields are:
73
+ hand_poses,use_custom_ik_param,joint_angles_as_q0,ik_param
74
+
75
+ :param args: complete set of field values, in .msg order
76
+ :param kwds: use keyword arguments corresponding to message field names
77
+ to set specific fields.
78
+ """
79
+ if args or kwds:
80
+ super(twoArmHandPoseCmdFree, self).__init__(*args, **kwds)
81
+ # message fields cannot be None, assign default values for those that are
82
+ if self.hand_poses is None:
83
+ self.hand_poses = kuavo_msgs.msg.twoArmHandPoseFree()
84
+ if self.use_custom_ik_param is None:
85
+ self.use_custom_ik_param = False
86
+ if self.joint_angles_as_q0 is None:
87
+ self.joint_angles_as_q0 = False
88
+ if self.ik_param is None:
89
+ self.ik_param = kuavo_msgs.msg.ikSolveParam()
90
+ else:
91
+ self.hand_poses = kuavo_msgs.msg.twoArmHandPoseFree()
92
+ self.use_custom_ik_param = False
93
+ self.joint_angles_as_q0 = False
94
+ self.ik_param = kuavo_msgs.msg.ikSolveParam()
95
+
96
+ def _get_types(self):
97
+ """
98
+ internal API method
99
+ """
100
+ return self._slot_types
101
+
102
+ def serialize(self, buff):
103
+ """
104
+ serialize message into buffer
105
+ :param buff: buffer, ``StringIO``
106
+ """
107
+ try:
108
+ _x = self
109
+ buff.write(_get_struct_3I().pack(_x.hand_poses.header.seq, _x.hand_poses.header.stamp.secs, _x.hand_poses.header.stamp.nsecs))
110
+ _x = self.hand_poses.header.frame_id
111
+ length = len(_x)
112
+ if python3 or type(_x) == unicode:
113
+ _x = _x.encode('utf-8')
114
+ length = len(_x)
115
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
116
+ buff.write(_get_struct_3d().pack(*self.hand_poses.left_pose.pos_xyz))
117
+ buff.write(_get_struct_4d().pack(*self.hand_poses.left_pose.quat_xyzw))
118
+ buff.write(_get_struct_3d().pack(*self.hand_poses.left_pose.elbow_pos_xyz))
119
+ length = len(self.hand_poses.left_pose.joint_angles)
120
+ buff.write(_struct_I.pack(length))
121
+ pattern = '<%sd'%length
122
+ buff.write(struct.Struct(pattern).pack(*self.hand_poses.left_pose.joint_angles))
123
+ buff.write(_get_struct_3d().pack(*self.hand_poses.right_pose.pos_xyz))
124
+ buff.write(_get_struct_4d().pack(*self.hand_poses.right_pose.quat_xyzw))
125
+ buff.write(_get_struct_3d().pack(*self.hand_poses.right_pose.elbow_pos_xyz))
126
+ length = len(self.hand_poses.right_pose.joint_angles)
127
+ buff.write(_struct_I.pack(length))
128
+ pattern = '<%sd'%length
129
+ buff.write(struct.Struct(pattern).pack(*self.hand_poses.right_pose.joint_angles))
130
+ _x = self
131
+ buff.write(_get_struct_2B7d().pack(_x.use_custom_ik_param, _x.joint_angles_as_q0, _x.ik_param.major_optimality_tol, _x.ik_param.major_feasibility_tol, _x.ik_param.minor_feasibility_tol, _x.ik_param.major_iterations_limit, _x.ik_param.oritation_constraint_tol, _x.ik_param.pos_constraint_tol, _x.ik_param.pos_cost_weight))
132
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
133
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
134
+
135
+ def deserialize(self, str):
136
+ """
137
+ unpack serialized message in str into this message instance
138
+ :param str: byte array of serialized message, ``str``
139
+ """
140
+ if python3:
141
+ codecs.lookup_error("rosmsg").msg_type = self._type
142
+ try:
143
+ if self.hand_poses is None:
144
+ self.hand_poses = kuavo_msgs.msg.twoArmHandPoseFree()
145
+ if self.ik_param is None:
146
+ self.ik_param = kuavo_msgs.msg.ikSolveParam()
147
+ end = 0
148
+ _x = self
149
+ start = end
150
+ end += 12
151
+ (_x.hand_poses.header.seq, _x.hand_poses.header.stamp.secs, _x.hand_poses.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
152
+ start = end
153
+ end += 4
154
+ (length,) = _struct_I.unpack(str[start:end])
155
+ start = end
156
+ end += length
157
+ if python3:
158
+ self.hand_poses.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
159
+ else:
160
+ self.hand_poses.header.frame_id = str[start:end]
161
+ start = end
162
+ end += 24
163
+ self.hand_poses.left_pose.pos_xyz = _get_struct_3d().unpack(str[start:end])
164
+ start = end
165
+ end += 32
166
+ self.hand_poses.left_pose.quat_xyzw = _get_struct_4d().unpack(str[start:end])
167
+ start = end
168
+ end += 24
169
+ self.hand_poses.left_pose.elbow_pos_xyz = _get_struct_3d().unpack(str[start:end])
170
+ start = end
171
+ end += 4
172
+ (length,) = _struct_I.unpack(str[start:end])
173
+ pattern = '<%sd'%length
174
+ start = end
175
+ s = struct.Struct(pattern)
176
+ end += s.size
177
+ self.hand_poses.left_pose.joint_angles = s.unpack(str[start:end])
178
+ start = end
179
+ end += 24
180
+ self.hand_poses.right_pose.pos_xyz = _get_struct_3d().unpack(str[start:end])
181
+ start = end
182
+ end += 32
183
+ self.hand_poses.right_pose.quat_xyzw = _get_struct_4d().unpack(str[start:end])
184
+ start = end
185
+ end += 24
186
+ self.hand_poses.right_pose.elbow_pos_xyz = _get_struct_3d().unpack(str[start:end])
187
+ start = end
188
+ end += 4
189
+ (length,) = _struct_I.unpack(str[start:end])
190
+ pattern = '<%sd'%length
191
+ start = end
192
+ s = struct.Struct(pattern)
193
+ end += s.size
194
+ self.hand_poses.right_pose.joint_angles = s.unpack(str[start:end])
195
+ _x = self
196
+ start = end
197
+ end += 58
198
+ (_x.use_custom_ik_param, _x.joint_angles_as_q0, _x.ik_param.major_optimality_tol, _x.ik_param.major_feasibility_tol, _x.ik_param.minor_feasibility_tol, _x.ik_param.major_iterations_limit, _x.ik_param.oritation_constraint_tol, _x.ik_param.pos_constraint_tol, _x.ik_param.pos_cost_weight,) = _get_struct_2B7d().unpack(str[start:end])
199
+ self.use_custom_ik_param = bool(self.use_custom_ik_param)
200
+ self.joint_angles_as_q0 = bool(self.joint_angles_as_q0)
201
+ return self
202
+ except struct.error as e:
203
+ raise genpy.DeserializationError(e) # most likely buffer underfill
204
+
205
+
206
+ def serialize_numpy(self, buff, numpy):
207
+ """
208
+ serialize message with numpy array types into buffer
209
+ :param buff: buffer, ``StringIO``
210
+ :param numpy: numpy python module
211
+ """
212
+ try:
213
+ _x = self
214
+ buff.write(_get_struct_3I().pack(_x.hand_poses.header.seq, _x.hand_poses.header.stamp.secs, _x.hand_poses.header.stamp.nsecs))
215
+ _x = self.hand_poses.header.frame_id
216
+ length = len(_x)
217
+ if python3 or type(_x) == unicode:
218
+ _x = _x.encode('utf-8')
219
+ length = len(_x)
220
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
221
+ buff.write(self.hand_poses.left_pose.pos_xyz.tostring())
222
+ buff.write(self.hand_poses.left_pose.quat_xyzw.tostring())
223
+ buff.write(self.hand_poses.left_pose.elbow_pos_xyz.tostring())
224
+ length = len(self.hand_poses.left_pose.joint_angles)
225
+ buff.write(_struct_I.pack(length))
226
+ pattern = '<%sd'%length
227
+ buff.write(self.hand_poses.left_pose.joint_angles.tostring())
228
+ buff.write(self.hand_poses.right_pose.pos_xyz.tostring())
229
+ buff.write(self.hand_poses.right_pose.quat_xyzw.tostring())
230
+ buff.write(self.hand_poses.right_pose.elbow_pos_xyz.tostring())
231
+ length = len(self.hand_poses.right_pose.joint_angles)
232
+ buff.write(_struct_I.pack(length))
233
+ pattern = '<%sd'%length
234
+ buff.write(self.hand_poses.right_pose.joint_angles.tostring())
235
+ _x = self
236
+ buff.write(_get_struct_2B7d().pack(_x.use_custom_ik_param, _x.joint_angles_as_q0, _x.ik_param.major_optimality_tol, _x.ik_param.major_feasibility_tol, _x.ik_param.minor_feasibility_tol, _x.ik_param.major_iterations_limit, _x.ik_param.oritation_constraint_tol, _x.ik_param.pos_constraint_tol, _x.ik_param.pos_cost_weight))
237
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
238
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
239
+
240
+ def deserialize_numpy(self, str, numpy):
241
+ """
242
+ unpack serialized message in str into this message instance using numpy for array types
243
+ :param str: byte array of serialized message, ``str``
244
+ :param numpy: numpy python module
245
+ """
246
+ if python3:
247
+ codecs.lookup_error("rosmsg").msg_type = self._type
248
+ try:
249
+ if self.hand_poses is None:
250
+ self.hand_poses = kuavo_msgs.msg.twoArmHandPoseFree()
251
+ if self.ik_param is None:
252
+ self.ik_param = kuavo_msgs.msg.ikSolveParam()
253
+ end = 0
254
+ _x = self
255
+ start = end
256
+ end += 12
257
+ (_x.hand_poses.header.seq, _x.hand_poses.header.stamp.secs, _x.hand_poses.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
258
+ start = end
259
+ end += 4
260
+ (length,) = _struct_I.unpack(str[start:end])
261
+ start = end
262
+ end += length
263
+ if python3:
264
+ self.hand_poses.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
265
+ else:
266
+ self.hand_poses.header.frame_id = str[start:end]
267
+ start = end
268
+ end += 24
269
+ self.hand_poses.left_pose.pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
270
+ start = end
271
+ end += 32
272
+ self.hand_poses.left_pose.quat_xyzw = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=4)
273
+ start = end
274
+ end += 24
275
+ self.hand_poses.left_pose.elbow_pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
276
+ start = end
277
+ end += 4
278
+ (length,) = _struct_I.unpack(str[start:end])
279
+ pattern = '<%sd'%length
280
+ start = end
281
+ s = struct.Struct(pattern)
282
+ end += s.size
283
+ self.hand_poses.left_pose.joint_angles = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
284
+ start = end
285
+ end += 24
286
+ self.hand_poses.right_pose.pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
287
+ start = end
288
+ end += 32
289
+ self.hand_poses.right_pose.quat_xyzw = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=4)
290
+ start = end
291
+ end += 24
292
+ self.hand_poses.right_pose.elbow_pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
293
+ start = end
294
+ end += 4
295
+ (length,) = _struct_I.unpack(str[start:end])
296
+ pattern = '<%sd'%length
297
+ start = end
298
+ s = struct.Struct(pattern)
299
+ end += s.size
300
+ self.hand_poses.right_pose.joint_angles = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
301
+ _x = self
302
+ start = end
303
+ end += 58
304
+ (_x.use_custom_ik_param, _x.joint_angles_as_q0, _x.ik_param.major_optimality_tol, _x.ik_param.major_feasibility_tol, _x.ik_param.minor_feasibility_tol, _x.ik_param.major_iterations_limit, _x.ik_param.oritation_constraint_tol, _x.ik_param.pos_constraint_tol, _x.ik_param.pos_cost_weight,) = _get_struct_2B7d().unpack(str[start:end])
305
+ self.use_custom_ik_param = bool(self.use_custom_ik_param)
306
+ self.joint_angles_as_q0 = bool(self.joint_angles_as_q0)
307
+ return self
308
+ except struct.error as e:
309
+ raise genpy.DeserializationError(e) # most likely buffer underfill
310
+
311
+ _struct_I = genpy.struct_I
312
+ def _get_struct_I():
313
+ global _struct_I
314
+ return _struct_I
315
+ _struct_2B7d = None
316
+ def _get_struct_2B7d():
317
+ global _struct_2B7d
318
+ if _struct_2B7d is None:
319
+ _struct_2B7d = struct.Struct("<2B7d")
320
+ return _struct_2B7d
321
+ _struct_3I = None
322
+ def _get_struct_3I():
323
+ global _struct_3I
324
+ if _struct_3I is None:
325
+ _struct_3I = struct.Struct("<3I")
326
+ return _struct_3I
327
+ _struct_3d = None
328
+ def _get_struct_3d():
329
+ global _struct_3d
330
+ if _struct_3d is None:
331
+ _struct_3d = struct.Struct("<3d")
332
+ return _struct_3d
333
+ _struct_4d = None
334
+ def _get_struct_4d():
335
+ global _struct_4d
336
+ if _struct_4d is None:
337
+ _struct_4d = struct.Struct("<4d")
338
+ return _struct_4d