Make a Tracked Robot Drive Straight

Build a browser robot simulator that uses encoder feedback to reduce drift.

Introduction

30 Second Summary

Even a robot told to drive straight can curve across the floor when one track grips less than the other. Without a repeatable test, the cause can feel like guesswork.

In this project, you will use Claude Code to build a tracked-robot simulator with HTML Canvas. The simulator reveals drift through virtual encoder counts before proportional feedback reduces it.

What You'll Build

A six-second test in Google Chrome shows your robot drifting away from the centerline before encoder correction pulls its path much straighter.

By the end of this project, you'll have:

  • A pointer-controlled joystick that drives the robot through mouse, trackpad, or touch input.
  • A weaker-track test that turns a 5 percent traction loss into visible open-loop drift backed by unequal encoder counts.
  • A before-and-after comparison that reports baseline drift, corrected drift, and percentage improvement from matching six-second tests.
  • Secret Mission: Test deliberate turning plus equal track slip to expose the controller's limits.

Are there any prerequisites?

You need macOS 13.0 or later or Windows 10 version 1809 or later.

Your computer also needs at least 4 GB of RAM, internet access, Google Chrome, and a paid Claude plan that includes Claude Code.

Before We Start

Before any tools enter the picture, lock in the evidence your simulator needs to show. This goal keeps the project focused on comparing open-loop drift with closed-loop correction.

Set Up Claude Code and Chrome

Your simulator will be created with Claude Code. You will test it locally in Google Chrome.

Before either tool touches the project, you need verified access plus an isolated folder. This boundary keeps the first coding prompt focused on the simulator.

In this step, get ready to:
  • Activate Claude Pro access.
  • Prepare Google Chrome for local browser testing.
  • Verify Claude Code inside an isolated Desktop folder.
Set up access and Chrome

Claude Code requires a paid plan. Claude Pro costs $20 per month before applicable tax.

A monthly subscription is a real commitment. You can cancel at least 24 hours before renewal to avoid the next charge.

  • Open the Claude pricing page in your current browser.
  • Create a Claude account from the sign-in page if you do not have one.
  • Sign in to your Claude account.
  • Choose Claude Pro with monthly billing.
  • Complete the checkout process.
  • Confirm that your account has active Claude Pro access.

Chrome opens the local simulator without a development server. Follow the tab for your computer.

macOS

  • Open the official Chrome installation page in your current browser.
  • Download the macOS installer from the page.
  • Open googlechrome.dmg from your Downloads folder.
  • Drag Chrome into the Applications folder.
  • Press Cmd + Space to open Spotlight.
  • Type Google Chrome into Spotlight.
  • Press Enter to open Chrome.
  • Confirm that you see a normal browser window.

Windows

  • Open the official Chrome installation page in your current browser.
  • Download the Windows installation file from the page.
  • Run the downloaded installer.
  • Follow the on-screen installation instructions.
  • Open Chrome when installation finishes.
  • Confirm that you see a normal browser window.

Chrome is ready to open the local simulator you build next.

Install and verify Claude Code

The native installer keeps Claude Code updated in the background. This project accepts version 2.1.322 or a newer native release.

macOS

  • Press Cmd + Space to open Spotlight.
  • Type Terminal into Spotlight.
  • Press Enter to open Terminal.
  • Install Claude Code by running this command:
curl -fsSL https://claude.ai/install.sh | bash

What Does This Installer Do?

This command downloads the recommended native Claude Code installer. Native installations update in the background.

  • Close the installer terminal after the command finishes.
  • Press Cmd + Space to return to Spotlight.
  • Type Terminal into Spotlight.
  • Press Enter to open a fresh terminal.

Windows

  • Press Win + X to open the system menu.
  • Choose Windows PowerShell or Terminal.
  • Confirm that the prompt begins with PS.
  • Install Claude Code by running this command:
irm https://claude.ai/install.ps1 | iex

What Does This Installer Do?

This command downloads the recommended native Claude Code installer for Windows. Native installations update in the background.

  • Close the installer terminal after the command finishes.
  • Press Win + X to return to the system menu.
  • Select Windows PowerShell or Terminal to open a fresh terminal.

