Navigation Simulation Guide

Launch Simulation
🤖

Figure-8 Mobile Robot Navigation

A comprehensive simulation tool for testing autonomous mobile robot navigation using the Pure Pursuit algorithm. This guide will help you understand how to use the simulation, configure parameters, and interpret the results.

🚀 Quick Start Guide

1️⃣

Configure Trajectory

Set the size and complexity of your figure-8 path:

  • Scale X/Y: Adjust path dimensions (1.0-5.0m)
  • Waypoints: Higher values = smoother path (50-500)
  • Target Laps: Number of complete loops (1-10, 0=unlimited)
2️⃣

Tune Controller

Optimize the Pure Pursuit algorithm:

  • Look-Ahead: Distance to target waypoint (0.2-2.0m)
  • Max Velocities: Speed limits for safety (0.5-3.0 m/s)
3️⃣

Run Simulation

Control the navigation:

  • Start: Begin autonomous navigation
  • Pause/Resume: Temporarily halt execution
  • Stop: Halt navigation completely
  • Reset: Return to initial state
4️⃣

Analyze Results

Review performance metrics:

  • Monitor real-time tracking accuracy
  • View deviation history charts
  • Export data as JSON or CSV

🖥️ Interface Overview

📊
Left Panel
Controls & Metrics
🎮
Center View
3D Visualization
📈
Status
Real-time Data
1

Navigation Control Panel

Configure trajectory parameters, controller settings, and control navigation execution (Start, Pause, Stop, Reset).

2

3D Visualization

Real-time rendering of the robot, figure-8 path, target waypoint, and robot trail. Features smooth interpolation for fluid motion.

3

Metrics Display

Track position error, heading error, velocities, and view historical performance through interactive charts.

⚙️ Parameter Configuration Guide

Trajectory Configuration

ParameterRangeDescriptionRecommendation
scaleX1.0 - 5.0 mHorizontal size of figure-82.0-3.0m for testing
scaleY1.0 - 5.0 mVertical size of figure-81.0-1.5m for testing
numWaypoints50 - 500Path resolution (higher = smoother)200 for balanced performance
targetLaps0 - 10Number of complete loops (0=unlimited)1-3 for quick tests

Controller Configuration

ParameterRangeDescriptionEffect
lookAheadDistance0.2 - 2.0 mDistance to target waypoint↑ Higher: Smoother but less accurate
↓ Lower: More accurate but oscillates
maxLinearVelocity0.5 - 3.0 m/sMaximum forward speed↑ Higher: Faster but harder to control
↓ Lower: Slower but more stable
maxAngularVelocity0.5 - 3.0 rad/sMaximum rotation speed↑ Higher: Sharper turns
↓ Lower: Smoother curves

📊 Understanding the Metrics

Position Error

Distance between robot and target waypoint.

Excellent:< 0.10 m
Good:0.10 - 0.30 m
Poor:> 0.30 m

Heading Error

Difference between robot heading and desired heading.

Excellent:< 5°
Good:5° - 15°
Poor:> 15°

Average Velocity

Mean linear velocity during navigation.

Higher average velocity indicates efficient navigation with minimal slowdowns. Compare against your configured max velocity.

Completion Percentage

Progress through the figure-8 path.

Calculated as (currentWaypoint / totalWaypoints) × 100%. Increases monotonically until lap completion.

🎮 3D Visualization Controls

🖱️
Mouse Drag
Rotate camera view around scene
🔍
Mouse Wheel
Zoom in/out of visualization
⌨️
Keyboard Q/E
Move camera up/down (vertical)

Visual Elements Explained

Blue Line
Figure-8 trajectory path
Golden Marker
Current target waypoint with heading arrow
Purple Trail
Robot's historical path (last 500 points)
Dashed Line
Connection from robot to target

💾 Exporting Data

📄

JSON Export

Complete structured data with metadata, ideal for:

  • Programmatic analysis and processing
  • Machine learning training data
  • Integration with other tools
  • Preserving configuration settings
📊

CSV Export

Time-series data in tabular format, perfect for:

  • Excel and spreadsheet analysis
  • MATLAB/Python data processing
  • Statistical analysis
  • Plotting and visualization
💡
Export Tip
Export buttons appear after completing at least one navigation run. Data includes all metrics from the entire session.

🔧 Troubleshooting

Best Practices

Do

  • Start with default parameters and adjust incrementally
  • Run multiple tests to verify consistency
  • Export data for detailed offline analysis
  • Use the Reset button between tests for clean starts
  • Monitor both position and heading errors
  • Adjust look-ahead based on path curvature

Don't

  • Set velocities too high for the path complexity
  • Use very small look-ahead (<0.2m) for large paths
  • Change parameters during an active simulation
  • Ignore collision warnings - always reset after collision
  • Use fewer than 100 waypoints (path too coarse)
  • Expect perfect tracking at maximum speeds

🧮 Pure Pursuit Algorithm

The Pure Pursuit algorithm is a path-tracking technique that calculates control commands to follow a path of waypoints. This implementation uses a simplified approach inspired by MATLAB for high accuracy.

How It Works

  1. 1.Find Closest Waypoint: Locate current position on path using forward-only search
  2. 2.Look-Ahead Target: Select waypoint ahead based on look-ahead distance
  3. 3.Calculate Distance: Compute Euclidean distance to target waypoint
  4. 4.Heading Error: Use waypoint's tangent heading (not position-based)
  5. 5.Control Commands: Apply proportional control law

Control Law

// Linear velocity (proportional to distance)
v = kp_v × distance
// kp_v = 2.0
// Angular velocity (proportional to error)
ω = kp_ω × heading_error
// kp_ω = 5.0
// Derivative term (smoothing)
ω += kd × dError/dt
// kd = 0.1
Note: This simplified approach matches MATLAB implementations and provides higher accuracy than complex multi-factor controllers.

Ready to Start Testing?

Now that you understand how to use the simulation, launch it and start experimenting with different parameters to optimize your mobile robot's navigation performance.

🚀Launch Simulation Now

Figure-8 Navigation Simulation • Built with Nuxt 3, Three.js & Pure Pursuit Algorithm