tinymovr 2.3.0a1__tar.gz → 2.3.2__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 (55) hide show
  1. {tinymovr-2.3.0a1/tinymovr.egg-info → tinymovr-2.3.2}/PKG-INFO +1 -1
  2. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tests/test_board.py +33 -7
  3. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/bus_router.py +2 -1
  4. {tinymovr-2.3.0a1 → tinymovr-2.3.2/tinymovr.egg-info}/PKG-INFO +1 -1
  5. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/MANIFEST.in +0 -0
  6. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/README.md +0 -0
  7. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/pyproject.toml +0 -0
  8. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/setup.cfg +0 -0
  9. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/setup.py +0 -0
  10. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tests/test_dfu.py +0 -0
  11. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tests/test_homing.py +0 -0
  12. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tests/test_rates.py +0 -0
  13. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tests/test_simulation.py +0 -0
  14. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tests/test_traj_planner.py +0 -0
  15. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tests/test_watchdog.py +0 -0
  16. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/__init__.py +0 -0
  17. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/bus_manager.py +0 -0
  18. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/channel.py +0 -0
  19. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/cli.py +0 -0
  20. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/codec/__init__.py +0 -0
  21. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/codec/codec.py +0 -0
  22. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/config/__init__.py +0 -0
  23. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/config/config.py +0 -0
  24. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/constants.py +0 -0
  25. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/device_discovery.py +0 -0
  26. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/dfu.py +0 -0
  27. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/gui/__init__.py +0 -0
  28. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/gui/gui.py +0 -0
  29. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/gui/helpers.py +0 -0
  30. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/gui/widgets.py +0 -0
  31. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/gui/window.py +0 -0
  32. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/gui/worker.py +0 -0
  33. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/resources/icons/app_icon.png +0 -0
  34. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/resources/icons/call.png +0 -0
  35. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/resources/icons/call@2x.png +0 -0
  36. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/resources/icons/call_dark.png +0 -0
  37. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/resources/icons/call_dark@2x.png +0 -0
  38. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/resources/icons/empty.png +0 -0
  39. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/resources/icons/empty@2x.png +0 -0
  40. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/resources/icons/empty_dark.png +0 -0
  41. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/resources/icons/empty_dark@2x.png +0 -0
  42. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/specs/dfu_1_0_x.yaml +0 -0
  43. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/specs/dfu_1_1_x.yaml +0 -0
  44. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/specs/tinymovr_1_3_x.yaml +0 -0
  45. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/specs/tinymovr_1_4_x.yaml +0 -0
  46. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/specs/tinymovr_1_5_x.yaml +0 -0
  47. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/specs/tinymovr_1_6_x.yaml +0 -0
  48. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/specs/tinymovr_2_0_x.yaml +0 -0
  49. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/specs/tinymovr_2_1_x.yaml +0 -0
  50. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr/specs/tinymovr_2_3_x.yaml +0 -0
  51. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr.egg-info/SOURCES.txt +0 -0
  52. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr.egg-info/dependency_links.txt +0 -0
  53. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr.egg-info/entry_points.txt +0 -0
  54. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr.egg-info/requires.txt +0 -0
  55. {tinymovr-2.3.0a1 → tinymovr-2.3.2}/tinymovr.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tinymovr
3
- Version: 2.3.0a1
3
+ Version: 2.3.2
4
4
  Summary: Tinymovr Studio
5
5
  Home-page: https://github.com/yconst/Tinymovr
6
6
  Author: Yannis Chatzikonstantinou
@@ -35,6 +35,7 @@ tsleep = 0.20
35
35
  class TestBoard(TMTestCase):
36
36
 
37
37
  @pytest.mark.hitl_default
38
+ @pytest.mark.hitl_mini
38
39
  def test_a_sensor_readings(self):
39
40
  """
40
41
  Test sensor readings
@@ -47,6 +48,7 @@ class TestBoard(TMTestCase):
47
48
  self.assertLess(st.pstdev(pos_estimates) * ticks, 5 * ticks)
48
49
 
49
50
  @pytest.mark.hitl_default
51
+ @pytest.mark.hitl_mini
50
52
  def test_b_invalid_values(self):
51
53
  """
52
54
  Test rejection of invalid values for limits and gains
@@ -77,6 +79,7 @@ class TestBoard(TMTestCase):
77
79
  time.sleep(2)
78
80
 
79
81
  @pytest.mark.hitl_default
82
+ @pytest.mark.hitl_mini
80
83
  def test_c_calibrate(self):
81
84
  """
82
85
  Test board calibration if not calibrated
@@ -86,6 +89,7 @@ class TestBoard(TMTestCase):
86
89
 
87
90
  @pytest.mark.eol
88
91
  @pytest.mark.hitl_default
92
+ @pytest.mark.hitl_mini
89
93
  def test_d_position_control(self):
90
94
  """
91
95
  Test position control
@@ -94,6 +98,11 @@ class TestBoard(TMTestCase):
94
98
  self.check_state(0)
95
99
  self.tm.controller.current.Iq_limit = 5
