---
title: Program a simulated robot
description: Watch a Go2 walk, edit a Python patrol app, and deploy your own route.
---

You'll run a simulated Go2 on your computer, then change its patrol route in Python.
You do not need a physical robot, a Cloud account, or Python installed locally.

<Figure src="/latest/images/get-started/simulated-go2.webp" alt="A simulated Unitree Go2 walking across a grid floor in the browser 3D viewer, with lidar rings drawn around it" caption="The simulated Go2 in the browser viewer. By the end of this page it walks a route you wrote." />

## Before you start

Use macOS or Linux with enough memory to give the VM 4 GiB and four virtual CPUs.
Allow several minutes for the first downloads and build, plus disk space for OS
and container images. Apple Silicon runs the VM with hardware acceleration;
x86 computers use slower emulation.

On macOS, install [Homebrew](https://brew.sh) if you do not have it. Wendy offers
to install Docker Desktop and QEMU through Homebrew. On Linux, install and start
[Docker with Buildx](https://docs.docker.com/get-started/get-docker/) first;
Wendy offers to install QEMU through apt-get or dnf.

Windows users can follow the [app tutorial in WSL2](../../getting-started/app/).

## 1. Install Wendy

Run these commands in a terminal on your computer, or skip this step if `wendy --version` already works:

```bash
curl -fsSL https://install.wendy.dev/cli.sh | bash
wendy --version
```

You should see a version number. If the command is not found, open a new terminal and retry.

## 2. Watch the first walk

```bash
wendy tour --simulator
```

Accept the dependency installation prompts if needed. Wendy creates a Go2 virtual
device and opens its 3D viewer in your browser. The robot walks an arc for five
seconds, then stops. Wendy checks that its position changed and movement stopped.
Keep the terminal open for the next step.

<Asciicast src="/latest/casts/getting-started/robot-tour.cast" title="wendy tour --simulator" start={0} end={7.5} cols={88} rows={24} caption="The tour starts the simulator, walks the robot for five seconds and checks that it moved. The first run takes longer while it downloads and builds." />

<Figure src="/latest/images/get-started/robot/viewer-first-walk.webp" alt="The Wendy simulator page in a browser, showing a Go2 robot mid-stride in a room with lidar rings around it and the status moving" caption="The viewer opens in your browser. The status in the corner reads moving while the robot walks." />

<Frames columns={3}>
  <Frame src="/latest/images/get-started/robot/walk-start.webp" alt="The simulated Go2 setting off from the left of the room" caption="Setting off" />
  <Frame src="/latest/images/get-started/robot/walk-middle.webp" alt="The simulated Go2 part way through a curved walk" caption="Walking an arc" />
  <Frame src="/latest/images/get-started/robot/walk-end.webp" alt="The simulated Go2 standing still in the middle of the room" caption="Stopped after five seconds" />
</Frames>

If setup fails, fix the issue shown in the terminal and choose retry. See
[simulator troubleshooting](../../installation/wendyos-virtual-machine/#troubleshooting)
for startup problems. Repeating the command reuses your saved virtual device.

## 3. Write your robot's route

In the terminal, choose **Build a robot app**, then **Waypoint patrol**.
Wendy creates a Python project and prints the path to `patrol.py`. Open that file
in your editor. The default project is under
`~/Documents/wendy-robot-tour/apps/patrol`.

<Asciicast src="/latest/casts/getting-started/robot-tour.cast" title="wendy tour --simulator" start={7.5} end={13} cols={88} rows={24} caption="Build a robot app, then Waypoint patrol, creates the project and prints the path to patrol.py." />

Find `DEFAULT_WAYPOINTS`. Change the pair `(1.0, 1.0)` to `(1.5, 1.0)` and save.
Each pair is a distance forward and left in metres, relative to the robot's
starting position. This extends one corner of the default square by half a metre.

```diff title="patrol.py"
-DEFAULT_WAYPOINTS = ((1.0, 0.0), (1.0, 1.0), (0.0, 1.0), (0.0, 0.0))
+DEFAULT_WAYPOINTS = ((1.0, 0.0), (1.5, 1.0), (0.0, 1.0), (0.0, 0.0))
```

Choose **Deploy to this simulator**, then **Start route**. Deployment alone does
not start movement. Watch the robot follow the route in the same browser viewer
and stop when it finishes. Your Python app chooses the route; the simulator
handles balance and walking.

<Asciicast src="/latest/casts/getting-started/robot-tour.cast" title="wendy tour --simulator" start={13} end={20} cols={88} rows={24} caption="Deploy builds and starts your app. Start route sends the robot off." />

<Frames>
  <Frame src="/latest/images/get-started/robot/route-leaving.webp" alt="The simulated Go2 walking away from its starting point" caption="Leaving the start" />
  <Frame src="/latest/images/get-started/robot/route-far-side.webp" alt="The simulated Go2 on the far side of its route" caption="On the far side of the route" />
  <Frame src="/latest/images/get-started/robot/route-turning-back.webp" alt="The simulated Go2 turning back toward its starting point" caption="Turning back" />
  <Frame src="/latest/images/get-started/robot/route-finished.webp" alt="The simulated Go2 standing still near its starting point" caption="Stopped back near the start" />
</Frames>

## 4. Deploy another change

Change `(1.5, 1.0)` back to `(1.0, 1.0)` and save. Choose **Deploy saved changes**,
then **Start route** again. This time, the requested route is a one-metre square.
You have now edited, deployed, and run your own robot app twice.

<Asciicast src="/latest/casts/getting-started/robot-tour.cast" title="wendy tour --simulator" start={21.5} end={29.5} cols={88} rows={24} caption="Deploy saved changes rebuilds the app with your edit, and Start route runs it again." />

If the robot does not move, check the terminal for a route error and release any
manual controls in the viewer before retrying.

## 5. Stop and resume

Return to the main guide, choose **Finish for now**, and choose to stop the
simulator. Your project and edits stay on disk. If you exit with Ctrl+C instead,
use the `wendy vm stop` command printed by the tour to shut down the VM too.

<Asciicast src="/latest/casts/getting-started/robot-tour.cast" title="wendy tour --simulator" start={34} end={51.7} cols={88} rows={24} caption="Finish for now, then Stop the simulator, shuts the VM down and prints the command to come back." />

To return later:

```bash
wendy tour --simulator
```

Choose **Build a robot app** and **Waypoint patrol** again to reopen your saved project.

## Next steps

- Try **Obstacle-aware roaming** in the same guide to make the robot react to lidar readings. The [tour reference](../../advanced/clients/wendy-cli/commands/tour/) explains the other projects and movement settings.
- [Deploy your first app](../../getting-started/app/) to use the same edit-and-deploy loop with a web server.
- When you have a robot, follow [sim to real](../../integrations/sim-to-real/) to move your app onto hardware.
