hex-util-msg 0.1.0a1__tar.gz → 0.1.0a2__tar.gz

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.
Files changed (68) hide show
  1. {hex_util_msg-0.1.0a1/hex_util_msg.egg-info → hex_util_msg-0.1.0a2}/PKG-INFO +1 -1
  2. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/dataclass/dataclass_robo.py +14 -10
  3. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_robo/HexRoboArmCtrlMode.py +4 -3
  4. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_robo/HexRoboChsCtrlMode.py +3 -2
  5. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_robo/HexRoboGripCtrlMode.py +4 -3
  6. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_robo/HexRoboLiftCtrl.py +11 -3
  7. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_robo/HexRoboLiftCtrlMode.py +3 -2
  8. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/trans/trans_robo.py +3 -3
  9. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2/hex_util_msg.egg-info}/PKG-INFO +1 -1
  10. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/pyproject.toml +1 -1
  11. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/tests/test_hex_util_msg_imports.py +11 -7
  12. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/tests/test_msg_robo.py +4 -2
  13. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/LICENSE +0 -0
  14. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/MANIFEST.in +0 -0
  15. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/README.md +0 -0
  16. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/__init__.py +0 -0
  17. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/dataclass/__init__.py +0 -0
  18. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/dataclass/dataclass_base.py +0 -0
  19. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/dataclass/dataclass_teleop.py +0 -0
  20. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_base/HexBaseHeader.py +0 -0
  21. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_base/HexBaseJntFull.py +0 -0
  22. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_base/HexBaseJntState.py +0 -0
  23. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_base/HexBaseOdometry.py +0 -0
  24. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_base/HexBasePose.py +0 -0
  25. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_base/HexBaseQuaternion.py +0 -0
  26. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_base/HexBaseTime.py +0 -0
  27. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_base/HexBaseTwist.py +0 -0
  28. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_base/HexBaseVector3.py +0 -0
  29. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_base/__init__.py +0 -0
  30. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_envelope/MsgEnvelope.py +0 -0
  31. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_envelope/MsgPayload.py +0 -0
  32. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_envelope/__init__.py +0 -0
  33. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_robo/HexRoboArmCtrl.py +0 -0
  34. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_robo/HexRoboArmCtrlStamped.py +0 -0
  35. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_robo/HexRoboArmState.py +0 -0
  36. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_robo/HexRoboArmStateStamped.py +0 -0
  37. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_robo/HexRoboChsCtrl.py +0 -0
  38. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_robo/HexRoboChsCtrlStamped.py +0 -0
  39. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_robo/HexRoboChsState.py +0 -0
  40. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_robo/HexRoboChsStateStamped.py +0 -0
  41. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_robo/HexRoboGripCtrl.py +0 -0
  42. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_robo/HexRoboGripCtrlStamped.py +0 -0
  43. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_robo/HexRoboGripState.py +0 -0
  44. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_robo/HexRoboGripStateStamped.py +0 -0
  45. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_robo/HexRoboLiftCtrlStamped.py +0 -0
  46. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_robo/HexRoboLiftState.py +0 -0
  47. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_robo/HexRoboLiftStateStamped.py +0 -0
  48. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_robo/HexRoboManipCtrl.py +0 -0
  49. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_robo/HexRoboManipCtrlStamped.py +0 -0
  50. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_robo/HexRoboManipState.py +0 -0
  51. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_robo/HexRoboManipStateStamped.py +0 -0
  52. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_robo/__init__.py +0 -0
  53. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_teleop/HexTeleopHandleCtrl.py +0 -0
  54. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_teleop/HexTeleopHandleCtrlStamped.py +0 -0
  55. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_teleop/HexTeleopHandleState.py +0 -0
  56. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_teleop/HexTeleopHandleStateStamped.py +0 -0
  57. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/fbs/msg_teleop/__init__.py +0 -0
  58. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/trans/__init__.py +0 -0
  59. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/trans/hex_msg_trans.py +0 -0
  60. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/trans/trans_base.py +0 -0
  61. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg/trans/trans_teleop.py +0 -0
  62. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg.egg-info/SOURCES.txt +0 -0
  63. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg.egg-info/dependency_links.txt +0 -0
  64. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg.egg-info/requires.txt +0 -0
  65. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/hex_util_msg.egg-info/top_level.txt +0 -0
  66. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/setup.cfg +0 -0
  67. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/tests/test_hex_msg_trans.py +0 -0
  68. {hex_util_msg-0.1.0a1 → hex_util_msg-0.1.0a2}/tests/test_msg_teleop.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hex_util_msg
