kuavo-humanoid-sdk 1.1.6b1155__20250613144501-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 (132) 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/_Metadata.py +199 -0
  41. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_RobotActionState.py +112 -0
  42. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_TFArray.py +323 -0
  43. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/__init__.py +44 -0
  44. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armHandPose.py +160 -0
  45. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armPoseWithTimeStamp.py +168 -0
  46. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armTargetPoses.py +151 -0
  47. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_bezierCurveCubicPoint.py +178 -0
  48. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandCommand.py +229 -0
  49. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandTouchState.py +256 -0
  50. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_endEffectorData.py +227 -0
  51. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose.py +123 -0
  52. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseTargetTrajectories.py +301 -0
  53. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoses.py +149 -0
  54. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_fullBodyTargetTrajectories.py +258 -0
  55. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gaitTimeName.py +147 -0
  56. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureInfo.py +218 -0
  57. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureTask.py +149 -0
  58. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_handPose.py +136 -0
  59. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_headBodyPose.py +145 -0
  60. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_ikSolveError.py +171 -0
  61. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_ikSolveParam.py +140 -0
  62. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_imuData.py +165 -0
  63. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointBezierTrajectory.py +201 -0
  64. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointCmd.py +390 -0
  65. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointData.py +205 -0
  66. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawCommand.py +320 -0
  67. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawState.py +341 -0
  68. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_motorParam.py +122 -0
  69. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_planArmState.py +120 -0
  70. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_questJoySticks.py +191 -0
  71. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_qv.py +121 -0
  72. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotArmQVVD.py +177 -0
  73. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHandPosition.py +225 -0
  74. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHeadMotionData.py +128 -0
  75. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotState.py +222 -0
  76. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_sensorsData.py +495 -0
  77. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_switchGaitByName.py +200 -0
  78. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_touchSensorStatus.py +162 -0
  79. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPose.py +272 -0
  80. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseCmd.py +315 -0
  81. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloDetection.py +251 -0
  82. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloOutputData.py +168 -0
  83. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_ExecuteArmAction.py +281 -0
  84. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_RepublishTFs.py +373 -0
  85. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetJoyTopic.py +282 -0
  86. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SpeechSynthesis.py +270 -0
  87. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/__init__.py +28 -0
  88. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeArmCtrlMode.py +275 -0
  89. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeArmCtrlModeKuavo.py +236 -0
  90. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeMotorParam.py +299 -0
  91. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeTorsoCtrlMode.py +274 -0
  92. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_controlLejuClaw.py +408 -0
  93. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_enableHandTouchSensor.py +304 -0
  94. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_fkSrv.py +394 -0
  95. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_footPoseTargetTrajectoriesSrv.py +409 -0
  96. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecute.py +339 -0
  97. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecuteState.py +257 -0
  98. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureList.py +418 -0
  99. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getCurrentGaitName.py +253 -0
  100. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getMotorParam.py +299 -0
  101. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_handForceLevel.py +330 -0
  102. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_jointMoveTo.py +302 -0
  103. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_planArmTrajectoryBezierCurve.py +421 -0
  104. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_planArmTrajectoryCubicSpline.py +490 -0
  105. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_playmusic.py +268 -0
  106. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setHwIntialState.py +304 -0
  107. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setMmCtrlFrame.py +273 -0
  108. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setMotorEncoderRoundService.py +283 -0
  109. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setTagId.py +275 -0
  110. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_singleStepControl.py +444 -0
  111. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_twoArmHandPoseCmdSrv.py +662 -0
  112. kuavo_humanoid_sdk/msg/motion_capture_ik/__init__.py +7 -0
  113. kuavo_humanoid_sdk/msg/ocs2_msgs/__init__.py +7 -0
  114. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/__init__.py +12 -0
  115. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_constraint.py +142 -0
  116. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_controller_data.py +121 -0
  117. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_lagrangian_metrics.py +148 -0
  118. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mode_schedule.py +150 -0
  119. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_flattened_controller.py +666 -0
  120. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_input.py +122 -0
  121. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_observation.py +209 -0
  122. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_performance_indices.py +140 -0
  123. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_solver_data.py +886 -0
  124. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_state.py +122 -0
  125. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_target_trajectories.py +239 -0
  126. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_multiplier.py +148 -0
  127. kuavo_humanoid_sdk/msg/ocs2_msgs/srv/__init__.py +1 -0
  128. kuavo_humanoid_sdk/msg/ocs2_msgs/srv/_reset.py +376 -0
  129. kuavo_humanoid_sdk-1.1.6b1155.dist-info/METADATA +291 -0
  130. kuavo_humanoid_sdk-1.1.6b1155.dist-info/RECORD +132 -0
  131. kuavo_humanoid_sdk-1.1.6b1155.dist-info/WHEEL +6 -0
  132. kuavo_humanoid_sdk-1.1.6b1155.dist-info/top_level.txt +1 -0
