Skip to content

Commit 80fa30a

Browse files
committed
Rename high-level commander command from hl to hlc
1 parent b0e2eff commit 80fa30a

5 files changed

Lines changed: 54 additions & 54 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Commands:
7676
scan List the Crazyflies found while scanning (on the selected address)
7777
select Scan for Crazyflies and select which one to save for later interactions
7878
console Print the console text from a Crazyflie
79-
hl High-level commander operations (takeoff, land, go-to, trajectory, etc.)
79+
hlc High-level commander operations (takeoff, land, go-to, trajectory, etc.)
8080
help Print this message or the help of the given subcommand(s)
8181
8282
Options:

docs/high-level-commander.md

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ takeoff, landing, position control, and trajectory execution. All commands requi
55
to have a valid position estimate (from a positioning system like Lighthouse or Loco).
66

77
```text
8-
Usage: cfcli hl <COMMAND>
8+
Usage: cfcli hlc <COMMAND>
99
1010
Commands:
1111
arm Arm the Crazyflie (enable motors)
@@ -24,58 +24,58 @@ Before flying, the Crazyflie must be armed. This enables the motors and allows t
2424
commander to control the drone.
2525

2626
```text
27-
cfcli hl arm
28-
cfcli hl disarm
27+
cfcli hlc arm
28+
cfcli hlc disarm
2929
```
3030

3131
## Takeoff
3232

3333
Take off to a specified height. The duration specifies how long it should take to reach the target height.
3434

3535
```text
36-
cfcli hl takeoff <HEIGHT> [DURATION] [--yaw <YAW>]
36+
cfcli hlc takeoff <HEIGHT> [DURATION] [--yaw <YAW>]
3737
```
3838

3939
### Takeoff Examples
4040

4141
```text
4242
# Take off to 0.5 meters over 2 seconds (default)
43-
cfcli hl takeoff 0.5
43+
cfcli hlc takeoff 0.5
4444
4545
# Take off to 1 meter over 3 seconds
46-
cfcli hl takeoff 1.0 3.0
46+
cfcli hlc takeoff 1.0 3.0
4747
4848
# Take off to 0.5 meters while rotating to 90 degrees yaw
49-
cfcli hl takeoff 0.5 --yaw 90
49+
cfcli hlc takeoff 0.5 --yaw 90
5050
```
5151

5252
## Land
5353

5454
Land at the current position. The height parameter specifies the target landing height (typically 0.0).
5555

5656
```text
57-
cfcli hl land [HEIGHT] [DURATION] [--yaw <YAW>]
57+
cfcli hlc land [HEIGHT] [DURATION] [--yaw <YAW>]
5858
```
5959

6060
### Land Examples
6161

6262
```text
6363
# Land over 2 seconds (default)
64-
cfcli hl land
64+
cfcli hlc land
6565
6666
# Land over 3 seconds
67-
cfcli hl land 0.0 3.0
67+
cfcli hlc land 0.0 3.0
6868
6969
# Land while rotating to 0 degrees yaw
70-
cfcli hl land --yaw 0
70+
cfcli hlc land --yaw 0
7171
```
7272

7373
## Go To Position
7474

7575
Move to a specified position. The position is given as comma-separated x,y,z coordinates.
7676

7777
```text
78-
cfcli hl goto <POSITION> [-d <DURATION>] [--yaw <YAW>] [-r]
78+
cfcli hlc goto <POSITION> [-d <DURATION>] [--yaw <YAW>] [-r]
7979
```
8080

8181
The position format is `x,y,z` where `x`, `y`, `z` are coordinates in meters.
@@ -90,27 +90,27 @@ Options:
9090

9191
```text
9292
# Go to position (1, 0, 0.5) over 2 seconds
93-
cfcli hl goto 1.0,0.0,0.5
93+
cfcli hlc goto 1.0,0.0,0.5
9494
9595
# Go to position (1, 2, 1) with 90 degree yaw over 5 seconds
96-
cfcli hl goto 1.0,2.0,1.0 --yaw 90 -d 5.0
96+
cfcli hlc goto 1.0,2.0,1.0 --yaw 90 -d 5.0
9797
9898
# Move 0.5 meters forward relative to current position
99-
cfcli hl goto 0.5,0,0 -r
99+
cfcli hlc goto 0.5,0,0 -r
100100
101101
# Negative coordinates are supported
102-
cfcli hl goto -1.0,-0.5,0.5
102+
cfcli hlc goto -1.0,-0.5,0.5
103103
104104
# Rotate to 180 degrees yaw while moving
105-
cfcli hl goto 0.0,0.0,0.5 --yaw 180
105+
cfcli hlc goto 0.0,0.0,0.5 --yaw 180
106106
```
107107

108108
## Stop
109109

110110
Immediately stop all high-level commander operations and disable the motors.
111111

112112
```text
113-
cfcli hl stop
113+
cfcli hlc stop
114114
```
115115

116116
## Trajectory Operations
@@ -119,7 +119,7 @@ Trajectories allow complex pre-defined flight paths to be executed. Trajectories
119119
as polynomial segments in a YAML file, uploaded to the Crazyflie's memory, and then executed.
120120

121121
```text
122-
Usage: cfcli hl trajectory <COMMAND>
122+
Usage: cfcli hlc trajectory <COMMAND>
123123
124124
Commands:
125125
upload Upload a trajectory from a YAML file
@@ -161,7 +161,7 @@ Each segment uses 132 bytes of memory on the Crazyflie.
161161
Upload a trajectory from a YAML file to the Crazyflie's trajectory memory.
162162