Before you check, do you expect the fresh terminal to report the required release or an older version?

  • Check the installed Claude Code version by running:
claude --version

What Does This Check Prove?

The command confirms that your terminal can find Claude Code. Its output also identifies the installed release.

✔️ I see version 2.1.322 or higher

That installation is ready. You should see version 2.1.322 or higher followed by (Claude Code).

ⓧ I see an older version

  • Return to the installer tab for your operating system.
  • Run the same native installer command again.
  • Open a fresh terminal after installation finishes.
  • Repeat the version check shown above.

You should now see version 2.1.322 or higher followed by (Claude Code).

ⓧ Command not found

  • Return to the output from the native installer.
  • Apply the PATH fix printed by the installer.
  • Close the current terminal.
  • Open a fresh terminal.
  • Repeat the version check shown above.

Your fresh terminal should now report a version followed by (Claude Code).

Version Check Still Failing?

A terminal opened before installation may still use its old PATH. A fresh terminal loads the updated command location.

Help me fix my Claude Code installation.

Create the isolated project folder

Claude Code treats the current folder as its working boundary. An empty Desktop folder gives the coding session a clear place to create the simulator later.

macOS

  • Create the tracked-robot-simulator folder on your Desktop by running these commands:
cd ~/Desktop
mkdir tracked-robot-simulator
cd tracked-robot-simulator
pwd

What Do These Commands Do?

  • The first line moves the terminal to your Desktop.
  • The second line creates the project folder.
  • The third line moves the terminal into that folder.
  • The last line prints a path ending in tracked-robot-simulator.

Windows

  • Create the tracked-robot-simulator folder on your Desktop by running these commands:
Set-Location "$env:USERPROFILE\Desktop"
New-Item -Name "tracked-robot-simulator" -ItemType Directory
Set-Location "tracked-robot-simulator"
Get-Location

What Do These Commands Do?

  • The first line moves PowerShell to your Desktop.
  • The second line creates the project folder.
  • The third line moves PowerShell into that folder.
  • The last line prints a path ending in tracked-robot-simulator.

The first Claude Code launch prompts you to authenticate in your browser. The authenticated session starts inside the folder your terminal currently uses.

  • Start Claude Code from the current project folder by running:
claude

What Does This Command Do?

This command starts an interactive Claude Code session. The session uses tracked-robot-simulator as its working directory because your terminal is already inside that folder.

  • Complete authentication in the Chrome window using your Claude Pro account.
  • Switch back to the terminal after the interactive Claude Code session appears.

Before you send the first prompt, do you expect Claude Code to name your Desktop or the nested project folder as its working directory?

  • Send this bounded verification prompt in Claude Code by pasting the text below:
Tell me the full working directory you can currently access. Confirm that its final folder name is tracked-robot-simulator. Do not create, edit, move, or delete any files yet.

Why Start With a Bounded Prompt?

The prompt asks Claude Code to report its current boundary before making changes. It explicitly blocks file creation plus every other file operation.

This gives you evidence that the coding session is attached to the correct empty folder. The first simulator files remain reserved for the next step.

You should see a reply naming a working directory that ends in tracked-robot-simulator. The folder remains empty because the prompt forbids file changes.

Your verified empty workspace is ready. Next up, Claude Code creates the first drivable version of your tracked robot.

Drive the First Virtual Robot

Your empty project folder gives Claude Code a safe boundary. The next useful proof is a robot you can actually drive.

This small simulator gives you an early visible win before drift becomes the lesson. Its joystick will control a robot drawn on an HTML Canvas.

In this step, get ready to:
  • Generate the three simulator files through a bounded Claude Code prompt.
  • Confirm that Claude Code created only the allowed files.
  • Drive the robot in your browser.
Create the First Simulator

A bounded prompt sets an exact file boundary. It also keeps later control features out of this first build.

  • Create the first simulator by pasting this prompt into the Claude Code session from earlier:
