Task 0 — Instructions
Procedure
Section titled “Procedure”1. Install Ubuntu 22.04
Section titled “1. Install Ubuntu 22.04”If Ubuntu 22.04 is already on the machine, skip to step 2.
| Resource | Link |
|---|---|
| Download ISO | ubuntu-22.04.5-desktop-amd64.iso |
| Installation walkthrough | Install Ubuntu Desktop — Canonical |
Follow Canonical’s tutorial screen by screen. One choice in it matters for this theme: take Normal installation, not Minimal.
Then confirm the version:
lsb_release -aRelease must say 22.04 and Codename must say jammy. Anything else and you are on an untested setup — the versions of Python and the system libraries differ, and e-Yantra cannot support it.
Finally, update the fresh system:
sudo apt updatesudo apt upgrade2. Install MuJoCo 3.11
Section titled “2. Install MuJoCo 3.11”MuJoCo — Multi-Joint dynamics with Contact — is the physics engine that runs the maze. This theme uses MuJoCo 3.11, installed through its official Python bindings.
Install the Python toolchain
Section titled “Install the Python toolchain”Ubuntu 22.04 ships Python 3.10, which is what this theme uses. You only need pip:
sudo apt updatesudo apt install python3-pippython3 --version # 3.10.xpip3 --versionInstall MuJoCo
Section titled “Install MuJoCo”Install the exact version — not the latest:
pip3 install mujoco==3.11.0Verify MuJoCo
Section titled “Verify MuJoCo”Check the version Python reports:
python3 -c "import mujoco; print(mujoco.__version__)"It must print 3.11.0. Then open the interactive viewer:
python3 -m mujoco.viewerA window should open with an empty scene, a grid floor, and the control panels down the left side. Dragging with the mouse should orbit the camera.
To confirm the physics engine itself is stepping — not just the window drawing — open the Simulation panel on the left and use its pause/play button (the space bar does the same). The simulation time next to it should climb while it is running and freeze the moment you pause. If the window opens but that clock never moves, the viewer is up but the engine is not stepping.
3. Install MQTT
Section titled “3. Install MQTT”MQTT is the messaging layer between your code and the simulation. You need two pieces: the broker that routes messages, and the Python client your code will use.
Install the broker
Section titled “Install the broker”Mosquitto is the broker this theme uses:
sudo apt updatesudo apt install mosquitto mosquitto-clientsThe service starts on install. Confirm it, and make it start on every boot:
systemctl status mosquittosudo systemctl enable mosquittoActive: active (running) is what you want. Press q to exit the status view.
Verify a message goes through
Section titled “Verify a message goes through”This needs two terminals. In the first, subscribe to a test topic and leave it running:
mosquitto_sub -h localhost -t eyrc/pacbot/testIn the second, publish to the same topic:
mosquitto_pub -h localhost -t eyrc/pacbot/test -m "hello pacbot"hello pacbot should appear in the first terminal straight away. A publish that returns silently while the subscriber prints nothing means the broker is not running — check the status command above.
Install the Python client
Section titled “Install the Python client”pip3 install paho-mqttpython3 -c "import paho.mqtt.client; print('paho ok')"