Skip to content

Commit 2433a3e

Browse files
committed
mpat_cli: Add copyright notice and update --help to use correct invocation
1 parent 8ccd935 commit 2433a3e

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

utils/mpat_cli.mjs

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
#!/usr/bin/env node
22

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+
317
// CLI tool for moteus Performance Analysis Tool
418
// 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
1019

1120
import {
1221
fieldDefinitions,
@@ -192,18 +201,18 @@ Output Options:
192201
193202
Examples:
194203
# 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
197206
198207
# 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
201210
202211
# 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
207216
`);
208217
}
209218

0 commit comments

Comments
 (0)