Repository navigation
CodeAIR in a hand, and a ranger card, in the simulator's world - #173
Merged
Merged
Conversation
A hand takes the drone (hold, a pose it follows through a short lag, with a small shake once lifted) and lets it go (release: with its motors off it falls). The accelerometer reads gravity turned into the tipped body, the gyroscope the hand's turn, the flow sensor the slide across the floor. Each ranger now casts its ray from where it sits on the frame along where the frame points it, to the nearest of the floor, an underside above, a wall or box, and the ranger card: a 15 by 10 cm card that stands for a hand or a sheet of paper, placed and turned by setCard. A tipped drone reads the slant. The card is not an obstacle to flight. The snapshot carries both, for the page's handles to come. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SS5gJ3p1XJhQBNJ3wv9z2z
|
Visit the preview URL for this PR (updated for commit d44c7c8): https://firialabs-open-editor--pr173-codeair-hold-vowr1t97.web.app (expires Thu, 10 Dec 2026 15:50:30 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 81259a1fec315ca1af3747d225d9c7424890be3e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The world model for a CodeAIR in a student's hand, for FLY's early lessons (hold the drone, cover a ranger, slide it, tip it, turn it). The page's handles to drive it come in the PR stacked on this one.
In a hand (
src/sim/world/codeair.js).hold(pose)takes the drone (any of x, y, z, heading, roll, pitch): it follows that pose through a short lag, no faster than a hand moves, with a small shake once off the floor. Nothing flies it while held, whatever its motors do, and it never goes through the floor.release()lets go: with its motors off it falls. The accelerometer reads gravity turned into the tipped body, the gyroscope the hand's turn, the flow sensor the slide.The ranger card.
setCard({ x, y, z, q }), a 15 by 10 cm card standing for a hand or a sheet of paper. Each ranger now casts its ray from where it sits on the frame along where the tipped frame points it, to the nearest of the floor, an underside above, a wall or box, and the card, so a tipped drone reads the slant. The card is not an obstacle to flight. The snapshot carriesheldandcard.Tests (
tests/sim.mjs): the card against each ranger reads under 2 mm and taken away over 1000 mm; held, slid and turned, the flow sensor and gyroscope read it; tipped, the accelerometer reads gravity in the body and the down ranger the slant; let go, it falls.🤖 Generated with Claude Code
https://claude.ai/code/session_01SS5gJ2c2Qc8EBGyMEjiPVq