96
100
  self.try_calibrate()
101
+ if hw_rev > 20:
102
+ self.tm.controller.position.p_gain = 5
103
+ self.tm.controller.velocity.p_gain = 2e-5
104
+ self.tm.controller.velocity.i_gain = 0
105
+
97
106
  self.tm.controller.position_mode()
98
107
  self.check_state(2)
99
108
 
@@ -111,10 +120,12 @@ class TestBoard(TMTestCase):
111
120
  )
112
121
 
113
122
  @pytest.mark.hitl_default
123
+ @pytest.mark.hitl_mini
114
124
  def test_e_velocity_control(self):
115
125
  """
116
126
  Test velocity control
117
127
  """
128
+ hw_rev = self.tm.hw_revision
118
129
  self.check_state(0)
119
130
  self.try_calibrate()
120
131
  self.tm.controller.velocity_mode()
@@ -122,50 +133,65 @@ class TestBoard(TMTestCase):
122
133
 
123
134
  R = 15
124
135
 
136
+ if hw_rev > 20:
137
+ multiplier = 4000 * ticks / s
138
+ max_delta = 15000 * ticks / s
139
+ else:
140
+ multiplier = 20000 * ticks / s
141
+ max_delta = 30000 * ticks / s
142
+
125
143
  velocity_pairs = []
126
144
 
127
145
  for i in range(R):
128
- target = i * 20000 * ticks / s
146
+ target = i * multiplier
129
147
  self.tm.controller.velocity.setpoint = target
130
148
  time.sleep(tsleep)
131
149
  velocity_pairs.append((target, self.tm.sensors.user_frame.velocity_estimate))
132
150
 
133
151
  for i in range(R):
134
- target = (R - i) * 20000 * ticks / s
152
+ target = (R - i) * multiplier
135
153
  self.tm.controller.velocity.setpoint = target
136
154
  time.sleep(tsleep)
137
155
  velocity_pairs.append((target, self.tm.sensors.user_frame.velocity_estimate))
138
156
 
139
157
  for i in range(R):
140
- target = -i * 20000 * ticks / s
158
+ target = -i * multiplier
141
159
  self.tm.controller.velocity.setpoint = target
142
160
  time.sleep(tsleep)
143
161
  velocity_pairs.append((target, self.tm.sensors.user_frame.velocity_estimate))
144
162
 
145
163
  for i in range(R):
146
- target = (i - R) * 20000 * ticks / s
164
+ target = (i - R) * multiplier
147
165
  self.tm.controller.velocity.setpoint = target
148
166
  time.sleep(tsleep)
149
167
  velocity_pairs.append((target, self.tm.sensors.user_frame.velocity_estimate))
150
168
 
151
169
  for target, estimate in velocity_pairs:
152
- self.assertAlmostEqual(target, estimate, delta=30000 * ticks / s)
170
+ self.assertAlmostEqual(target, estimate, delta=max_delta)
153
171
 
154
172
  @pytest.mark.hitl_default
173
+ @pytest.mark.hitl_mini
155
174
  def test_f_random_pos_control(self):
156
175
  """
157
176
  Test random positions
158
177
  """
178
+ hw_rev = self.tm.hw_revision
159
179
  self.check_state(0)
160
180
  self.try_calibrate()
161
181
  self.tm.controller.position_mode()
162
182
  self.check_state(2)
163
183
 
164
- self.tm.controller.velocity.limit = 200000 * ticks / s
184
+ if hw_rev > 20:
185
+ self.tm.controller.velocity.limit = 100000 * ticks / s
186
+ tick_range = 10000
187
+ else:
188
+ self.tm.controller.velocity.limit = 200000 * ticks / s
189
+ tick_range = 24000
165
190
 
166
191
  for _ in range(15):
167
- new_pos = random.uniform(-24000, 24000)
192
+ new_pos = random.uniform(-tick_range, tick_range)
168
193
  self.tm.controller.position.setpoint = new_pos * ticks
194
+
169
195
  time.sleep(0.35)
170
196
  self.assertAlmostEqual(
171
197
  self.tm.sensors.user_frame.position_estimate,
@@ -20,6 +20,7 @@ import warnings
20
20
  from enum import Enum
21
21
  from threading import Thread, Lock
22
22
  from tinymovr.bus_manager import BusManager
23
+ from logging import Logger
23
24
 
24
25
 
25
26
  bus_router = None
@@ -86,7 +87,7 @@ class BusRouter:
86
87
  self.bus_manager.send(frame)
87
88
 
88
89
 
89
- def init_router(bus_class, bus_params, logger, timeout=0.1):
90
+ def init_router(bus_class, bus_params, logger=Logger("tinymovr"), timeout=0.1):
90
91
  """
91
92
  Initializes a bus router using a python-can bus instance
92
93
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tinymovr
3
- Version: 2.3.0a1
3
+ Version: 2.3.2
4
4
  Summary: Tinymovr Studio
5
5
  Home-page: https://github.com/yconst/Tinymovr
6
6
  Author: Yannis Chatzikonstantinou
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes