Move a robot with a timed command
The robot receives a speed command for two seconds without checking its position. A weaker drive travels less, even though the command stays the same.
Try the controller
Run the robot. Change one setting and try again.
Go2 test lane
The 3D workspace loads when it comes into view.
More controls
Position 0.000 m · actual velocity 0.000 m/s · limited command 0.000 m/s
The robot is at 0.000 m at simulation time 0.0 s. The orange line marks the 1 m target; it is not a physical barrier. Run the experiment or scrub time below.
2D reference and fallback
Model, units, and limits
A one-dimensional model of the Go2's forward motion, integrated every 0.02 s. The drive approaches its requested speed with a 0.4 s lag: acceleration = (efficiency × command + disturbance − velocity) / 0.4. The command is limited to ±0.80 m/s. A timed command requests 0.50 m/s for 2 s, then zero. Feedback requests Kp × position error + Ki × accumulated error − Kd × measured velocity.
The accumulated error is clamped to ±2 meter-seconds. This simple clamp is not a complete anti-windup design. Delay applies to measured position and velocity; before a past sample exists, the measurement stays at the starting state. The disturbance is a speed bias, not a force in newtons. No friction, foot slip, sensor noise, or hardware safety system is modeled. The legs are animated from the distance covered, using the Go2's real link lengths; balance and walking are not simulated.
Optional reasoning check
Opening the Python editor…
Requirements and learning goals
Before you start
- A browser with JavaScript enabled
- No coding, installation, or robot required
You will be able to
- Distinguish a speed command from actual motion
- Predict how drive efficiency changes a timed move
- Explain why motion continues after a command stops
A robot cannot reach a position merely because we asked it to move. Its drive must turn a command into motion, and that response takes time. In this lesson, a simulated Go2 robot dog starts at position 0 meters. We want it to finish at 1 meter. We will command 0.50 meters per second for two seconds, then command zero.
This is open-loop control: the command follows a timer without checking the robot's position. The position is displayed for us, but the timer does not use it. That distinction matters. A measurement on a dashboard does not automatically make a controller use .
Allow about 10 minutes for the experiment. Everything runs in this page. The Go2 on screen follows a simplified one-dimensional model: its forward speed approaches the commanded speed with a lag. Its legs are animated to match the distance traveled. This is not a simulation of walking and not a hardware controller.
Try it
Press Run experiment to watch the robot. Drive efficiency changes how much of the commanded speed the drive produces. Open More controls for additional settings and Inspect time. The position trace is in 2D reference and fallback. Changing a setting pauses and resets the run.
- Select Reset this lesson. Leave drive efficiency at 1.00 and inspect time at 12 seconds.
- Read the final position and error below the scene. In 2D reference and fallback, the dashed line is the 1-meter target and the orange curve is actual position over time.
- Move Inspect time to 2.0 seconds. Compare the position and actual velocity with the final result. Then move it to 2.1 seconds and check the limited command.
- Before touching efficiency, predict what a drive efficiency of 0.60 will do. Try the change, then compare the final result. The reasoning check is optional.
- Set efficiency to 0.60, return the time slider to 12, and check your prediction.
Every control change recomputes the whole 12-second experiment. The time slider inspects that calculation; it does not send a command to a real device.
Work through the distance
With a perfect instantaneous response, distance would be speed multiplied by time: 0.50 m/s × 2 s = 1.00 m. Our drive has a 0.4-second velocity lag. It accelerates toward the requested speed and decelerates after switch-off. By the end of this longer run, the starting shortfall and later coast balance to almost 1 meter.
At efficiency 0.60, the drive approaches 60% of the requested speed. The final distance becomes 0.50 × 2 × 0.60 = 0.60 meters. The timer has no way to notice the missing 0.40 meters.
Check the expected results
After resetting, expect approximately 0.811 meters at 2.0 seconds, with the robot still moving. At 2.1 seconds the command is zero, but actual velocity remains positive. At 12 seconds the final position rounds to 1.000 meters.
At efficiency 0.60, expect about 0.487 meters at 2.0 seconds and 0.600 meters at 12 seconds. These are results from the stated model and time horizon. They are not universal stopping distances for a physical robot.
Change one thing
Predict the final position at efficiency 0.80 before moving the slider. You should get 0.800 meters after 12 seconds. Explain why increasing the run's displayed inspection time cannot make a finished timer correct the error.
You have completed this lesson when you can distinguish the requested speed, actual velocity, and final position, and explain the 0.40-meter shortfall at efficiency 0.60.
Troubleshooting
If the chart does not change, enable JavaScript and use the sliders' arrow keys. Reset restores the fixed timer. If your answer differs from the expected final distance, check the time slider: the 2-second position excludes most of the coast. Values are rounded for display.
The feedback lesson uses the measured position to decide what command to send next.
Before you move on
Can you do each of these?
- Distinguish a speed command from actual motion
- Predict how drive efficiency changes a timed move
- Explain why motion continues after a command stops
0 of 2 checkpoints solved. Try checkpoint 1