Repository navigation
v0.23.0
What robot products need that no other kit has (a live camera, a dead-man drive pad, a site map), and every component's words translatable.
Added
camera-feed(beta): a robot's live camera over a native<video>the app feeds (a WebRTCstream, set assrcObject, or asrcthe browser plays), no streaming library; the app owns the connection. It always says whether the picture is live, by a shape and a word in the header beside the camera and the robot: Live (a still dot, never red, never pulsing) withlatencyMs; Connecting (the only blue: a spinner, over a skeleton that holdsaspectRatio); Stalled · last frame 14:02:31 over the dimmed last picture afterstaleAfterMs(2 s) without a new frame, watched withrequestVideoFrameCallback, elsetimeupdate; Paused; Camera offline withofflineReasonand Reconnect (onRetry); No camera. Pause view freezes this screen only (the robot keeps streaming); snapshot draws the frame on screen to a PNG foronSnapshot; mute only withaudio; full screen. Space and F only while focus is inside.childrenare drawn over the picture (a crosshair, detection boxes). Labels exported asCameraFeedLabels/defaultCameraFeedLabels, withformatTimefor the site's clock.- Icon set:
VideoOff, for no live picture (the camera is offline, or there is none). teleop-pad(beta): manual driving of a mobile robot from a phone or a console, as a dead-man stick. The robot moves only while the stick is held: release, a cancelled pointer, lost focus, a hidden page ortimeoutMswithout pointer events send a zero command at once and callonStopwith the reason. While held,{ linear, angular }(−1…1, ROS REP 103 axes) goes out at a fixedrateHz(10) so the robot can run its own watchdog. Pressing never moves the robot (the stick starts where the finger lands); dead zone 10 %,maxSpeeddrawn as a scale; arrow keys or W A S D while held, Space to stop; a status line with icon and words (Hold to drive, Driving · 0.4 m/s, Stopped, Disabled: reason); 56 px knob, larger in glove density; haptic ticks. A mouse held perfectly still sends no events, so the 2 s pointer timeout stops it too;timeoutMs={false}turns that off, only where the robot runs its own watchdog. The emergency stop stays StopButton, beside it.feedback:driveStartanddriveStoppatterns (one and two short ticks) for manual driving.- Icons
Move(moving under manual driving) andCirclePause(standing still after manual driving ended). robot-map0.23.0 (beta): the kit's site map, as a component. It lived only as a drawing insidemap-workspace.RobotMapdraws a floor plan in metres (an image URL or your SVG) in plain SVG, with no map library: zones (no entry, slow, charging, other) as hairline outlines with an icon and a name, never a fill; planned routes dashed in the in-progress blue, travelled tracks solid grey; robots as their status shape with a heading tick and their name, which moves aside rather than cover another, and the state in words when a robot needs someone; selection as a ring and a bold name. Pan and zoom by drag, two fingers, the wheel (once the map has focus, or with Ctrl, so a page still scrolls past it), 44 px zoom and fit buttons, and keys (arrows, + / -, 0), gliding at--motion-baseunless motion is reduced. A scale bar, a north arrow whennorthDegis given, and empty, loading and error states. The map is one Tab stop;RobotMapListlists the same robots with position, zone, heading and state, and a row selects its robot on the map. Coordinates are metres from the plan's top-left, y down, heading clockwise from the top; from a ROS map frame:x = xRos − originX,y = height − (yRos − originY),heading = 90 − yaw × 180 / π(in the docs and the type).lint:rules: a block that draws aRobotMapmust also renderRobotMapList, as a chart block renders its table and a graph block its list.
Changed
map-workspace0.23.0 is built onrobot-map: same layout, trays and markers, now with heading ticks, a named loading bay, a scale bar and pan and zoom. Its robots are listed in a Robots sheet from the top bar.- Localisation: every word the kit says can be translated without editing its source. Components that showed or announced fixed English now take
labels, the kit's existing pattern: an exported<Name>Labelstype and Englishdefault<Name>Labels, merged under a partiallabelsprop, with functions for words that hold a number or a name. New in 0.23.0: Autocomplete, Breadcrumb, ChipGroup, CommandDialog, CopyButton, DataGrid (every part,selectColumnandexpandColumnincluded; DataGridPagination passes Pagination's), DatePicker and DateRangePicker, DialogContent, PhoneInput, Questionnaire and QuestionField, RouteProgress, SearchField, Spinner, Attachment, Stepper and StepperCompact, Sortable (its drag announcements), Trace and TraceHeader (status words, counts, durations), TimePicker. The defaults are today's words; single props such aslabel,placeholderandcloseLabelstill work and win. localewhere a component formats a number, a day or a time itself: ChipGroup, Filters, LoadMore and ShareBar (numbers; left out, the browser's language as before), DatePicker and DateRangePicker (the trigger's day with Intl, pluscalendarLocalefor react-day-picker's calendar), TimePicker (times with Intl), PhoneInput (country names and their order; English when left out). Calendar lets a react-day-picker locale such aszhTWname its days.- Docs: Localisation (Getting started): why labels and locale, the pattern, a worked zh-TW example, and every component's keys with their English defaults, generated from the source (
npm run propsnow records each labels prop's keys in site/props.json).
Fixed
tabs0.23.0: no scrollbar on the tab list on phones. The triggers sit 1 px past the list's border (-mb-px, so the underline covers it); withoverflow-x: autofor many tabs,overflow-ycomputes to auto too, so the list scrolled 1 px vertically and Android showed a scrollbar on first load.overflow-yis now hidden (also on the docs' component tabs and the drawer's area tabs). Checked on all 334 pages at phone width: no box scrolls by 1–4 px any more.