motor-python 0.0.8__tar.gz → 0.0.9__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.
- {motor_python-0.0.8 → motor_python-0.0.9}/PKG-INFO +3 -3
- {motor_python-0.0.8 → motor_python-0.0.9}/README.md +2 -2
- {motor_python-0.0.8 → motor_python-0.0.9}/pyproject.toml +1 -1
- {motor_python-0.0.8 → motor_python-0.0.9}/src/motor_python/__init__.py +1 -1
- {motor_python-0.0.8 → motor_python-0.0.9}/src/motor_python/cube_mars_motor_can.py +19 -0
- {motor_python-0.0.8 → motor_python-0.0.9}/.gitignore +0 -0
- {motor_python-0.0.8 → motor_python-0.0.9}/LICENSE +0 -0
- {motor_python-0.0.8 → motor_python-0.0.9}/scripts/README.md +0 -0
- {motor_python-0.0.8 → motor_python-0.0.9}/src/motor_python/__main__.py +0 -0
- {motor_python-0.0.8 → motor_python-0.0.9}/src/motor_python/base_motor.py +0 -0
- {motor_python-0.0.8 → motor_python-0.0.9}/src/motor_python/can_protocol.py +0 -0
- {motor_python-0.0.8 → motor_python-0.0.9}/src/motor_python/can_utils.py +0 -0
- {motor_python-0.0.8 → motor_python-0.0.9}/src/motor_python/cube_mars_motor.py +0 -0
- {motor_python-0.0.8 → motor_python-0.0.9}/src/motor_python/definitions.py +0 -0
- {motor_python-0.0.8 → motor_python-0.0.9}/src/motor_python/examples.py +0 -0
- {motor_python-0.0.8 → motor_python-0.0.9}/src/motor_python/examples_can.py +0 -0
- {motor_python-0.0.8 → motor_python-0.0.9}/src/motor_python/motor_control_using_pid.py +0 -0
- {motor_python-0.0.8 → motor_python-0.0.9}/src/motor_python/motor_manager.py +0 -0
- {motor_python-0.0.8 → motor_python-0.0.9}/src/motor_python/motor_status_parser.py +0 -0
- {motor_python-0.0.8 → motor_python-0.0.9}/src/motor_python/pid_controller.py +0 -0
- {motor_python-0.0.8 → motor_python-0.0.9}/src/motor_python/second_order_low_pass_filter.py +0 -0
- {motor_python-0.0.8 → motor_python-0.0.9}/src/motor_python/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: motor_python
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.9
|
|
4
4
|
Summary: CubeMars motor module for Aries exosuits.
|
|
5
5
|
Project-URL: homepage, https://github.com/TUM-Aries-Lab/motor-module
|
|
6
6
|
Author-email: Tsmorz <tony.smoragiewicz@tum.de>, Hannes Nguyen <hannes.nguyen@tum.de>
|
|
@@ -149,10 +149,10 @@ from motor_python.cube_mars_motor import CubeMarsAK606v3
|
|
|
149
149
|
| Method | Purpose |
|
|
150
150
|
| --- | --- |
|
|
151
151
|
| `set_position(position_degrees)` | MIT-backed position command |
|
|
152
|
-
| `set_velocity(velocity_erpm
|
|
152
|
+
| `set_velocity(velocity_erpm)` | MIT-backed velocity command. Zero releases the motor via `stop()` |
|
|
153
153
|
| `set_current(current_amps)` | Interpreted as MIT torque feedforward |
|
|
154
154
|
| `set_mit_mode(pos_rad, vel_rad_s, kp, kd, torque_ff_nm)` | Direct MIT command |
|
|
155
|
-
| `stop()` | Neutral MIT command
|
|
155
|
+
| `stop()` | Neutral MIT command, disable MIT mode, release the motor |
|
|
156
156
|
|
|
157
157
|
## Useful Bench Scripts
|
|
158
158
|
|
|
@@ -135,10 +135,10 @@ from motor_python.cube_mars_motor import CubeMarsAK606v3
|
|
|
135
135
|
| Method | Purpose |
|
|
136
136
|
| --- | --- |
|
|
137
137
|
| `set_position(position_degrees)` | MIT-backed position command |
|
|
138
|
-
| `set_velocity(velocity_erpm
|
|
138
|
+
| `set_velocity(velocity_erpm)` | MIT-backed velocity command. Zero releases the motor via `stop()` |
|
|
139
139
|
| `set_current(current_amps)` | Interpreted as MIT torque feedforward |
|
|
140
140
|
| `set_mit_mode(pos_rad, vel_rad_s, kp, kd, torque_ff_nm)` | Direct MIT command |
|
|
141
|
-
| `stop()` | Neutral MIT command
|
|
141
|
+
| `stop()` | Neutral MIT command, disable MIT mode, release the motor |
|
|
142
142
|
|
|
143
143
|
## Useful Bench Scripts
|
|
144
144
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "motor_python"
|
|
3
|
-
version = "0.0.
|
|
3
|
+
version = "0.0.9"
|
|
4
4
|
description = "CubeMars motor module for Aries exosuits."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [{ name = "Tsmorz", email = "tony.smoragiewicz@tum.de"},{ name = "Hannes Nguyen", email = "hannes.nguyen@tum.de" }]
|
|
@@ -1503,7 +1503,26 @@ class CubeMarsBaseCAN(BaseMotor):
|
|
|
1503
1503
|
- Extended ID: ``(0x08 << 8) | motor_id``
|
|
1504
1504
|
- Payload order: ``KP, KD, Position, Speed, Torque`` bit-packed in 8 bytes.
|
|
1505
1505
|
- Limits are taken from the currently selected motor profile.
|
|
1506
|
+
|
|
1507
|
+
Gains are not defaulted to anything torque-producing on purpose: a
|
|
1508
|
+
caller asking for a pure feed-forward torque needs ``kd`` to stay at
|
|
1509
|
+
zero, and changing that would alter the torque every correct caller
|
|
1510
|
+
already gets. A velocity commanded with ``kd`` at zero cannot act
|
|
1511
|
+
though -- see the warning below -- so that case is reported rather
|
|
1512
|
+
than silently absorbed.
|
|
1506
1513
|
"""
|
|
1514
|
+
if vel_rad_s != 0.0 and kd == 0.0:
|
|
1515
|
+
# tau = t_ff + kp * pos_err + kd * vel_err, so with kd at zero the
|
|
1516
|
+
# velocity term contributes nothing and the command cannot make
|
|
1517
|
+
# the motor turn. Nothing else reports this: the frame is valid,
|
|
1518
|
+
# the motor answers normally, and the shaft simply does not move.
|
|
1519
|
+
logger.warning(
|
|
1520
|
+
f"MIT command carries {vel_rad_s:.3f} rad/s with kd=0, so the "
|
|
1521
|
+
f"velocity term produces no torque and the motor will not "
|
|
1522
|
+
f"follow it. Pass kd explicitly (this motor's profile value is "
|
|
1523
|
+
f"{self._mit_velocity_kd}) or call set_velocity()."
|
|
1524
|
+
)
|
|
1525
|
+
|
|
1507
1526
|
if not self.connected:
|
|
1508
1527
|
logger.warning("Cannot send MIT command - CAN bus not connected")
|
|
1509
1528
|
return
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|