Create the smallest visible first version of a local tracked-robot simulator. You may create only index.html, styles.css, and app.js in this folder. Use plain HTML, CSS, and JavaScript with no packages, external libraries, network requests, modules, or build tools. Draw a top-down robot on a 700 by 420 canvas. Add one circular on-screen joystick that works with pointer events, a path trail, and a Reset robot button. At this stage both tracks must have identical motion and there must be no encoder correction, weak-track option, automated test, or results panel. Keep every intermediate file valid. When finished, list the three files you changed and give me one manual browser check. Do not add anything outside this request.

What Does This Prompt Control?

  • The three-file boundary keeps the simulator dependency-free.
  • The index.html file defines the page structure.
  • The styles.css file supplies the robot-lab layout.
  • The app.js file handles the pointer-controlled joystick.
  • The JavaScript gives both tracks identical motion.
  • The forbidden features preserve a clean manual-control baseline.
  • Review each proposed file change.
  • Approve each proposed change only when its filename is index.html, styles.css, or app.js.
  • Reject any proposal for a fourth file.
  • Wait for Claude Code to finish creating the approved files.

Claude Code should finish with a summary that names the three approved files. No package installation is needed.

Seeing an Extra File Proposal?

Reject the extra file while leaving the three requested files approved. The simulator needs no package files or build configuration.

If Claude Code stops before creating all three files, ask it to complete the original request within the same boundary.

Use this if the proposed changes do not match the boundary: Help me review why Claude Code proposed files outside index.html, styles.css, and app.js.

Confirm the Project Boundary

Claude Code's summary is your first scope check. It should confirm that the simulator stays inside the three files you approved.

  • Ask Claude Code to list its files without making more edits by pasting this prompt:
List the files you created and explain how to open index.html without a development server. Do not edit any files.

What Does This Check Prove?

  • The file list reveals whether the build stayed inside its approved boundary.
  • The opening instructions confirm that the simulator runs as a local webpage.
  • The final sentence prevents this check from changing the project.

The response should name only index.html, styles.css, and app.js. It should explain that index.html opens directly without a development server.

  • Compare the approved file contents with the first-version checkpoint below.

First-Version Checkpoint

  • The index.html file loads styles.css plus deferred app.js.
  • The page contains a 700 by 420 canvas with the ID simCanvas.
  • The page contains joystick, joystickKnob, and resetBtn elements.
  • The styles.css file styles the page, panels, responsive canvas, joystick, joystick knob, buttons, and robot-lab layout.
  • The app.js file selects canvas, ctx, joystick, joystickKnob, and resetBtn.
  • The JavaScript maintains robot, trail, and input state.
  • The JavaScript defines updateJoystick, resetRobot, updateSimulation, drawScene, and animationLoop.
  • The first version provides manual differential-drive motion with equal track behavior.
  • The first version contains no weak-track behavior, encoder feedback, automated test, or results panel.

Does the Checkpoint Look Different?

Return to Claude Code if a required element is missing. Ask it to add that requirement inside the existing three-file boundary.

Keep any follow-up change limited to index.html, styles.css, or app.js.

Use this if you need help comparing the project with the checkpoint: Help me check whether my first tracked-robot simulator contains the required page elements, state, and functions.

Drive and Reset the Robot

The browser is now your test bench. Manual movement proves that the input and robot motion work together before later steps introduce drift.

  • Use your computer's file browser to open the Desktop.
  • Open the tracked-robot-simulator folder.
  • Double-click index.html.

Google Chrome should show a robot field with a circular joystick. You should also see a Reset robot button.

Before you move the joystick, where do you expect the robot's trail to go when you drag straight upward?

  • Drag the joystick upward.

You should see the robot move up the field. Its trail should follow the path behind it.

  • Drag the joystick diagonally.

You should see the robot curve as its left and right sides receive different commands.

  • Release the joystick.

You should see the robot stop moving when the joystick returns to the center.

  • Click Reset robot.

You should see the robot return to its starting position. The previous trail should clear.

  • Drag the joystick upward once more.

You should see the robot travel up the field again. Its new trail should stay attached to its route.

Page Blank or Joystick Unresponsive?

  • Confirm that index.html, styles.css, and app.js are in the same tracked-robot-simulator folder.
  • Reload the local page after confirming the files.
  • Start each drag inside the circular joystick control.

