moteus 0.3.85__py3-none-any.whl → 0.3.87__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 CHANGED
@@ -1273,7 +1273,7 @@ class Stream:
1273
1273
 
1274
1274
  async def find_encoder_cal_voltage(self, input_V, winding_resistance):
1275
1275
  if self.args.cal_ll_encoder_voltage:
1276
- return self.args.cal_ll_encoder_voltage,
1276
+ return self.args.cal_ll_encoder_voltage
1277
1277
 
1278
1278
  # We're going to try and select a voltage to roughly achieve
1279
1279
  # "--cal-motor-power".
@@ -1840,7 +1840,7 @@ class Stream:
1840
1840
 
1841
1841
  return kp, ki, w_3db / twopi
1842
1842
 
1843
- async def find_speed(self, voltage, sleep_time=0.5):
1843
+ async def find_speed(self, voltage, unwrapped_position_scale, sleep_time=0.5):
1844
1844
  assert voltage < 20.0
1845
1845
  assert voltage >= 0.0
1846
1846
 
@@ -1873,7 +1873,7 @@ class Stream:
1873
1873
  if len(power_samples) > AVERAGE_COUNT:
1874
1874
  del power_samples[0]
1875
1875
 
1876
- velocity_samples.append(data.velocity)
1876
+ velocity_samples.append(data.velocity / unwrapped_position_scale)
1877
1877
 
1878
1878
  if len(velocity_samples) > (3 * AVERAGE_COUNT):
1879
1879
  del velocity_samples[0]
@@ -1918,8 +1918,8 @@ class Stream:
1918
1918
 
1919
1919
  return velocity
1920
1920
 
1921
- async def find_speed_and_print(self, voltage, **kwargs):
1922
- result = await self.find_speed(voltage, **kwargs)
1921
+ async def find_speed_and_print(self, voltage, unwrapped_position_scale, **kwargs):
1922
+ result = await self.find_speed(voltage, unwrapped_position_scale, **kwargs)
1923
1923
  print(f"{voltage:.3f}V - {result:.3f}Hz")
1924
1924
  return result
1925
1925
 
@@ -1939,7 +1939,7 @@ class Stream:
1939
1939
  if maybe_result > (0.2 * input_V):
1940
1940
  return maybe_result
1941
1941
 
1942
- this_speed = await self.find_speed(maybe_result) / unwrapped_position_scale
1942
+ this_speed = await self.find_speed(maybe_result, unwrapped_position_scale)
1943
1943
 
1944
1944
  if (abs(this_speed) > (0.1 * self.args.cal_motor_speed) and
1945
1945
  first_nonzero_speed_voltage is None):
@@ -1977,7 +1977,8 @@ class Stream:
1977
1977
  voltages = [x * kv_cal_voltage for x in [
1978
1978
  0.0, 0.25, 0.5, 0.75, 1.0 ]]
1979
1979
  voltage_speed_hzs = list(zip(
1980
- voltages, [ await self.find_speed_and_print(voltage, sleep_time=2)
1980
+ voltages, [ await self.find_speed_and_print(
1981
+ voltage, unwrapped_position_scale, sleep_time=2)
1981
1982
  for voltage in voltages]))
1982
1983
 
1983
1984
  await self.stop_and_idle()
@@ -1995,12 +1996,10 @@ class Stream:
1995
1996
  voltage_speed_hzs = [(v, s) for v, s in voltage_speed_hzs
1996
1997
  if abs(s) > speed_threshold]
1997
1998
 
1998
- geared_v_per_hz = 1.0 / _calculate_slope(
1999
+ v_per_hz = 1.0 / _calculate_slope(
1999
2000
  [x[0] for x in voltage_speed_hzs],
2000
2001
  [x[1] for x in voltage_speed_hzs])
2001
2002
 
2002
- v_per_hz = (geared_v_per_hz *
2003
- unwrapped_position_scale)
2004
2003
  if self.firmware.version <= 0x0106:
2005
2004
  v_per_hz *= motor_output_sign
2006
2005
 
moteus/version.py CHANGED
@@ -12,4 +12,4 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- VERSION="0.3.85"
15
+ VERSION="0.3.87"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: moteus
3
- Version: 0.3.85
3
+ Version: 0.3.87
4
4
  Summary: moteus brushless controller library and tools
5
5
  Home-page: https://github.com/mjbots/moteus
6
6
  Author: mjbots Robotic Systems
@@ -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=kIKE7bp9iR6CF16plAymZwYDurA8w4Diw6V1oPln9QQ,97796
9
+ moteus/moteus_tool.py,sha256=i_XvLfALdd3UitmXdO63tj0iGwCCkaSsBZSyrkgYS9Y,97847
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=zZmPsYWAk-TzbzPFCbJiIizP_0N6OWfve42dp65rxmU,627
17
+ moteus/version.py,sha256=0H-9-BkLhMrpt7WebRlIy2uP-2RmS0Y-oPCO-T9QBJY,627
18
18
  moteus/win32_aioserial.py,sha256=culdl-vYxBKD5n2s5LkIMGyUaHyCcEc8BL5-DWEaxX8,2025
19
- moteus-0.3.85.dist-info/METADATA,sha256=AVQrOY-x3zjIEDGKb0G4rZxPQj73iIE3nKTpswZmWSY,3441
20
- moteus-0.3.85.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
21
- moteus-0.3.85.dist-info/entry_points.txt,sha256=accRcwir_K8wCf7i3qHb5R6CPh5SiSgd5a1A92ibb9E,56
22
- moteus-0.3.85.dist-info/top_level.txt,sha256=aZzmI_yecTaDrdSp29pTJuowaSQ9dlIZheQpshGg4YQ,7
23
- moteus-0.3.85.dist-info/RECORD,,
19
+ moteus-0.3.87.dist-info/METADATA,sha256=JIFUMH7iwTghDJf4fdupl4uwLj2vPCKCFHsp8yj3FSc,3441
20
+ moteus-0.3.87.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
21
+ moteus-0.3.87.dist-info/entry_points.txt,sha256=accRcwir_K8wCf7i3qHb5R6CPh5SiSgd5a1A92ibb9E,56
22
+ moteus-0.3.87.dist-info/top_level.txt,sha256=aZzmI_yecTaDrdSp29pTJuowaSQ9dlIZheQpshGg4YQ,7
23
+ moteus-0.3.87.dist-info/RECORD,,