@@ -0,0 +1,122 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/motorParam.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 motorParam(genpy.Message):
11
+ _md5sum = "7db1bed5b161d04864969d530bea48c5"
12
+ _type = "kuavo_msgs/motorParam"
13
+ _has_header = False # flag to mark the presence of a Header object
14
+ _full_text = """float32 Kp
15
+ float32 Kd
16
+ int16 id"""
17
+ __slots__ = ['Kp','Kd','id']
18
+ _slot_types = ['float32','float32','int16']
19
+
20
+ def __init__(self, *args, **kwds):
21
+ """
22
+ Constructor. Any message fields that are implicitly/explicitly
23
+ set to None will be assigned a default value. The recommend
24
+ use is keyword arguments as this is more robust to future message
25
+ changes. You cannot mix in-order arguments and keyword arguments.
26
+
27
+ The available fields are:
28
+ Kp,Kd,id
29
+
30
+ :param args: complete set of field values, in .msg order
31
+ :param kwds: use keyword arguments corresponding to message field names
32
+ to set specific fields.
33
+ """
34
+ if args or kwds:
35
+ super(motorParam, self).__init__(*args, **kwds)
36
+ # message fields cannot be None, assign default values for those that are
37
+ if self.Kp is None:
38
+ self.Kp = 0.
39
+ if self.Kd is None:
40
+ self.Kd = 0.
41
+ if self.id is None:
42
+ self.id = 0
43
+ else:
44
+ self.Kp = 0.
45
+ self.Kd = 0.
46
+ self.id = 0
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
+ _x = self
61
+ buff.write(_get_struct_2fh().pack(_x.Kp, _x.Kd, _x.id))
62
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
63
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
64
+
65
+ def deserialize(self, str):
66
+ """
67
+ unpack serialized message in str into this message instance
68
+ :param str: byte array of serialized message, ``str``
69
+ """
70
+ if python3:
71
+ codecs.lookup_error("rosmsg").msg_type = self._type
72
+ try:
73
+ end = 0
74
+ _x = self
75
+ start = end
76
+ end += 10
77
+ (_x.Kp, _x.Kd, _x.id,) = _get_struct_2fh().unpack(str[start:end])
78
+ return self
79
+ except struct.error as e:
80
+ raise genpy.DeserializationError(e) # most likely buffer underfill
81
+
82
+
83
+ def serialize_numpy(self, buff, numpy):
84
+ """
85
+ serialize message with numpy array types into buffer
86
+ :param buff: buffer, ``StringIO``
87
+ :param numpy: numpy python module
88
+ """
89
+ try:
90
+ _x = self
91
+ buff.write(_get_struct_2fh().pack(_x.Kp, _x.Kd, _x.id))
92
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
93
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
94
+
95
+ def deserialize_numpy(self, str, numpy):
96
+ """
97
+ unpack serialized message in str into this message instance using numpy for array types
98
+ :param str: byte array of serialized message, ``str``
99
+ :param numpy: numpy python module
100
+ """
101
+ if python3:
102
+ codecs.lookup_error("rosmsg").msg_type = self._type
103
+ try:
104
+ end = 0
105
+ _x = self
106
+ start = end
107
+ end += 10
108
+ (_x.Kp, _x.Kd, _x.id,) = _get_struct_2fh().unpack(str[start:end])
109
+ return self
110
+ except struct.error as e:
111
+ raise genpy.DeserializationError(e) # most likely buffer underfill
112
+
113
+ _struct_I = genpy.struct_I
114
+ def _get_struct_I():
115
+ global _struct_I
116
+ return _struct_I
117
+ _struct_2fh = None
118
+ def _get_struct_2fh():
119
+ global _struct_2fh
120
+ if _struct_2fh is None:
121
+ _struct_2fh = struct.Struct("<2fh")
122
+ return _struct_2fh
@@ -0,0 +1,120 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/planArmState.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 planArmState(genpy.Message):
11
+ _md5sum = "0743feb5221b176f512f6ea58920b201"
12
+ _type = "kuavo_msgs/planArmState"
13
+ _has_header = False # flag to mark the presence of a Header object
14
+ _full_text = """int32 progress
15
+ bool is_finished"""
16
+ __slots__ = ['progress','is_finished']
17
+ _slot_types = ['int32','bool']
18
+
19
+ def __init__(self, *args, **kwds):
20
+ """
21
+ Constructor. Any message fields that are implicitly/explicitly
22
+ set to None will be assigned a default value. The recommend
23
+ use is keyword arguments as this is more robust to future message
24
+ changes. You cannot mix in-order arguments and keyword arguments.
25
+
26
+ The available fields are:
27
+ progress,is_finished
28
+
29
+ :param args: complete set of field values, in .msg order
30
+ :param kwds: use keyword arguments corresponding to message field names
31
+ to set specific fields.
32
+ """
33
+ if args or kwds:
34
+ super(planArmState, self).__init__(*args, **kwds)
35
+ # message fields cannot be None, assign default values for those that are
36
+ if self.progress is None:
37
+ self.progress = 0
38
+ if self.is_finished is None:
39
+ self.is_finished = False
40
+ else:
41
+ self.progress = 0
42
+ self.is_finished = False
43
+
44
+ def _get_types(self):
45
+ """
46
+ internal API method
47
+ """
48
+ return self._slot_types
49
+
50
+ def serialize(self, buff):
51
+ """
52
+ serialize message into buffer
53
+ :param buff: buffer, ``StringIO``
54
+ """
55
+ try:
56
+ _x = self
57
+ buff.write(_get_struct_iB().pack(_x.progress, _x.is_finished))
58
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
59
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
60
+
61
+ def deserialize(self, str):
62
+ """
63
+ unpack serialized message in str into this message instance
64
+ :param str: byte array of serialized message, ``str``
65
+ """
66
+ if python3:
67
+ codecs.lookup_error("rosmsg").msg_type = self._type
68
+ try:
69
+ end = 0
70
+ _x = self
71
+ start = end
72
+ end += 5
73
+ (_x.progress, _x.is_finished,) = _get_struct_iB().unpack(str[start:end])
74
+ self.is_finished = bool(self.is_finished)
75
+ return self
76
+ except struct.error as e:
77
+ raise genpy.DeserializationError(e) # most likely buffer underfill
78
+
79
+
80
+ def serialize_numpy(self, buff, numpy):
81
+ """
82
+ serialize message with numpy array types into buffer
83
+ :param buff: buffer, ``StringIO``
84
+ :param numpy: numpy python module
85
+ """
86
+ try:
87
+ _x = self
88
+ buff.write(_get_struct_iB().pack(_x.progress, _x.is_finished))
89
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
90
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
91
+
92
+ def deserialize_numpy(self, str, numpy):
93
+ """
94
+ unpack serialized message in str into this message instance using numpy for array types
95
+ :param str: byte array of serialized message, ``str``
96
+ :param numpy: numpy python module
97
+ """
98
+ if python3:
99
+ codecs.lookup_error("rosmsg").msg_type = self._type
100
+ try:
101
+ end = 0
102
+ _x = self
103
+ start = end
104
+ end += 5
105
+ (_x.progress, _x.is_finished,) = _get_struct_iB().unpack(str[start:end])
106
+ self.is_finished = bool(self.is_finished)
107
+ return self
108
+ except struct.error as e:
109
+ raise genpy.DeserializationError(e) # most likely buffer underfill
110
+
111
+ _struct_I = genpy.struct_I
112
+ def _get_struct_I():
113
+ global _struct_I
114
+ return _struct_I
115
+ _struct_iB = None
116
+ def _get_struct_iB():
117
+ global _struct_iB
118
+ if _struct_iB is None:
119
+ _struct_iB = struct.Struct("<iB")
120
+ return _struct_iB
@@ -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,121 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/qv.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 qv(genpy.Message):
11
+ _md5sum = "0db98d790b5b039efb61505385ae8369"
12
+ _type = "kuavo_msgs/qv"
13
+ _has_header = False # flag to mark the presence of a Header object
14
+ _full_text = """float64[] value
15
+ """
16
+ __slots__ = ['value']
17
+ _slot_types = ['float64[]']
18
+
19
+ def __init__(self, *args, **kwds):
20
+ """
21
+ Constructor. Any message fields that are implicitly/explicitly
22
+ set to None will be assigned a default value. The recommend
23
+ use is keyword arguments as this is more robust to future message
24
+ changes. You cannot mix in-order arguments and keyword arguments.
25
+
26
+ The available fields are:
27
+ value
28
+
29
+ :param args: complete set of field values, in .msg order
30
+ :param kwds: use keyword arguments corresponding to message field names
31
+ to set specific fields.
32
+ """
33
+ if args or kwds:
34
+ super(qv, self).__init__(*args, **kwds)
35
+ # message fields cannot be None, assign default values for those that are
36
+ if self.value is None:
37
+ self.value = []
38
+ else:
39
+ self.value = []
40
+
41
+ def _get_types(self):
42
+ """
43
+ internal API method
44
+ """
45
+ return self._slot_types
46
+
47
+ def serialize(self, buff):
48
+ """
49
+ serialize message into buffer
50
+ :param buff: buffer, ``StringIO``
51
+ """
52
+ try:
53
+ length = len(self.value)
54
+ buff.write(_struct_I.pack(length))
55
+ pattern = '<%sd'%length
56
+ buff.write(struct.Struct(pattern).pack(*self.value))
57
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
58
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
59
+
60
+ def deserialize(self, str):
61
+ """
62
+ unpack serialized message in str into this message instance
63
+ :param str: byte array of serialized message, ``str``
64
+ """
65
+ if python3:
66
+ codecs.lookup_error("rosmsg").msg_type = self._type
67
+ try:
68
+ end = 0
69
+ start = end
70
+ end += 4
71
+ (length,) = _struct_I.unpack(str[start:end])
72
+ pattern = '<%sd'%length
73
+ start = end
74
+ s = struct.Struct(pattern)
75
+ end += s.size
76
+ self.value = s.unpack(str[start:end])
77
+ return self
78
+ except struct.error as e:
79
+ raise genpy.DeserializationError(e) # most likely buffer underfill
80
+
81
+
82
+ def serialize_numpy(self, buff, numpy):
83
+ """
84
+ serialize message with numpy array types into buffer
85
+ :param buff: buffer, ``StringIO``
86
+ :param numpy: numpy python module
87
+ """
88
+ try:
89
+ length = len(self.value)
90
+ buff.write(_struct_I.pack(length))
91
+ pattern = '<%sd'%length
92
+ buff.write(self.value.tostring())
93
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
94
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
95
+
96
+ def deserialize_numpy(self, str, numpy):
97
+ """
98
+ unpack serialized message in str into this message instance using numpy for array types
99
+ :param str: byte array of serialized message, ``str``
100
+ :param numpy: numpy python module
101
+ """
102
+ if python3:
103
+ codecs.lookup_error("rosmsg").msg_type = self._type
104
+ try:
105
+ end = 0
106
+ start = end
107
+ end += 4
108
+ (length,) = _struct_I.unpack(str[start:end])
109
+ pattern = '<%sd'%length
110
+ start = end
111
+ s = struct.Struct(pattern)
112
+ end += s.size
113
+ self.value = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
114
+ return self
115
+ except struct.error as e:
116
+ raise genpy.DeserializationError(e) # most likely buffer underfill
117
+
118
+ _struct_I = genpy.struct_I
119
+ def _get_struct_I():
120
+ global _struct_I
121
+ return _struct_I