Use this if the page still does not respond: Help me debug why my local tracked-robot simulator is blank or its pointer-controlled joystick does not move the robot.

That is your first visible win: the browser now turns your joystick movement into a robot path.

Your manual simulator is working. Next, you will make one track weaker to expose the drift that feedback must correct.

Make One Track 5 Percent Weaker

Your first simulator already turns joystick movement into equal track commands in Google Chrome. The robot can move inside its HTML Canvas field.

Equal commands can still create open-loop drift when one track produces less motion. Virtual encoders make that hidden mismatch visible during the same six-second test.

In this step, get ready to:
  • Add a checked control that makes the left track 5 percent weaker.
  • Display separate encoder counts beside a repeatable six-second test.
  • Run equal track commands to capture visible drift from the centerline.
Add the designed weak-track failure

A bounded prompt gives Claude Code one failure to create. Its file limits protect the working joystick from unrelated changes.

Claude Code may pause for permission before editing. You stay in control by limiting approval to the three existing simulator files.

  • Switch back to the Claude Code session inside your tracked-robot-simulator folder.
  • Paste this bounded prompt:
Read the current three files before editing. Add the designed failure without fixing it. Add a checked control labelled Left track has 5% lower traction. When it is checked, multiply only the left track's actual speed by 0.95 while the requested straight command remains equal on both sides. Add visible left and right virtual encoder counts, heading error, lateral offset, a dashed centerline, and a Run 6-second test button that resets the robot and commands straight forward motion for exactly six simulated seconds. Do not add encoder correction yet. Keep the joystick and reset behavior working. Edit only index.html, styles.css, and app.js. Finish by telling me exactly what I should see when the weaker-track test succeeds.

What Does This Prompt Add?

  • The checked weakTrackToggle control creates the designed mismatch.
  • The simulator multiplies only the left track's actual speed by 0.95.
  • The requested commands stay equal during straight motion.
  • The encoder counts expose the resulting difference in track travel.
  • The dashed centerline makes the robot's lateral drift visible.
  • The TEST_DURATION value keeps every automated run at six simulated seconds.
  • Review each proposed change in Claude Code.
  • Approve each change only when it targets index.html, styles.css, or app.js.
  • Read Claude Code's completion report.
  • Switch back to the local index.html tab in Chrome.
  • Reload the local page.

You'll see a checked Left track has 5% lower traction control beside the joystick. You'll also see a Run 6-second test button.

The field now has a dashed centerline. Four measurements show the two encoder counts plus the heading error and lateral offset.

Claude Proposes Extra Changes?

  • Reject any change that targets a file outside the three-file simulator.
  • Tell Claude Code to preserve the existing joystick behavior.
  • Tell Claude Code to leave encoder correction out of this step.
  • Help me review Claude Code's proposed weak-track changes.
Check the original controls

The new experiment builds on your working manual controls. A quick check proves those controls survived the edit.

  • Drag the joystick upward.
  • Release the joystick.
  • Click Reset robot.

The robot moves while you drag. It stops when you release.

After the reset, the robot returns to its starting position. Both encoder counts return to zero.

Run the repeatable drift test

The automated run fixes the throttle for every attempt. It also fixes the duration at six simulated seconds.

Before you run the test, do you expect equal requested commands to keep the robot on the centerline when its left track produces 5 percent less motion?

  • Confirm that Left track has 5% lower traction remains checked.
  • Click Run 6-second test.
  • Leave the joystick untouched until the mode badge shows Test complete.

The right encoder finishes with more ticks than the left encoder. The robot finishes away from the dashed centerline.

The heading error ends above zero. The lateral offset also ends above zero.

  • Read the final left encoder count.
  • Read the final right encoder count.
  • Read the final heading error.
  • Read the final lateral offset.

Why Does the Robot Drift?

The test requests equal motion from both tracks. The simulator multiplies the left track's actual speed by 0.95.

The right track travels farther during the same period. Differential-drive motion turns that unequal travel into a heading change.

The encoder counts expose the mismatch. The lateral offset shows its effect on the robot's path.