163163
```text
164-
cfcli hl trajectory upload <FILE> [-i <ID>] [-o <OFFSET>]
164+
cfcli hlc trajectory upload <FILE> [-i <ID>] [-o <OFFSET>]
165165
```
166166

167167
Options:
@@ -172,22 +172,22 @@ Options:
172172

173173
```text
174174
# Upload trajectory with default ID (1)
175-
cfcli hl trajectory upload my_trajectory.yaml
175+
cfcli hlc trajectory upload my_trajectory.yaml
176176
177177
# Upload trajectory with ID 2
178-
cfcli hl trajectory upload figure8.yaml -i 2
178+
cfcli hlc trajectory upload figure8.yaml -i 2
179179
180180
# Upload multiple trajectories at different offsets
181-
cfcli hl trajectory upload traj1.yaml -i 1 -o 0
182-
cfcli hl trajectory upload traj2.yaml -i 2 -o 1000
181+
cfcli hlc trajectory upload traj1.yaml -i 1 -o 0
182+
cfcli hlc trajectory upload traj2.yaml -i 2 -o 1000
183183
```
184184

185185
### Run Trajectory
186186

187187
Execute a previously uploaded trajectory.
188188

189189
```text
190-
cfcli hl trajectory run <ID> [-s <SCALE>] [-r] [-y] [--reversed]
190+
cfcli hlc trajectory run <ID> [-s <SCALE>] [-r] [-y] [--reversed]
191191
```
192192

193193
Options:
@@ -200,19 +200,19 @@ Options:
200200

201201
```text
202202
# Run trajectory ID 1 at normal speed
203-
cfcli hl trajectory run 1
203+
cfcli hlc trajectory run 1
204204
205205
# Run trajectory at half speed
206-
cfcli hl trajectory run 1 -s 2.0
206+
cfcli hlc trajectory run 1 -s 2.0
207207
208208
# Run trajectory at double speed
209-
cfcli hl trajectory run 1 -s 0.5
209+
cfcli hlc trajectory run 1 -s 0.5
210210
211211
# Run trajectory relative to current position and yaw
212-
cfcli hl trajectory run 1 -r -y
212+
cfcli hlc trajectory run 1 -r -y
213213
214214
# Run trajectory in reverse
215-
cfcli hl trajectory run 1 --reversed
215+
cfcli hlc trajectory run 1 --reversed
216216
```
217217

218218
### Display Trajectory Info
@@ -221,10 +221,10 @@ Display information about a trajectory file or the Crazyflie's trajectory memory
221221

222222
```text
223223
# Display trajectory file contents
224-
cfcli hl trajectory display my_trajectory.yaml
224+
cfcli hlc trajectory display my_trajectory.yaml
225225
226226
# Display trajectory memory info from Crazyflie
227-
cfcli hl trajectory display
227+
cfcli hlc trajectory display
228228
```
229229

