|
1 | 1 | #!/usr/bin/env node |
2 | 2 |
|
| 3 | +// Copyright 2025 mjbots Robotic Systems, LLC. info@mjbots.com |
| 4 | +// |
| 5 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | +// you may not use this file except in compliance with the License. |
| 7 | +// You may obtain a copy of the License at |
| 8 | +// |
| 9 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +// |
| 11 | +// Unless required by applicable law or agreed to in writing, software |
| 12 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +// See the License for the specific language governing permissions and |
| 15 | +// limitations under the License. |
| 16 | + |
3 | 17 | // CLI tool for moteus Performance Analysis Tool |
4 | 18 | // Uses the core computation logic extracted from docs/mpat.html |
5 | | -// |
6 | | -// Usage examples: |
7 | | -// ./mpat_cli.mjs --help |
8 | | -// ./mpat_cli.mjs --analysis max_torque --controller moteus-x1 --motor mj5208 --voltage 48 --velocity 10 |
9 | | -// ./mpat_cli.mjs --analysis operating_point --controller moteus-n1 --voltage 24 --torque 0.5 --velocity 5 |
10 | 19 |
|
11 | 20 | import { |
12 | 21 | fieldDefinitions, |
@@ -192,18 +201,18 @@ Output Options: |
192 | 201 |
|
193 | 202 | Examples: |
194 | 203 | # Maximum torque at 10 Hz with moteus-x1 and mj5208 at 48V |
195 | | - ./mpat_cli.mjs --analysis max_torque --controller moteus-x1 --motor mj5208 \\ |
196 | | - --voltage 48 --velocity 10 |
| 204 | + ./mpat.py --analysis max_torque --controller moteus-x1 --motor mj5208 \\ |
| 205 | + --voltage 48 --velocity 10 |
197 | 206 |
|
198 | 207 | # Operating point analysis |
199 | | - ./mpat_cli.mjs --analysis operating_point --controller moteus-n1 --motor mad8318 \\ |
200 | | - --voltage 24 --torque 0.5 --velocity 5 |
| 208 | + ./mpat.py --analysis operating_point --controller moteus-n1 --motor mad8318 \\ |
| 209 | + --voltage 24 --torque 0.5 --velocity 5 |
201 | 210 |
|
202 | 211 | # Custom motor model |
203 | | - ./mpat_cli.mjs --analysis max_torque --controller moteus-x1 --motor model \\ |
204 | | - --motor.kv 200 --motor.r 0.05 --motor.l 0.00001 \\ |
205 | | - --motor.thermal_r 1.0 --motor.thermal_c 100 \\ |
206 | | - --voltage 48 --velocity 10 |
| 212 | + ./mpat.py --analysis max_torque --controller moteus-x1 --motor model \\ |
| 213 | + --motor.kv 200 --motor.r 0.05 --motor.l 0.00001 \\ |
| 214 | + --motor.thermal_r 1.0 --motor.thermal_c 100 \\ |
| 215 | + --voltage 48 --velocity 10 |
207 | 216 | `); |
208 | 217 | } |
209 | 218 |
|
|
0 commit comments