Robot Still Follows the Centerline?

  • Reload index.html after Claude Code finishes editing.
  • Check that Left track has 5% lower traction is enabled.
  • Use the automated test instead of the joystick for this comparison.
  • Help me debug a weak-track test that still drives straight.

That is the designed failure proven: equal commands produced unequal travel that you can see and measure. Next, you'll use the encoder mismatch to pull the path closer to the centerline.

Close the Loop with Encoder Correction

Your last run exposed a growing gap between the left and right virtual encoder counts. A feedback loop can use that measured gap to adjust the robot while it moves.

In this step, Claude Code adds proportional correction to the simulator. The controller slows whichever track is ahead without interfering with deliberate turns or reverse motion.

In this step, get ready to:
  • Add an Encoder correction control with a visible correction value.
  • Use the encoder mismatch to reduce the leading track command.
  • Run the same six-second test with correction enabled.
Send the correction prompt

The controller needs a measured error before it can react. This bounded prompt defines the error calculation plus the limits that keep each adjustment controlled.

  • Switch back to the Claude Code session from earlier.
  • Paste this bounded prompt into Claude Code:
Read the existing simulator and fix only the drift problem demonstrated in the last step. Add an unchecked control labelled Encoder correction and a visible Correction value. During nearly straight forward motion, calculate encoderError as rightTicks minus leftTicks. Calculate correction as the absolute encoder error multiplied by 0.0025, clamped from 0 to 0.18. If the right encoder is ahead, subtract correction from the right command. If the left encoder is ahead, subtract correction from the left command. Do not apply this correction while the user is deliberately turning or reversing. Preserve the 5 percent weaker-left-track switch, joystick, trail, reset, six-second test, and metrics. Edit only index.html, styles.css, and app.js. After editing, explain in three beginner-friendly sentences how the measured error changes the motor commands.

How Does This Prompt Close the Loop?

  • The new correctionToggle lets you choose whether the simulator reacts to its encoder measurements.
  • The calculation robot.rightTicks - robot.leftTicks identifies which track is ahead.
  • The gain 0.0025 converts the encoder gap into a command adjustment.
  • The maximum value 0.18 limits the strength of that adjustment.
  • The nearly straight forward condition keeps correction inactive during deliberate turns or reverse motion.
  • Review Claude Code's proposed file changes.
  • Approve the proposal only if its file list is limited to index.html, styles.css, app.js.
  • Wait for Claude Code to finish editing the three files.
  • Read Claude Code's final three-sentence explanation.

Claude Code Wants to Change More Files?

  • Reject any proposed file outside index.html, styles.css, app.js.
  • Paste the bounded prompt again if Claude Code adds packages or build tools.

Help me check why Claude Code changed files outside the allowed scope.

Review the feedback rules

The sign of encoderError identifies the leading side. Its absolute size determines how strongly the controller responds.

  • Confirm the explanation says a positive error means the right encoder is ahead.
  • Confirm the explanation says the right command is reduced when the right encoder is ahead.
  • Confirm the explanation says the left command is reduced when the left encoder is ahead.
  • Confirm the explanation says correction stays inactive during deliberate turns or reverse motion.

Why Proportional Correction?

Proportional correction makes a small adjustment for a small encoder mismatch. A larger mismatch produces a stronger adjustment until the correction reaches its limit.

This gives the controller a direct link between measured error and motor response. The robot can react to unequal track motion while it travels.

Run the corrected six-second test

The same repeatable test now lets you isolate the effect of feedback. Only the correction setting changes between the previous run and this one.

Before you run the corrected test, do you expect the encoder gap to grow as far as it did without correction?

  • Switch back to the local index.html page in Google Chrome.
  • Reload the page.
  • Leave Left track has 5% lower traction selected.
  • Select Encoder correction.
  • Click Run 6-second test.
  • Watch the Correction value during the six-second run.

During the run, you will see the correction value rise as the encoder counts separate. The two counts stay closer than they did during the open-loop test.

The completed trail stays nearer the dashed centerline. Your simulator now reacts to measured track mismatch instead of assuming both tracks behave identically.

