# Build a Quadruped Simulation in MuJoCo in One Prompt
> A quadruped has dozens of joints to configure before it can stand in a sim. See how Drift builds a quadruped simulation in MuJoCo from a single prompt.
**Author:** Drift Team
**Published:** 2026-06-30
**Tag:** Product
**Reading time:** 4 min
**Canonical URL:** https://godrift.ai/blogs/quadruped-simulation-mujoco
---Testing controllers and training gaits on a four-legged robot all starts in the same place: a working simulation.

<figure data-type="youtube-embed" data-yt-id="GLe3oGbrnUI" data-autoplay="1" data-loop="1">
  <iframe src="https://www.youtube.com/embed/GLe3oGbrnUI?autoplay=1&mute=1&loop=1&playlist=GLe3oGbrnUI&rel=0&playsinline=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen loading="lazy"></iframe>
</figure>

Quadruped robots, the four-legged machines made famous by Boston Dynamics and Unitree, are everywhere in robotics right now. But before you can train one or test a new controller, you need a working simulation to build on. This walkthrough creates a quadruped simulation in MuJoCo, and rather than wiring it together by hand, we hand the setup to [Drift](https://link.godrift.ai/quad-sim) and start from one simple prompt.

## Why a quadruped project starts with simulation

&nbsp;

A four-legged robot is a complicated machine: many joints, many actuators, and contact with the ground at every step. Testing controllers or training gaits directly on hardware is slow, expensive, and risky. A simulation lets you iterate safely and quickly, which is why nearly every quadruped project, from research labs to companies like Boston Dynamics and Unitree, begins in a [physics engine like MuJoCo](https://www.godrift.ai/blogs/what-is-mujoco).

&nbsp;

The friction is the setup. Getting a quadruped model, its dependencies, and a launchable scene working together is the kind of task that eats your first session before any real work starts.

## Generating a quadruped simulation in MuJoCo with Drift

&nbsp;

Instead of assembling all of that manually, we initialize [Drift](https://link.godrift.ai/quad-sim) and keep the prompt simple. The goal is a quadruped simulation we can launch and explore in MuJoCo. If you don't have MuJoCo set up yet, here's [how to install MuJoCo in one prompt](https://www.godrift.ai/blogs/install-mujoco) first.

&nbsp;

Here's what Drift handles, in order:

- **It sets up the project:** [Drift](https://link.godrift.ai/quad-sim) scaffolds the project structure for the simulation, so the model and scene files sit where they belong.
- **It installs the required dependencies:** The supporting packages get pulled in automatically, so there's no separate round of chasing missing requirements.
- **It prepares the simulation files: **The robot description and scene are generated and wired together into something launchable.
- **It launches MuJoCo: **Once everything is ready, the simulator opens with the quadruped loaded.

## Exploring the quadruped model in MuJoCo

&nbsp;

And there it is: the quadruped, loaded inside MuJoCo. From here you can inspect the robot, rotate the camera, and see how the different joints and actuators are configured.

&nbsp;

MuJoCo also lets you interact with the model in real time. You can grab and move parts, test joints, try the controls, and get a feel for the overall robot structure before you write a single line of control code.

## Where to take your quadruped simulation next

&nbsp;

A loaded, working simulation is a solid starting point for more advanced quadruped behaviors. From here you can add controllers, experiment with different gaits, or train reinforcement learning policies for locomotion, the same path used to teach real four-legged robots to walk and recover.

&nbsp;

If you want ready-made four-legged models to drop in, the [MuJoCo Menagerie](https://github.com/google-deepmind/mujoco_menagerie) collection includes high-quality quadrupeds like the Unitree Go1 and Go2, ANYmal, and Boston Dynamics Spot. And for reinforcement learning, these models are commonly trained using Gymnasium's [quadruped environment setup](https://gymnasium.farama.org/tutorials/gymnasium_basics/load_quadruped_model/).

&nbsp;

A single prompt took this from an empty project to a quadruped you can inspect and control. From here, load a model from Menagerie, try a gait, or start a training run. The full build is in the video above.

## FAQ

1. **How do you create a quadruped simulation in MuJoCo?** You need a quadruped model, its dependencies, and a launchable scene configured together. In this walkthrough, [Drift](https://link.godrift.ai/quad-sim) handles all of that from a single prompt, setting up the project, installing dependencies, preparing the simulation files, and launching MuJoCo with the robot loaded.
2. **What is a quadruped robot?** A quadruped is a four-legged robot, with each leg typically having multiple joints and actuators. Well-known examples include Boston Dynamics Spot and Unitree's Go1, Go2, and A1, which are widely used in research and increasingly in industry.
3. **Where can I find quadruped models for MuJoCo?** The MuJoCo Menagerie, curated by Google DeepMind, provides high-quality quadruped models in MJCF format, including the Unitree Go1, Go2, and A1, ANYmal B and C, and Boston Dynamics Spot, all ready to load in MuJoCo.
4. **Can you train reinforcement learning policies on a quadruped in MuJoCo?** Yes. MuJoCo is a popular choice for training quadruped locomotion policies. Using Gymnasium's Ant-v5 framework with a quadruped model, you can train gaits and behaviors, and many of these policies transfer to real hardware.
5. **What does Drift do for a quadruped simulation?** Drift initializes the project, installs the required dependencies, prepares the simulation files, and launches MuJoCo with the quadruped loaded, all from a natural-language prompt, so you skip the setup and get straight to developing behaviors.

## Related reading

- [MuJoCo: The Physics Engine Robotics Research Quietly Runs On](https://www.godrift.ai/blogs/what-is-mujoco)
- [Install MuJoCo and Run Your First Simulation Without the Setup Grind](https://www.godrift.ai/blogs/install-mujoco)
- [Robot Simulators, Compared: Which One Should You Actually Use?](https://www.godrift.ai/blogs/best-robot-simulators-ros2)
- [Swarm Robotics: Why a Thousand Simple Robots Beat One Smart One](https://www.godrift.ai/blogs/swarm-robotics)
