OdomMap

๐Ÿ—บ๏ธ OdomMap

**A visual field distance calculator and odometry assistant built for WRO.** Measure paths, calculate wheel rotations, and plan robot movement โ€” all on an interactive field map.

๐Ÿ“ธ Overview

OdomMap is a browser-based tool that overlays competition field images and lets you:


๐Ÿš€ Getting Started

โœ… Prerequisites

No installation required. Just a modern web browser:

Browser Support
๐ŸŸข Chrome โœ… Recommended
๐ŸŸข Firefox โœ… Supported
๐ŸŸข Edge โœ… Supported
๐ŸŸก Safari โš ๏ธ May vary

๐Ÿ“‚ File Structure

OdomMap/
โ”œโ”€โ”€ OdomMap.html               # Main application file
โ”œโ”€โ”€ iconrb.png                 # RobotRizz logo (header icon)
โ””โ”€โ”€ GameField/                 # Field image assets
    โ”œโ”€โ”€ 2026/
    โ”‚   โ”œโ”€โ”€ Elementary.png
    โ”‚   โ”œโ”€โ”€ Junior.png
    โ”‚   โ”œโ”€โ”€ Senior.png
    โ”‚   โ””โ”€โ”€ RoboSports.png
    โ”œโ”€โ”€ 2025/
    โ”œโ”€โ”€ 2024/
    โ””โ”€โ”€ 2023/

โ–ถ๏ธ Running the App

  1. Clone or download this repository
  2. Place your field images inside GameField/<year>/ as <Category>.png
  3. Open OdomMap.html directly in your browser

โšก No server needed โ€” it runs entirely client-side!


๐ŸŽฎ How to Use

๐Ÿ“ Normal Mode โ€” Line Distance & Measurement

The default mode for measuring distances and analyzing paths on the field.

Features at a glance:

Feature Description
๐Ÿ“ Line Distance Click two points to measure the straight-line distance between them in mm
๐Ÿ“ Angle of Change See the angle between consecutive lines to plan turns and heading changes
๐Ÿ“ Measurement from Edge Measure distance relative to the nearest field edge for precise positioning
๐Ÿ”ฒ Show Grid Toggle a grid overlay on the field for visual reference and alignment
๐Ÿ“ Right Triangle View Break down any diagonal line into its horizontal (X) and vertical (Y) components visually

How to draw lines:

Step Action
1๏ธโƒฃ Click on the canvas to set the start point
2๏ธโƒฃ Move your mouse โ€” live measurements appear in the sidebar
3๏ธโƒฃ Click again to lock the end point
4๏ธโƒฃ A new line is saved; repeat to draw more
๐Ÿ–ฑ๏ธ Right-click Cancels the current line

๐Ÿ”ข Measurements Shown

Value Description
๐Ÿ“ Distance Straight-line distance in mm
๐Ÿ“ Angle Absolute angle from horizontal (ยฐ)
๐Ÿ”„ Angle of Change Turn angle between the previous and current line segment (ยฐ)
๐Ÿ“ Distance from Edge Distance to the nearest field boundary (mm)
๐Ÿ”„ Wheel Rotations Full rotations needed for your wheel diameter
๐Ÿ”ต Wheel Degrees Motor degrees needed
โ†”๏ธ Horizontal X-axis component (mm)
โ†•๏ธ Vertical Y-axis component (mm)

โš™๏ธ Wheel Diameter

Enter your robotโ€™s wheel diameter (in mm) in the top control bar.
Default: 62.4 mm

๐Ÿงฎ The tool recalculates wheel rotations and degrees automatically.


๐Ÿงญ Odometry Mode

Odometry Mode helps you plan and visualize robot position relative to a custom origin point.

How to activate:

  1. Check โœ… Odometry Mode in the sidebar
  2. Click on the field to place your origin (0, 0) โ€” this is where your robot starts
  3. Use Add Point or Add Line to mark robot positions and paths

๐ŸŸก The origin acts as your robotโ€™s (0, 0) coordinate. All X/Y positions are measured relative to it.

Odometry Sidebar shows:

Value Meaning
X Horizontal distance from origin (mm)
Y Vertical distance from origin (mm, upward positive)
Angle Direction from origin (ยฐ)

๐Ÿ›ฃ๏ธ Route Mode

Route Mode lets you plan, save, and replay your robotโ€™s full competition path on the field map.

How to activate:

  1. Select Route Mode from the mode selector
  2. Click on the field to add sequential waypoints along your planned route
  3. Use Save Route to store your path for future reference
  4. Load a saved route to overlay it on the field during practice or competition review

Route Mode features:

Feature Description
๐Ÿ“ Waypoints Click to place ordered stops along the robotโ€™s planned path
๐Ÿ’พ Save Route Export and store your drawn route to reload later
๐Ÿ“‚ Load Route Reload a previously saved route and display it on the field
๐Ÿ” Replay Path Visualize the full route sequence on the field map

๐Ÿ Useful for competition day โ€” plan your route during practice and load it up before your run.


๐ŸŸ๏ธ Field Selection

Use the dropdowns in the header to choose:

Selector Options
๐Ÿ“… Year 2023, 2024, 2025, 2026
๐Ÿ† Category Elementary, Junior, Senior, RoboSports

Field images load from GameField/<year>/<category>.png. If an image is missing, the tool gracefully falls back to a grid-only view.

Field dimensions: 2362 mm ร— 1143 mm
Max robot size: 250 mm ร— 250 mm


๐Ÿ› ๏ธ Toolbar Reference

Button Action
๐Ÿ†• New Line Resets the current line drawing
๐Ÿ—‘๏ธ Delete Last Removes the most recently drawn line
๐Ÿงน Clear All Clears all lines (and odometry/route data in their respective modes)

๐ŸŽจ Display Options

Toggle Effect
๐Ÿ”ฒ Show Grid Toggles the grid overlay on the field canvas
๐Ÿ”ต Show Right Triangle Displays horizontal/vertical leg breakdown of each line
๐Ÿ“ก Odometry Mode Enables origin-relative X/Y coordinate tracking
๐Ÿ›ฃ๏ธ Route Mode Enables waypoint-based route planning and saving
๐Ÿ”† Grid Opacity Slider Adjusts the grid overlay brightness (Odometry Mode only)

๐Ÿค Contributing

Contributions are welcome! To contribute:

  1. ๐Ÿด Fork this repository
  2. ๐ŸŒฟ Create a new branch: git checkout -b feature/your-feature
  3. ๐Ÿ’พ Commit your changes: git commit -m "Add your feature"
  4. ๐Ÿ“ค Push to the branch: git push origin feature/your-feature
  5. ๐Ÿ”ƒ Open a Pull Request

Please keep code clean and well-commented. New field images should follow the existing GameField/<year>/<Category>.png naming convention.


๐Ÿ“œ License

This project is licensed under the MIT License โ€” see the LICENSE file for full details.


โญ If this tool helped your team, give it a star!