Correction Stays at Zero?

  • Confirm Encoder correction is selected before starting the test.
  • Confirm Left track has 5% lower traction remains selected.
  • Reload index.html if the new control or correction metric is missing.

Help me find why the encoder correction stays at zero.

You have closed the loop between encoder measurements and track commands. Next, you will record comparable results that show exactly how much the correction reduces drift.

Prove the Improvement

Your proportional feedback control now keeps the corrected path nearer the centerline. A closer path looks promising.

You still need a repeatable number that shows how much drift the controller removed. This step captures both modes with the same six-second test before converting the two offsets into a percentage reduction.

In this step, get ready to:
  • Add an evidence panel that preserves completed test results.
  • Record a baseline with encoder correction switched off.
  • Record a corrected result with encoder correction switched on.
Add the evidence panel

A fair comparison needs both test outcomes to survive each robot reset. The final results object keeps the latest baseline offset and corrected offset available for renderResults.

  • Switch back to Claude Code from earlier.

Claude Code may pause for permission after you send the prompt. This is the expected review point for the three proposed file edits.

  • Paste the bounded prompt below into your active Claude Code session:
Add the final evidence panel without changing the controller constants. When a six-second test finishes with Encoder correction off, save its absolute lateral offset as Baseline. When a test finishes with Encoder correction on, save it as Corrected. When both exist, display the percentage reduction calculated from those two offsets. Keep prior results visible when the robot resets so I can compare the runs. Preserve all existing controls and behavior. Edit only index.html, styles.css, and app.js. Then inspect the three final files and give me a checklist covering joystick control, 5 percent weak-track drift, encoder counts, proportional correction, repeatable test timing, and before-and-after results.

What does this prompt do?

  • The results object stores one absolute offset for each correction mode.
  • The finishTest function saves the completed run in the matching result.
  • The renderResults function displays both offsets before calculating the percentage reduction.
  • The final inspection checks that the earlier simulator features remain present.
  • Review the proposed changes to index.html, styles.css, and app.js.
  • Approve edits only to those three files.
  • Allow Claude Code to complete its final file inspection.

Claude Code should finish with a checklist covering the six requested capabilities. The edit is now ready for browser verification.

Capture the baseline and corrected runs

Repeatability makes this comparison fair because only correction mode changes. The weak-track setting stays checked for both six-second runs.

  • Switch back to Google Chrome from earlier.
  • Reload index.html.

You should see the Before and after panel beside the simulator. Both result cards initially show Not recorded.

  • Confirm that Left track has 5% lower traction remains checked.
  • Leave Encoder correction switched off.

Before you run the baseline, where do you expect the robot to finish relative to the dashed centerline?

  • Click Run 6-second test.

The robot curves away from the centerline. The Baseline card changes from Not recorded to an absolute lateral offset.

Your baseline is now locked in. Resetting the robot no longer removes that measurement.

  • Switch Encoder correction on.

Before you repeat the test, do you expect the corrected offset to be larger, smaller, or unchanged?

  • Click Run 6-second test again.

The Corrected card records the second offset. The Baseline card remains visible beside it.

Missing one of the results?

  • Reload index.html again if the evidence panel is missing.
  • Run a fresh test with Encoder correction switched off to record the baseline.
  • Run a fresh test with Encoder correction switched on to record the corrected result.
  • Keep Left track has 5% lower traction checked for both runs.

Help me debug why my tracked robot simulator does not preserve both test results.

Verify the final evidence

The browser tests the controller's behavior. Claude Code's final checklist confirms that the requested features still exist in the three local files.

  • Return to the Claude Code session from earlier.
  • Confirm that its checklist includes joystick control.
  • Confirm that its checklist includes 5 percent weak-track drift.
  • Confirm that its checklist includes encoder counts.
  • Confirm that its checklist includes proportional correction.
  • Confirm that its checklist includes repeatable test timing.
  • Confirm that its checklist includes before-and-after results.

Before you compare the evidence panel, do you expect the displayed percentage reduction to be positive, zero, or negative?

  • Switch back to the Google Chrome window from earlier.
  • Read the lateral offset under Baseline.
  • Read the lateral offset under Corrected.
  • Read the percentage shown below both result cards.

