The AI learns by trying things, and most of its tries go wrong. On the real robot every wrong try costs your time and risks the furniture. In a simulator it costs nothing, it can run all night, and the simulator knows where every object really is, so it can score each answer. This chapter puts a copy of the robot into NVIDIA Isaac Sim on your PC, gives the AI the same body calls it uses on the real robot in chapter 13, and sets up a loop that lets it practise and train without anyone watching.
I built all of this on my PC and didn't run it again from scratch for this guide, so the numbers here come from the logs and test files on my PC. The commands run from the clone of the repo in ~/lightbot-repo on your PC that chapter 13 describes, which no chapter makes with a tested step.
Isaac Sim needs a strong NVIDIA card. Mine is an RTX 5070 Ti with 16 GB, and it runs two simulator instances at once. Each takes 2.5 to 3.5 GB of the card's memory, so plan the card's memory before you load models beside them.
Isaac Sim comes as a container image from NVIDIA's registry. Versions released before the RTX 50 series don't run on those cards: I pulled 5.0.0 first, 23.1 GB, and it crashed in its renderer. Version 6.2.0 runs. The image is 31.9 GB. On your PC:
docker pull nvcr.io/nvidia/isaac-sim:6.2.0
mkdir -p ~/isaac/cache/{kit,ov,pip,glcache,computecache} ~/isaac/kitlogs ~/isaac/data ~/isaac/work
The container starts only with ACCEPT_EULA=Y, which accepts NVIDIA's licence, so read it first. The scripts also set PRIVACY_CONSENT=N, which declines NVIDIA's data collection. Even so, the first crash on my PC sent a crash report to NVIDIA, so scene.py now starts Isaac Sim with its crash reporter switched off.
To check the download I ran a headless start with a ground plane and 100 physics steps, and it printed ISAAC_OK steps=100. That little test script isn't in the repo, so for you the first real start is the window below.
My PC runs KDE on Wayland, and Isaac Sim draws through Xwayland. The container runs as user ID 1234, so brain/sim/isaac/gui.sh finds the display and its key from the running Xwayland, gives that user read access, and starts the container with ~/isaac/work as /work, and your clone ~/lightbot-repo and the furniture models in ~/gz-models (below) mounted read-only inside it. The scripts run from ~/isaac/work, so copy them there:
cp ~/lightbot-repo/brain/sim/isaac/gui.sh ~/isaac/ && mkdir -p ~/isaac/work/robot ~/isaac/work/tour
cp ~/lightbot-repo/brain/sim/isaac/{scene,tour,room_usd,body_bridge,ros_stubs}.py ~/isaac/work/
cp ~/lightbot-repo/brain/sim/isaac/import_robot.py ~/isaac/work/robot/
Then start the plain window, or a script with a window:
~/isaac/gui.sh # the plain Isaac Sim window
~/isaac/gui.sh /work/scene.py --tour # a script with a window (below)
The second line needs the room folder ~/isaac/work/room/, and no step in this guide makes it; the tour below says what goes in it. If the log says "Authorization required", the display key is stale. Xwayland makes a new one at every login, and gui.sh reads it fresh at every start. A second viewport window crashed Isaac Sim 6.2 in the NVIDIA driver on my PC, so scene.py opens none. To see through the robot's camera, pick arm_camera in the viewport's camera menu instead.
Isaac Sim scenes are USD files, a format from Pixar that describes a tree of shapes, meshes, cameras and joints with their positions, materials and physics. The room and the robot are two separate USD files.
The AI practises mostly in generated rooms. brain/sim/gz/gen_room.py makes a new room from a seed number: walls, furniture and small things to find, each in a different place every time. That stops the AI from learning one room by heart. The rooms are named after their seed, such as gen-5003, a kids' room with 24 models.
There's also a model of my own room, written as code in brain/sim/gz/make_world.py: straight walls fitted by eye to the robot's map, and furniture placed by eye, known to about 0.3 m. It's in the same frame as the robot's map, so a place in the simulated room is the same place in the real one. The scripts call it owner. For your own room you would rewrite that layout from your own map. I haven't done that for a second room, and chapter 9 has no tested way to make the map.
The room builders write an SDF file, the format of the older Gazebo simulator this project used first, and room_usd.py converts it to one USD stage. brain/sim/isaac/up.sh does both when it starts a simulator in a room. It runs the builders inside the Gazebo image lightbot-gz:humble, built from brain/sim/gz/Dockerfile, and they take some furniture meshes from ~/gz-models. Those come from Gazebo Fuel; brain/sim/gz/FUEL.md lists each one with its download address and licence, and each zip goes unpacked into its own folder ~/gz-models/<maker>/<name>/. I built the image with the clone in another folder, so this command, pointed at ~/lightbot-repo, wasn't run as written:
docker build -t lightbot-gz:humble ~/lightbot-repo/brain/sim/gz
The robot's description file, ros2/rosorin_base/urdf/rosorin.urdf, has the factory joints and measured collision boxes but no visual shapes and no wheels. robot_urdf.py rewrites it for NVIDIA's importer: the chassis as three boxes, the arm, gripper and camera as boxes you can see and touch, the claw's two jaws, a frame for the LiDAR, and four mecanum wheels.
A mecanum wheel has small rollers at 45 degrees around its rim. In the simulator each wheel is a hub on a motor joint with 12 free rollers. Only the rollers touch the floor, and their angles make the robot slide sideways when the wheels turn against each other.
cd ~/lightbot-repo && python3 brain/sim/isaac/robot_urdf.py ros2/rosorin_base/urdf/rosorin.urdf ~/isaac/work/robot/lightbot.urdf
docker exec isaac-gui /isaac-sim/python.sh /work/robot/import_robot.py /work/robot/lightbot.urdf /work/robot/usd
The importer writes usd/lightbot/lightbot.usda. The arm joints get position drives of 300 Nm/rad. With 30, joint 3 sagged under gravity. The arm's links also have gravity switched off, because the real servos hold their pose and, with gravity on, arm moves missed their arrival.
A wheel test, three seconds per command, should drive the right way. It loads the room from ~/isaac/work/room/room.usda. No step in this guide makes that folder or its files, so the wheel test can't run as written; the tour below says what goes in it. On my PC, scene.py --wheeltest --headless drove 0.408 m forward at 0.15 m/s, 0.402 m to the left at 0.15 m/s with 1 mm of forward drift, and turned 2.04 rad at 0.8 rad/s. The shortfall is the wheels spinning up.
The wheel size, wheelbase and track come from the factory's chassis code. Where the wheels sit under the body, the body's height over the floor and the rollers' grip were never measured on the real robot.
The simulated robot has the real robot's arm joints, with the same limits from arm_limits.yaml, and the real driver's arm model, which refuses poses that would put the arm into the robot itself. It has the wrist camera with colour and depth at 640 by 400, and a 400-ray LiDAR.
It has a claw, and the claw can hold a small object, but not the way a real claw does. The claw's pulse runs from 131 open to 631 closed, as on the real robot, and the simulated jaws follow it, opening to 6 cm. When the claw closes to 450 or more with a small movable thing within 6 cm of its tip, one whose narrow side is 8 cm or less, the code attaches the thing to the tip and carries it along until the claw opens past 300. There's no physics grip. The real claw's opening was never measured; the 6 cm jaw opening is an assumption.
The simulated body has no tuck command. On the real robot the arm folds away into a tuck pose; in the simulator the arm only has its rest pose and the poses you send it.
The LiDAR sees one plane 13 cm above the floor, so a mug on the floor is under it. On the real robot only the wrist camera's depth sees it. The simulator uses NVIDIA nvblox for that: it builds a 3D map from the depth images on the GPU, cutting space into 2 cm cubes and storing in each the distance to the nearest surface the camera saw. The surface cubes between 2.5 and 40 cm above the floor are what the chassis can hit, and they go into the planner. So that the camera sees the floor ahead, every drive puts the arm in the drive pose first, with the camera looking 29 degrees down.
Build nvblox's image once. It downloads about 4.5 GB and takes 14.4 GB on disk:
cd ~/lightbot-repo/brain/sim/isaac/nvblox && docker build -t lightbot-nvblox:0.0.10 .
docker run --rm --gpus all -w /tmp lightbot-nvblox:0.0.10 bash -c \
'cp -r /opt/nvblox-src/nvblox_torch/nvblox_torch/tests /tmp/t && python3 -m pytest -q -p no:cacheprovider /tmp/t'
I got 84 passed, 2 skipped and 4 failed. The four failures are sample images the clone leaves as Git LFS placeholders, not real failures. up.sh starts the map service for each simulator by itself. With a 9.5 cm mug 0.6 m ahead, the robot without nvblox hit it after 0.33 m; with nvblox it drove around it to its goal, two runs out of two.
Before giving the simulated robot to the AI, watch it drive with plain code. scene.py --tour isn't the AI. At each stop the arm pans the camera, the base turns half a turn and pans again, and then it drives to the reachable stop that would show the most of the room it hasn't seen.
~/isaac/gui.sh /work/scene.py --tour --log /work/tour/tv.jsonl
The tour and the wheel test read the room from ~/isaac/work/room/: room.usda, and the LiDAR-plane map gz_room.yaml with its gz_room.pgm. No step in this guide creates that folder, so the command above has no room to load until you make it yourself. I made mine by hand with the room builders and room_usd.py, and those steps aren't in this guide. up.sh, below, writes the same kinds of files into ~/isaac/work/run/ instead, and I haven't run the tour from those.
My full round, run off-screen, took 10 stops and 16.56 m, saw 98.8 % of what can be seen from the floor, and touched nothing. It needed two fixes first. The chassis brushed an office chair while turning with 0.20 m of clearance, so the clearance is now 0.25 m. And a laptop's 2 cm base was under the LiDAR's plane, so the tour also plans around every object lower than 0.35 m, taken from the simulator's own record of the room.
The AI talks to the simulated robot through mind/gz_body.py, which answers the same body calls as RealBody on the real robot. up.sh builds a room and starts a simulator in it, off-screen. The instance with no number runs as isaac-gui in ~/isaac/work/run, and instance 2 as isaac-body-2 in ~/isaac/work/run-2, each with its own nvblox map and caches. The window from gui.sh uses the name isaac-gui too, so starting the instance with no number closes that window.
cd ~/lightbot-repo && LBGZ_INSTANCE=2 LBGZ_ROOM=gen-5003 bash brain/sim/isaac/up.sh
It should end with isaac-body-2 up in gen-5003. On my PC it built the room and started the body in 66 seconds, with the robot at the room's charger. Then run the free mind in it for 30 simulated minutes:
cd ~/lightbot-repo && LBGZ_RUN=$HOME/isaac/work/run-2 LBGZ_UP=$HOME/lightbot-repo/brain/sim/isaac/up.sh \
LBGZ_SIM=isaac MIND_MODEL=mine python3 -m mind.mind_free --body mind.gz_body:GzFresh --detector boxes \
--minutes 30 --seed 501 --log mind/logs/isaac/mine-seed501.jsonl
MIND_MODEL=mine picks the AI's own trained model, mind-7b, served by LM Studio on your PC, under its key in mind/machines.json (chapter 13). Chapter 12 has no tested way to make the first mind-7b, so you won't have it, and I haven't run this line with any other model. If the first look reports that the simulation clock stalled, the room's first frames are still compiling their materials; up.sh waits for one camera frame before it reports the body up. If every step says "Connection refused", LM Studio's server has stopped. If an instance hangs at startup, busy on the CPU, it couldn't write its caches; each instance has its own cache folder, writable by user 1234.
mind/isaac_loop.py, run by a timer every 10 minutes, keeps the AI practising and training. While a training round runs, it does nothing. Once 8 practice rooms have finished, it turns the programs from those rooms that ran and gained something into training pairs. If they come to at least 100, counting the household-task pairs below, it starts a round: train a new model, test it in rooms it never trained in, and serve it only if it isn't worse. A round needs a current mind-7b; without one, consolidate.sh refuses to start (chapter 12). Otherwise the loop starts a practice room in a fresh generated room on each free instance.
Who writes the practice programs is set in ~/mind-train/phase.json. Left alone, the loop practises with a scripted teacher's programs. I set "isaac_practice": "free", "practice_model": "openai/gpt-oss-20b" and "practice_machine" to the machine that serves that model, so a stronger model writes them. The AI's own small model, trained only on template programs, wrote that template whatever it was asked. gpt-oss-20b, untrained, wrote what it was asked straight away. Household tasks from ALFWorld, a public set of 995 tasks, are turned into 157 "find X and check whether it is at Y" tasks and judged by the simulator's truth; correct answers with no contact become training pairs too.
Point the loop at Isaac Sim, start both instances and install the timer:
cd ~/lightbot-repo && python3 brain/sim/isaac/use_isaac.py --instances isaac-gui,isaac-body-2
LBGZ_ROOM=owner bash brain/sim/isaac/up.sh && LBGZ_INSTANCE=2 LBGZ_ROOM=owner bash brain/sim/isaac/up.sh
cp brain/sim/isaac/systemd/lightbot-mind-loop.* ~/.config/systemd/user/
systemctl --user daemon-reload && systemctl --user enable --now lightbot-mind-loop.timer
python3 -m mind.isaac_loop --dry
--dry should print 0/8 practice runs since the last round; 2 free instance(s) and the two rooms it would start, and systemctl --user list-timers should list lightbot-mind-loop.timer. The loop runs until you stop it:
systemctl --user disable --now lightbot-mind-loop.timer
The loop's rooms and training restart the simulators and end runs, so stop it before you do anything else with Isaac Sim. Most of its training rounds have failed; "Doesn't work yet" below says how.
The latest test of the model the loop serves was 8 runs in one room, 4 seeds run twice each. Each run found 17 to 27 of the room's 43 objects. 5 of the 8 runs touched nothing. The other 3 each had a contact: one with a chair, one with a laptop and one with a bar stool.
Single runs vary a lot. In earlier runs, one seed gave 19, 18 and 0 found with small changes in between, and the 0 was a habit: the model's favourite program began "if nothing is doubtful, stop", so with an empty memory it never looked. Judge a model over several runs, never one.
The window can also show the real robot. brain/sim/isaac/twin/ turns the window into a live copy of the robot in its room, drawn from what the robot believes: where it thinks it is, its map, its last picture with the AI's boxes, and what it remembers. Where the copy and the room disagree, the robot is wrong. Isaac Sim streams the window to a browser over WebRTC, which needs a TCP port for setting up the call and a UDP port for the video.
This part did run on the real robot. It needs the room model in the same frame as the robot's map, which is why my room is in code. The commands below start it in owner, my room. For your robot you'd need your own map and your own room model, and neither has a tested way to make it in this guide. The twin's scripts use my addresses unless two variables name others: LBGZ_TWIN_IP for your PC (PC_IP in twin.sh and up.sh) and REAL_ROBOT for the robot and its API port (ROBOT_WIFI_IP:8296 in real_feed.py). I never set either, so running the twin with other addresses is untested. Build the web viewer once, build your room last, then start the twin:
cd ~/lightbot-repo && bash brain/sim/isaac/twin/twin.sh build
LBGZ_ROOM=owner bash brain/sim/isaac/up.sh
bash brain/sim/isaac/twin/twin.sh real
twin.sh real doesn't return: it stays in the foreground after starting the feed, which itself keeps running in the background. Check it from a second shell with bash brain/sim/isaac/twin/twin.sh status, then open port 8210 on your PC's address in Chrome. A browser on another machine needs TCP port 8210 and UDP ports 47998, 48000, 48010 and 48020 open on your PC. On my robot the status showed body.json 0.0 s old ... source robot, the feed's delay was 68 ms in the median, and the view ran at 32 frames a second. The map's points lay on three of the room model's walls. On the fourth, many lay beyond the wall, and I don't know why. The camera picture had a pink cast in evening light, and so did the robot's own frame.
To send the AI's pictures, memory and questions to the view, start mind.live with LBGZ_TWIN set to port 8297 on your PC's address. The AI's questions to you appear in a panel at the bottom left of the page; type the answer and press Enter.
The stream has no password and no encryption, and anyone who opens the page can click Isaac Sim's menus and answer the robot's questions. Keep it on your home network. Nothing in the view moves the real robot.
Watch the card's memory. The twin's window takes 2.6 to 2.9 GB. When gpt-oss-20b (12.1 GB) and the vision model were both loaded, the twin's start crashed with NV_ERR_NO_MEMORY. Unload what you don't need first.
Nothing the AI learned here has been shown to carry over to the real robot. In chapter 13 it named things, answered a question from memory and drove itself once toward a goal, but no task it practised here has been done there from start to finish.
The AI has not been trained to pick anything up. The claw holds things only by the code attaching them, and the simulated body can't tuck the arm away.
The simulated wheels, the body's height and the rollers' grip are not measured against the real robot. Real depth noise, wheel slip and the battery are not modelled: the depth images get a made-up noise, not one measured on the real camera, and the battery is an estimate.
The training rounds mostly fail. Of the last 8 rounds, 6 failed in training and never reached the test (chapter 12). Rounds started by the timer crashed at the first training step with a cuDNN "Invalid handle" error. The one cause I found was my remote desktop software, which had put its own library in LD_PRELOAD in the systemd user environment. The round script mind/consolidate.sh and the loop's unit now clear LD_PRELOAD, but that hasn't been shown to fix the crashes.
The wheel test and the tour, as written here, read the room folder ~/isaac/work/room/, and no step in this guide makes it. The free-mind run and the loop's rounds use mind-7b, which chapter 12 has no tested way to make.
You're ready for the next chapter when ~/isaac/gui.sh shows the Isaac Sim window, LBGZ_INSTANCE=2 LBGZ_ROOM=gen-5003 bash brain/sim/isaac/up.sh ends with isaac-body-2 up in gen-5003, a mind_free run finishes its 30 simulated minutes and reports how many of the room's things it found if you have a mind-7b to serve, systemctl --user list-timers lists lightbot-mind-loop.timer, and you know how to stop the loop before you use the card for anything else. If you made the room folder in ~/isaac/work/room/ yourself, the wheel test should also drive forward, to the left and turn the right way, and a --tour round should end with no contacts.