moteus 0.3.55__py3-none-any.whl → 0.3.56__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.
- moteus/moteus_tool.py +16 -4
- moteus/version.py +1 -1
- {moteus-0.3.55.dist-info → moteus-0.3.56.dist-info}/METADATA +1 -1
- {moteus-0.3.55.dist-info → moteus-0.3.56.dist-info}/RECORD +7 -7
- {moteus-0.3.55.dist-info → moteus-0.3.56.dist-info}/WHEEL +0 -0
- {moteus-0.3.55.dist-info → moteus-0.3.56.dist-info}/entry_points.txt +0 -0
- {moteus-0.3.55.dist-info → moteus-0.3.56.dist-info}/top_level.txt +0 -0
moteus/moteus_tool.py
CHANGED
@@ -754,9 +754,13 @@ class Stream:
|
|
754
754
|
if await self.is_config_supported("motor.unwrapped_position_scale"):
|
755
755
|
unwrapped_position_scale = \
|
756
756
|
await self.read_config_double("motor.unwrapped_position_scale")
|
757
|
+
motor_output_sign = 1.0
|
757
758
|
elif await self.is_config_supported("motor_position.rotor_to_output_ratio"):
|
758
759
|
unwrapped_position_scale = \
|
759
760
|
await self.read_config_double("motor_position.rotor_to_output_ratio")
|
761
|
+
motor_output_sign = \
|
762
|
+
await self.read_config_double("motor_position.output.sign")
|
763
|
+
|
760
764
|
|
761
765
|
if await self.is_config_supported("servo.pwm_rate_hz"):
|
762
766
|
pwm_rate_hz = await self.read_config_double("servo.pwm_rate_hz")
|
@@ -820,7 +824,7 @@ class Stream:
|
|
820
824
|
await self.check_for_fault()
|
821
825
|
|
822
826
|
v_per_hz = await self.calibrate_kv_rating(
|
823
|
-
input_V, unwrapped_position_scale)
|
827
|
+
input_V, unwrapped_position_scale, motor_output_sign)
|
824
828
|
await self.check_for_fault()
|
825
829
|
|
826
830
|
# Rezero the servo since we just spun it a lot.
|
@@ -852,7 +856,8 @@ class Stream:
|
|
852
856
|
# We measure voltage to the center, not peak-to-peak, thus
|
853
857
|
# the extra 0.5.
|
854
858
|
'kv' : (0.5 * 60.0 / v_per_hz),
|
855
|
-
'unwrapped_position_scale' : unwrapped_position_scale
|
859
|
+
'unwrapped_position_scale' : unwrapped_position_scale,
|
860
|
+
'motor_position_output_sign' : motor_output_sign,
|
856
861
|
}
|
857
862
|
|
858
863
|
log_filename = f"moteus-cal-{device_info['serial_number']}-{now.strftime('%Y%m%dT%H%M%S.%f')}.log"
|
@@ -1306,7 +1311,8 @@ class Stream:
|
|
1306
1311
|
print()
|
1307
1312
|
return maybe_result
|
1308
1313
|
|
1309
|
-
async def calibrate_kv_rating(self, input_V, unwrapped_position_scale
|
1314
|
+
async def calibrate_kv_rating(self, input_V, unwrapped_position_scale,
|
1315
|
+
motor_output_sign):
|
1310
1316
|
if self.args.cal_force_kv is None:
|
1311
1317
|
print("Calculating Kv rating")
|
1312
1318
|
|
@@ -1333,11 +1339,17 @@ class Stream:
|
|
1333
1339
|
|
1334
1340
|
geared_v_per_hz = 1.0 / _calculate_slope(voltages, speed_hzs)
|
1335
1341
|
|
1336
|
-
v_per_hz = geared_v_per_hz *
|
1342
|
+
v_per_hz = (geared_v_per_hz *
|
1343
|
+
unwrapped_position_scale *
|
1344
|
+
motor_output_sign)
|
1337
1345
|
print(f"v_per_hz (pre-gearbox)={v_per_hz}")
|
1338
1346
|
|
1339
1347
|
await self.command(f"conf set servopos.position_min {original_position_min}")
|
1340
1348
|
await self.command(f"conf set servopos.position_max {original_position_max}")
|
1349
|
+
|
1350
|
+
if v_per_hz < 0.0:
|
1351
|
+
raise RuntimeError(
|
1352
|
+
f"v_per_hz measured as negative ({v_per_hz}), something wrong")
|
1341
1353
|
else:
|
1342
1354
|
v_per_hz = (0.5 * 60 / self.args.cal_force_kv)
|
1343
1355
|
print(f"Using forced Kv: {self.args.cal_force_kv} v_per_hz={v_per_hz}")
|
moteus/version.py
CHANGED
@@ -6,7 +6,7 @@ moteus/command.py,sha256=YEtDNXX-TlkUSElsGVQoSYbGqcboneNEejZo06v8ZsI,1128
|
|
6
6
|
moteus/export.py,sha256=dI8QjdqrcI3pi5fKfP25PwLvsIlVJ695x0ta0PVMKx8,1628
|
7
7
|
moteus/fdcanusb.py,sha256=AMwqdvIRz4X9yA4qz8REuyFBfs3OcLcVqbGX28sEx4s,6729
|
8
8
|
moteus/moteus.py,sha256=W-ADEI1uAHF0j5A3s1CINTUYpwjEgO-xPRQS15C9Ewg,43410
|
9
|
-
moteus/moteus_tool.py,sha256=
|
9
|
+
moteus/moteus_tool.py,sha256=WPpXvLwD9bJaWZY8LVygzFrmT7diN0HXMVZ_nUSfp9k,66231
|
10
10
|
moteus/multiplex.py,sha256=0Hs63pFZpl1y7ciTcwEeg8F2JDjlhrkb2FcfUbdox-g,9637
|
11
11
|
moteus/posix_aioserial.py,sha256=3JFiY5p4dtC2ztg6N5SOffnNk9lNcjie02yjD3UlJWo,2971
|
12
12
|
moteus/pythoncan.py,sha256=lawewmkd9zQuE-Z1LurmpFD2iSWATei65SZb42um_Vg,3309
|
@@ -14,10 +14,10 @@ moteus/reader.py,sha256=jGADQTmONSBMQ25I5AqXELLqil2TEha1KjraPdOsf78,11932
|
|
14
14
|
moteus/regression.py,sha256=wpPlxAZ9nC9kfv0oX1K9W2AZNnBLbY8htAJz60SxIb8,1183
|
15
15
|
moteus/router.py,sha256=k4Tf6hWtHSgzznmdnj4NySe84-y9feYRxGz0yTrJtoc,2043
|
16
16
|
moteus/transport.py,sha256=3asI2A87eQDImLP74LNLtETaShQRiD9RuCjlxNY6AlE,1003
|
17
|
-
moteus/version.py,sha256=
|
17
|
+
moteus/version.py,sha256=6IePxRuf-dHbF45uc1W5kTJba8U8rF7AWW44ngo7bEY,609
|
18
18
|
moteus/win32_aioserial.py,sha256=SZsnoBWE0Uwo4ZZF8ALB1WNPRY9NiaCOBz6VfvVcnxA,1841
|
19
|
-
moteus-0.3.
|
20
|
-
moteus-0.3.
|
21
|
-
moteus-0.3.
|
22
|
-
moteus-0.3.
|
23
|
-
moteus-0.3.
|
19
|
+
moteus-0.3.56.dist-info/METADATA,sha256=rztYCXjyhVOwKH0uVEQf7Xp2zuD6C0kexA4CXIMVUgo,3417
|
20
|
+
moteus-0.3.56.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
21
|
+
moteus-0.3.56.dist-info/entry_points.txt,sha256=indCsEML1fmtWJU1WiV-d7UmmTaAMhyBLEc1iiKnexQ,57
|
22
|
+
moteus-0.3.56.dist-info/top_level.txt,sha256=aZzmI_yecTaDrdSp29pTJuowaSQ9dlIZheQpshGg4YQ,7
|
23
|
+
moteus-0.3.56.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|