You should see both lateral offsets with a positive percentage reduction in drift. The corrected offset should be smaller than the baseline offset.

You now have measurable proof that the proportional correction reduced drift under the same repeatable test. That turns a visual improvement into evidence you can demonstrate.

Secret mission

Find the Controller's Limits

Run a baseline test to identify the leading encoder. Measure the corrected result while checking that deliberate turns remain untouched. Explain why equal slip needs an independent sensor.

Clean Up Your Resources

Clean Up Your Resources

Your local simulator files create no ongoing charge. Claude Pro costs $20 per month before applicable tax until you cancel it.

Cost warning

Claude Pro renews at $20 per month before applicable tax. The Pause and Delete tabs show how to stop the next renewal at least 24 hours in advance.

Resources you used:

  • The local tracked-robot-simulator folder with its three final simulator files.
  • An active Claude Code session for the tracked-robot-simulator folder.
  • A Google Chrome window showing index.html.
  • The monthly Claude Pro subscription.

Keep everything running

No action is needed. Choose this option if you plan to continue experimenting with the simulator or start the physical-robot follow-on project.

  • Keep the tracked-robot-simulator folder on your Desktop.
  • Keep Claude Pro active for continued Claude Code access.
  • Leave Claude Code installed for later projects.
  • Leave Google Chrome installed for later browser projects.

Pause - I'll come back to this later

Shut down the current session while keeping the simulator files ready for your return. Your saved results remain available in the local project.

  • Exit the Claude Code session by entering this command:
/exit

What does this command do?

/exit ends the interactive Claude Code session. Your three simulator files remain unchanged.

Subscription changes can feel risky. Cancelling Claude Pro stops future renewals without touching your local simulator.

  • Open claude.ai in Google Chrome.
  • Select Settings.
  • Select Billing.
  • Cancel Claude Pro at least 24 hours before renewal.
  • Confirm the cancellation before leaving the billing page.
  • Close the Google Chrome window showing index.html.
  • Leave the tracked-robot-simulator folder on your Desktop.

Delete - I don't want to use this again

Remove the local simulator files when you no longer need the project. Cancel Claude Pro to stop its next monthly renewal.

  • Exit the Claude Code session by entering this command:
/exit

What does this command do?

/exit closes the interactive Claude Code session. The local project remains available for the deletion steps below.

Ending a paid plan can feel final. This cancellation stops future Claude Pro renewals.

  • Open claude.ai in Google Chrome.
  • Select Settings.
  • Select Billing.
  • Cancel Claude Pro at least 24 hours before renewal.
  • Confirm the cancellation before leaving the billing page.
  • Close the Google Chrome window showing index.html.

macOS

  • Return to your Desktop.
  • Right-click the tracked-robot-simulator folder.
  • Select Move to Trash.
  • Open Trash from the Dock.
  • Select Empty Trash.
  • Confirm that tracked-robot-simulator no longer appears on your Desktop.

Windows

  • Return to your Desktop.
  • Right-click the tracked-robot-simulator folder.
  • Select Delete.
  • Open Recycle Bin from your Desktop.
  • Select Empty Recycle Bin.
  • Confirm that tracked-robot-simulator no longer appears on your Desktop.

You have cleared the project-specific resources. The simulator folder is removed from your computer.

Nice Work!

Nice Work!

You made it! With Claude Code, you built the working browser lab that completes Part 1 of your tracked-robot project.

You've learned how to:

  • Built a dependency-free HTML Canvas simulator that runs locally in Google Chrome. Its pointer-controlled joystick drives a visible robot using differential-drive motion.
  • Created a repeatable open-loop drift test with 5 percent lower traction on the left track. Separate virtual encoders expose the resulting difference in track travel.
  • Added proportional closed-loop correction that slows whichever track is ahead. The six-second test records baseline drift. The evidence panel shows corrected drift plus the percentage improvement.
  • Secret Mission: Tested the controller during intentional turns. You identified equal track slip as a limitation that matching encoder counts cannot reveal. You also identified an independent heading or position sensor for a later physical robot.

Ready to quiz yourself?