3
- Version: 0.1.0a1
3
+ Version: 0.1.0a2
4
4
  Summary: HEXFELLOW Util Message
5
5
  Author-email: Dong Zhaorui <dzr159@gmail.com>
6
6
  Maintainer-email: jecjune <zejun.chen@hexfellow.com>, Dong Zhaorui <dzr159@gmail.com>
@@ -17,25 +17,29 @@ from .dataclass_base import HexBaseHeader, HexBaseJntState, HexBaseOdometry, Hex
17
17
 
18
18
 
19
19
  class HexRoboArmCtrlMode(IntEnum):
20
- MIT = 0
21
- JNT = 1
22
- EE = 2
20
+ NONE = 0
21
+ MIT = 1
22
+ JNT = 2
23
+ EE = 3
23
24
 
24
25
 
25
26
  class HexRoboChsCtrlMode(IntEnum):
26
- MIT = 0
27
- VEL = 1
27
+ NONE = 0
28
+ MIT = 1
29
+ VEL = 2
28
30
 
29
31
 
30
32
  class HexRoboGripCtrlMode(IntEnum):
31
- MIT = 0
32
- JNT = 1
33
- TAU = 2
33
+ NONE = 0
34
+ MIT = 1
35
+ JNT = 2
36
+ TAU = 3
34
37
 
35
38
 
36
39
  class HexRoboLiftCtrlMode(IntEnum):
37
- POS = 0
38
- VEL = 1
40
+ NONE = 0
41
+ POS = 1
42
+ VEL = 2
39
43
 
40
44
 
41
45
  # ---------------------------------------------------------------------------
@@ -3,7 +3,8 @@
3
3
  # namespace: msg_robo
4
4
 
5
5
  class HexRoboArmCtrlMode(object):
6
- mit = 0
7
- jnt = 1
8
- ee = 2
6
+ none = 0
7
+ mit = 1
8
+ jnt = 2
9
+ ee = 3
9
10
 
@@ -3,6 +3,7 @@
3
3
  # namespace: msg_robo
4
4
 
5
5
  class HexRoboChsCtrlMode(object):
6
- mit = 0
7
- vel = 1
6
+ none = 0
7
+ mit = 1
8
+ vel = 2
8
9
 
@@ -3,7 +3,8 @@
3
3
  # namespace: msg_robo
4
4
 
5
5
  class HexRoboGripCtrlMode(object):
6
- mit = 0
7
- jnt = 1
8
- tau = 2
6
+ none = 0
7
+ mit = 1
8
+ jnt = 2
9
+ tau = 3
9
10
 
@@ -21,8 +21,15 @@ class HexRoboLiftCtrl(object):
21
21
  self._tab = flatbuffers.table.Table(buf, pos)
22
22
 
23
23
  # HexRoboLiftCtrl
24
- def Jnt(self):
24
+ def CtrlMode(self):
25
25
  o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
26
+ if o != 0:
27
+ return self._tab.Get(flatbuffers.number_types.Uint8Flags, o + self._tab.Pos)
28
+ return 0
29
+
30
+ # HexRoboLiftCtrl
31
+ def Jnt(self):
32
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
26
33
  if o != 0:
27
34
  x = self._tab.Indirect(o + self._tab.Pos)
28
35
  from msg_base.HexBaseJntFull import HexBaseJntFull
@@ -31,6 +38,7 @@ class HexRoboLiftCtrl(object):
31
38
  return obj
32
39
  return None
33
40
 