230230
## Complete Flight Example
@@ -236,32 +236,32 @@ Here's a complete example of a simple flight sequence:
236236
cfcli select
237237
238238
# Arm the motors
239-
cfcli hl arm
239+
cfcli hlc arm
240240
241241
# Take off to 0.5 meters
242-
cfcli hl takeoff 0.5
242+
cfcli hlc takeoff 0.5
243243
244244
# Wait a moment (the command returns immediately)
245245
sleep 3
246246
247247
# Move to a position
248-
cfcli hl goto 1.0,0.0,0.5 -d 2.0
248+
cfcli hlc goto 1.0,0.0,0.5 -d 2.0
249249
sleep 3
250250
251251
# Move to another position
252-
cfcli hl goto 0.0,1.0,0.5 -d 2.0
252+
cfcli hlc goto 0.0,1.0,0.5 -d 2.0
253253
sleep 3
254254
255255
# Return to origin
256-
cfcli hl goto 0.0,0.0,0.5 -d 2.0
256+
cfcli hlc goto 0.0,0.0,0.5 -d 2.0
257257
sleep 3
258258
259259
# Land
260-
cfcli hl land
260+
cfcli hlc land
261261
sleep 3
262262
263263
# Disarm (optional, landing auto-disarms after a delay)
264-
cfcli hl disarm
264+
cfcli hlc disarm
265265
```
266266

267267
## Trajectory Flight Example
@@ -273,20 +273,20 @@ Example of uploading and running a trajectory:
273273
cfcli select
274274
275275
# Check trajectory file contents
276-
cfcli hl trajectory display figure8.yaml
276+
cfcli hlc trajectory display figure8.yaml
277277
278278
# Arm and take off
279-
cfcli hl arm
280-
cfcli hl takeoff 0.5
279+
cfcli hlc arm
280+
cfcli hlc takeoff 0.5
281281
sleep 3
282282
283283
# Upload the trajectory
284-
cfcli hl trajectory upload figure8.yaml -i 1
284+
cfcli hlc trajectory upload figure8.yaml -i 1
285285
286286
# Run the trajectory (relative to current position)
287-
cfcli hl trajectory run 1 -r
287+
cfcli hlc trajectory run 1 -r
288288
289289
# Wait for trajectory to complete, then land
290290
sleep 10
291-
cfcli hl land
291+
cfcli hlc land
292292
```

examples/trajectories/cube.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
#
1212
# Usage:
1313
# cfcli trajectory upload examples/cube.yaml
14-
# cfcli hl arm
15-
# cfcli hl takeoff 0.5
14+
# cfcli hlc arm
15+
# cfcli hlc takeoff 0.5
1616
# sleep 3
1717
# cfcli trajectory run 1 -r
1818
# sleep 13
19-
# cfcli hl land
19+
# cfcli hlc land
2020

2121
segments:
2222
# Segment 1: (0.15, 0.15, 0.3) -> (-0.15, 0.15, 0.3) - top front edge, move left

examples/trajectories/square.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
#
1313
# Usage:
1414
# cfcli trajectory upload examples/square.yaml
15-
# cfcli hl arm
16-
# cfcli hl takeoff 0.5
15+
# cfcli hlc arm
16+
# cfcli hlc takeoff 0.5
1717
# sleep 3
1818
# cfcli trajectory run 1 -r # -r for relative position
1919
# sleep 9
20-
# cfcli hl land
20+
# cfcli hlc land
2121

2222
segments:
2323
# Segment 1: (0.25, 0.25) -> (-0.25, 0.25) - move left

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ enum Commands {
204204
},
205205

206206
/// High-level commander operations (takeoff, land, go-to, trajectory, etc.)
207-
Hl {
207+
Hlc {
208208
#[clap(subcommand)]
209209
command: HlCommands,
210210
},
@@ -1195,7 +1195,7 @@ async fn main() -> Result<()> {
11951195
}
11961196
}
11971197
},
1198-
Commands::Hl { command } => {
1198+
Commands::Hlc { command } => {
11991199
// Handle trajectory display with file separately (no connection needed)
12001200
if let HlCommands::Trajectory { command: TrajectoryCommands::Display(params) } = &command {
12011201
if let Some(file_path) = &params.file {

0 commit comments

Comments
 (0)