Concept Flow - Sending velocity commands
Start
Set velocity values
Send velocity command to drone
Drone moves accordingly
Check if more commands
Repeat
The flow shows setting velocity, sending it to the drone, drone moves, then repeats or stops.
velocity_x = 1.0 velocity_y = 0.0 velocity_z = 0.5 send_velocity(velocity_x, velocity_y, velocity_z) # Drone moves forward and up
| Step | Action | Velocity (x,y,z) | Drone Response | Notes |
|---|---|---|---|---|
| 1 | Set velocity_x | (1.0, -, -) | No movement yet | Velocity x set to 1.0 |
| 2 | Set velocity_y | (1.0, 0.0, -) | No movement yet | Velocity y set to 0.0 |
| 3 | Set velocity_z | (1.0, 0.0, 0.5) | No movement yet | Velocity z set to 0.5 |
| 4 | Send velocity command | (1.0, 0.0, 0.5) | Drone moves forward and up | Command sent to drone |
| 5 | Check for more commands | (1.0, 0.0, 0.5) | Movement continues | Loop or stop decided here |
| 6 | Stop sending commands | (0.0, 0.0, 0.0) | Drone stops moving | Velocity zero to stop |
| Variable | Start | After Step 1 | After Step 2 | After Step 3 | After Step 4 | Final |
|---|---|---|---|---|---|---|
| velocity_x | undefined | 1.0 | 1.0 | 1.0 | 1.0 | 0.0 |
| velocity_y | undefined | undefined | 0.0 | 0.0 | 0.0 | 0.0 |
| velocity_z | undefined | undefined | undefined | 0.5 | 0.5 | 0.0 |
Sending velocity commands: - Set velocity_x, velocity_y, velocity_z variables - Use send_velocity(x,y,z) to command drone - Drone moves according to velocities - Repeat commands to update movement - Send zero velocities to stop drone
send_velocity(x_speed, y_speed, z_speed, duration)send_velocity(0, -3, 0, 4)
send_velocity(1, 0, 0)
Pass the test and this pattern moves unknown