34
- def HexRoboLiftCtrlStart(builder): builder.StartObject(1)
35
- def HexRoboLiftCtrlAddJnt(builder, jnt): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(jnt), 0)
41
+ def HexRoboLiftCtrlStart(builder): builder.StartObject(2)
42
+ def HexRoboLiftCtrlAddCtrlMode(builder, ctrlMode): builder.PrependUint8Slot(0, ctrlMode, 0)
43
+ def HexRoboLiftCtrlAddJnt(builder, jnt): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(jnt), 0)
36
44
  def HexRoboLiftCtrlEnd(builder): return builder.EndObject()
@@ -3,6 +3,7 @@
3
3
  # namespace: msg_robo
4
4
 
5
5
  class HexRoboLiftCtrlMode(object):
6
- jnt_pos = 0
7
- jnt_vel = 1
6
+ none = 0
7
+ pos = 1
8
+ vel = 2
8
9
 
@@ -97,6 +97,7 @@ from hex_util_msg.fbs.msg_robo.HexRoboGripStateStamped import (
97
97
  )
98
98
  from hex_util_msg.fbs.msg_robo.HexRoboLiftCtrl import (
99
99
  HexRoboLiftCtrl,
100
+ HexRoboLiftCtrlAddCtrlMode,
100
101
  HexRoboLiftCtrlAddJnt,
101
102
  HexRoboLiftCtrlEnd,
102
103
  HexRoboLiftCtrlStart,
@@ -297,12 +298,11 @@ def fbs2dc_hex_robo_grip_state_stamped(fbs_obj):
297
298
 
298
299
 
299
300
  # --- Lift ---
300
- # Note: FBS HexRoboLiftCtrl lacks ctrl_mode; dataclass always gets default POS.
301
301
 
302
302
  def fbs2dc_hex_robo_lift_ctrl(fbs_obj):
303
303
  jnt = fbs_obj.Jnt()
304
304
  return dc.HexRoboLiftCtrl(
305
- ctrl_mode=dc.HexRoboLiftCtrlMode.POS,
305
+ ctrl_mode=dc.HexRoboLiftCtrlMode(fbs_obj.CtrlMode()),
306
306
  jnt=fbs2dc_hex_base_jnt_full(jnt) if jnt else dc_ros.HexBaseJntFull(),
307
307
  )
308
308
 
@@ -495,11 +495,11 @@ def dc2fbs_hex_robo_grip_state_stamped(builder, dc_obj):
495
495
 
496
496
 
497
497
  # --- Lift ---
498
- # Note: FBS HexRoboLiftCtrl lacks ctrl_mode; skip it when building.
499
498
 
500
499
  def dc2fbs_hex_robo_lift_ctrl(builder, dc_obj):
501
500
  jnt_offset = dc2fbs_hex_base_jnt_full(builder, dc_obj.jnt)
502
501
  HexRoboLiftCtrlStart(builder)
502
+ HexRoboLiftCtrlAddCtrlMode(builder, dc_obj.ctrl_mode.value)
503
503
  HexRoboLiftCtrlAddJnt(builder, jnt_offset)
504
504
  return HexRoboLiftCtrlEnd(builder)
505
505
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hex_util_msg
3
- Version: 0.1.0a1
3
+ Version: 0.1.0a2
4
4
  Summary: HEXFELLOW Util Message
5
5
  Author-email: Dong Zhaorui <dzr159@gmail.com>
6
6
  Maintainer-email: jecjune <zejun.chen@hexfellow.com>, Dong Zhaorui <dzr159@gmail.com>
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "hex_util_msg"
7
- version = "0.1.0-alpha.1"
7
+ version = "0.1.0-alpha.2"
8
8
  description = "HEXFELLOW Util Message"
9
9
  readme = "README.md"
10
10
  license = "Apache-2.0"
@@ -147,10 +147,10 @@ def test_hex_jnt_defaults():
147
147
 
148
148
 
149
149
  def test_arm_ctrl_instantiation():
150
- from hex_util_msg.dataclass.dataclass_robo import HexRoboArmCtrl
150
+ from hex_util_msg.dataclass.dataclass_robo import HexRoboArmCtrl, HexRoboArmCtrlMode
151
151
 
152
152
  ctrl = HexRoboArmCtrl()
153
- assert ctrl.ctrl_mode.value == 0
153
+ assert ctrl.ctrl_mode == HexRoboArmCtrlMode.MIT
154
154
  assert ctrl.grav.x == 0.0
155
155
  assert len(ctrl.jnt.pos) == 0
156
156
  assert ctrl.pose.position.x == 0.0
@@ -158,19 +158,23 @@ def test_arm_ctrl_instantiation():
158
158
 
159
159
 
160
160
  def test_arm_ctrl_stamped_instantiation():
161
- from hex_util_msg.dataclass.dataclass_robo import HexRoboArmCtrlStamped
161
+ from hex_util_msg.dataclass.dataclass_robo import HexRoboArmCtrlMode, HexRoboArmCtrlStamped
162
162
 
163
163
  stamped = HexRoboArmCtrlStamped()
164
164
  assert stamped.header.frame_id == ""
165
- assert stamped.arm_ctrl.ctrl_mode.value == 0
165
+ assert stamped.arm_ctrl.ctrl_mode == HexRoboArmCtrlMode.MIT
166
166
 
167
167
 
168
168
  def test_manip_ctrl_instantiation():
169
- from hex_util_msg.dataclass.dataclass_robo import HexRoboManipCtrl
169
+ from hex_util_msg.dataclass.dataclass_robo import (
170
+ HexRoboArmCtrlMode,
171
+ HexRoboGripCtrlMode,
172
+ HexRoboManipCtrl,
173
+ )
170
174
 
171
175
  manip = HexRoboManipCtrl()
172
- assert manip.arm_ctrl.ctrl_mode.value == 0
173
- assert manip.grip_ctrl.ctrl_mode.value == 0
176
+ assert manip.arm_ctrl.ctrl_mode == HexRoboArmCtrlMode.MIT
177
+ assert manip.grip_ctrl.ctrl_mode == HexRoboGripCtrlMode.MIT
174
178
 
175
179
 
176
180
  def test_teleop_handle_state_defaults():
@@ -9,7 +9,7 @@ from msg_robo import (
9
9
  HexRoboChsState,
10
10
  HexRoboGripCtrl, HexRoboGripCtrlMode,
11
11
  HexRoboGripState,
12
- HexRoboLiftCtrl,
12
+ HexRoboLiftCtrl, HexRoboLiftCtrlMode,
13
13
  HexRoboLiftState,
14
14
  HexRoboManipCtrl, HexRoboManipState,
15
15
  HexRoboArmCtrlStamped, HexRoboArmStateStamped,
@@ -47,7 +47,7 @@ from msg_robo.HexRoboGripState import (
47
47
  )
48
48
  from msg_robo.HexRoboLiftCtrl import (
49
49
  HexRoboLiftCtrlStart,
50
- HexRoboLiftCtrlAddJnt, HexRoboLiftCtrlEnd,
50
+ HexRoboLiftCtrlAddCtrlMode, HexRoboLiftCtrlAddJnt, HexRoboLiftCtrlEnd,
51
51
  )
52
52
  from msg_robo.HexRoboLiftState import (
53
53
  HexRoboLiftStateStart,
@@ -275,10 +275,12 @@ def test_hex_robo_lift_ctrl_round_trip():
275
275
  b = flatbuffers.Builder(256)
276
276
  jnt_off = _build_jnt(b, pos=[0.5])
277
277
  HexRoboLiftCtrlStart(b)
278
+ HexRoboLiftCtrlAddCtrlMode(b, HexRoboLiftCtrlMode.pos)
278
279
  HexRoboLiftCtrlAddJnt(b, jnt_off)
279
280
  b.Finish(HexRoboLiftCtrlEnd(b))
280
281
 
281
282
  msg = HexRoboLiftCtrl.GetRootAsHexRoboLiftCtrl(b.Output(), 0)
283
+ assert msg.CtrlMode() == HexRoboLiftCtrlMode.pos
282
284
  j = msg.Jnt()
283
285
  assert j.Pos(0) == 0.5
284
286
 
File without changes
File without changes
File without changes