moteus 0.3.83__py3-none-any.whl → 0.3.84__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 +25 -13
- moteus/version.py +1 -1
- {moteus-0.3.83.dist-info → moteus-0.3.84.dist-info}/METADATA +1 -1
- {moteus-0.3.83.dist-info → moteus-0.3.84.dist-info}/RECORD +7 -7
- {moteus-0.3.83.dist-info → moteus-0.3.84.dist-info}/WHEEL +0 -0
- {moteus-0.3.83.dist-info → moteus-0.3.84.dist-info}/entry_points.txt +0 -0
- {moteus-0.3.83.dist-info → moteus-0.3.84.dist-info}/top_level.txt +0 -0
moteus/moteus_tool.py
CHANGED
@@ -546,16 +546,25 @@ class FirmwareUpgrade:
|
|
546
546
|
print(f"Upgraded servo.derate_temperature to servo.temperature_margin={temperature_margin}")
|
547
547
|
items[b'servo.temperature_margin'] = str(temperature_margin).encode('utf8')
|
548
548
|
|
549
|
+
def float_or_none(val):
|
550
|
+
if val is None:
|
551
|
+
return None
|
552
|
+
return float(val)
|
549
553
|
|
550
|
-
motor_derate_temperature =
|
551
|
-
|
554
|
+
motor_derate_temperature = (
|
555
|
+
float_or_none(items.pop(b'servo.motor_derate_temperature', None)))
|
556
|
+
motor_fault_temperature = (
|
557
|
+
float_or_none(items.get(b'servo.motor_fault_temperature', None)))
|
552
558
|
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
+
if (motor_derate_temperature is not None and
|
560
|
+
motor_fault_temperature is not None):
|
561
|
+
|
562
|
+
motor_temperature_margin = (
|
563
|
+
(motor_fault_temperature - motor_derate_temperature)
|
564
|
+
if math.isfinite(motor_fault_temperature) else
|
565
|
+
20)
|
566
|
+
print(f"Upgraded servo.motor_derate_temperature to servo.motor_temperature_margin={motor_temperature_margin}")
|
567
|
+
items[b'servo.motor_temperature_margin'] = str(motor_temperature_margin).encode('utf8')
|
559
568
|
|
560
569
|
lines = [key + b' ' + value for key, value in items.items()]
|
561
570
|
return b'\n'.join(lines)
|
@@ -1180,7 +1189,8 @@ class Stream:
|
|
1180
1189
|
await self.check_for_fault()
|
1181
1190
|
|
1182
1191
|
cal_result = await self.calibrate_encoder_mapping(
|
1183
|
-
input_V, winding_resistance, current_noise
|
1192
|
+
input_V, winding_resistance, current_noise,
|
1193
|
+
unwrapped_position_scale)
|
1184
1194
|
await self.check_for_fault()
|
1185
1195
|
|
1186
1196
|
motor_kv = await self.calibrate_kv_rating(
|
@@ -1271,7 +1281,7 @@ class Stream:
|
|
1271
1281
|
math.sqrt((self.args.cal_motor_power / 1.5) *
|
1272
1282
|
winding_resistance))
|
1273
1283
|
|
1274
|
-
async def calibrate_encoder_mapping(self, input_V, winding_resistance, current_noise):
|
1284
|
+
async def calibrate_encoder_mapping(self, input_V, winding_resistance, current_noise, unwrapped_position_scale):
|
1275
1285
|
# Figure out what voltage to use for encoder calibration.
|
1276
1286
|
encoder_cal_voltage = \
|
1277
1287
|
await self.find_encoder_cal_voltage(input_V, winding_resistance)
|
@@ -1312,7 +1322,8 @@ class Stream:
|
|
1312
1322
|
"servo.voltage_mode_control")
|
1313
1323
|
|
1314
1324
|
return await self.calibrate_encoder_mapping_absolute(
|
1315
|
-
encoder_cal_voltage, encoder_cal_current, current_noise
|
1325
|
+
encoder_cal_voltage, encoder_cal_current, current_noise,
|
1326
|
+
unwrapped_position_scale)
|
1316
1327
|
finally:
|
1317
1328
|
# At least try to stop.
|
1318
1329
|
await self.command("d stop")
|
@@ -1415,7 +1426,8 @@ class Stream:
|
|
1415
1426
|
await self.find_index(encoder_cal_voltage)
|
1416
1427
|
|
1417
1428
|
async def calibrate_encoder_mapping_absolute(
|
1418
|
-
self, encoder_cal_voltage, encoder_cal_current, current_noise
|
1429
|
+
self, encoder_cal_voltage, encoder_cal_current, current_noise,
|
1430
|
+
unwrapped_position_scale):
|
1419
1431
|
await self.ensure_valid_theta(encoder_cal_voltage)
|
1420
1432
|
|
1421
1433
|
current_quality_factor = encoder_cal_current / current_noise
|
@@ -1440,7 +1452,7 @@ class Stream:
|
|
1440
1452
|
await asyncio.sleep(3.0)
|
1441
1453
|
|
1442
1454
|
await self.write_message(
|
1443
|
-
(f"d cali i{encoder_cal_current} s{self.args.cal_ll_encoder_speed}"))
|
1455
|
+
(f"d cali i{encoder_cal_current} s{self.args.cal_ll_encoder_speed * unwrapped_position_scale}"))
|
1444
1456
|
else:
|
1445
1457
|
await self.command(f"d pwm 0 {encoder_cal_voltage}")
|
1446
1458
|
await asyncio.sleep(3.0)
|
moteus/version.py
CHANGED
@@ -6,7 +6,7 @@ moteus/command.py,sha256=UkOsbtkso6Oyex8CfbpAKpBNriik519ymxL86EZGkRs,1169
|
|
6
6
|
moteus/export.py,sha256=XitBUuf4MDRIneXQSUptizIhZi2BdHyFO2Vo_2d2CFI,1742
|
7
7
|
moteus/fdcanusb.py,sha256=7PrQiCTROY96gdT2zSZYU1bOCriw-I7H6NspaZpiEx4,7431
|
8
8
|
moteus/moteus.py,sha256=vImSRBn6VEmoijD6hvrSRVxuv1_xVaEJU3F_3Wi6GiE,52498
|
9
|
-
moteus/moteus_tool.py,sha256=
|
9
|
+
moteus/moteus_tool.py,sha256=ocKUSl7qc_O1DOwoj5UFx1Kaw5HkRPEhU_e-tftfmk4,97236
|
10
10
|
moteus/multiplex.py,sha256=2tdNX5JSh21TOjN6N9LKribLQtVYyyYbXjzwXB64sfA,12119
|
11
11
|
moteus/posix_aioserial.py,sha256=2oDrw8TBEwuEQjY41g9rHeuFeffcPHqMwNS3nf5NVq8,3137
|
12
12
|
moteus/pythoncan.py,sha256=M5Qba3aCzO_GyXcIsLJxjw3NrPgUk4CUnHOQIhQeIb0,4786
|
@@ -14,10 +14,10 @@ moteus/reader.py,sha256=9i1-h4aGd4syfqtWJcpg70Bl-bmunkGU4FmXmOLyRt8,12121
|
|
14
14
|
moteus/regression.py,sha256=M5gjDBYJQ64iBXIrvBhMkD8TYhtlnQ85x8U4py0niGA,1196
|
15
15
|
moteus/router.py,sha256=501W5GZ12rFoc1lmcH3S7IYsoc-Q_-FJ4B3i37RzE3Q,2061
|
16
16
|
moteus/transport.py,sha256=WhkW2G9i25lkOlO55eI5_oXmU0PhDmxTeJ75Sg_7nTI,1021
|
17
|
-
moteus/version.py,sha256=
|
17
|
+
moteus/version.py,sha256=SIOoh1lHjcFFVldtp79E9rmBXUk63cDry1gjgxqOQ14,627
|
18
18
|
moteus/win32_aioserial.py,sha256=culdl-vYxBKD5n2s5LkIMGyUaHyCcEc8BL5-DWEaxX8,2025
|
19
|
-
moteus-0.3.
|
20
|
-
moteus-0.3.
|
21
|
-
moteus-0.3.
|
22
|
-
moteus-0.3.
|
23
|
-
moteus-0.3.
|
19
|
+
moteus-0.3.84.dist-info/METADATA,sha256=okhSG2P2nrnQPSoq_F4-4t79_4KVrRCOZat5etq3gAg,3441
|
20
|
+
moteus-0.3.84.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
21
|
+
moteus-0.3.84.dist-info/entry_points.txt,sha256=accRcwir_K8wCf7i3qHb5R6CPh5SiSgd5a1A92ibb9E,56
|
22
|
+
moteus-0.3.84.dist-info/top_level.txt,sha256=aZzmI_yecTaDrdSp29pTJuowaSQ9dlIZheQpshGg4YQ,7
|
23
|
+
moteus-0.3.84.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|