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
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)
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)
Run Simulation
Control the navigation:
- ▸Start: Begin autonomous navigation
- ▸Pause/Resume: Temporarily halt execution
- ▸Stop: Halt navigation completely
- ▸Reset: Return to initial state
Analyze Results
Review performance metrics:
- ▸Monitor real-time tracking accuracy
- ▸View deviation history charts
- ▸Export data as JSON or CSV
🖥️ Interface Overview
Navigation Control Panel
Configure trajectory parameters, controller settings, and control navigation execution (Start, Pause, Stop, Reset).
3D Visualization
Real-time rendering of the robot, figure-8 path, target waypoint, and robot trail. Features smooth interpolation for fluid motion.
Metrics Display
Track position error, heading error, velocities, and view historical performance through interactive charts.
⚙️ Parameter Configuration Guide
Trajectory Configuration
| Parameter | Range | Description | Recommendation |
|---|---|---|---|
| scaleX | 1.0 - 5.0 m | Horizontal size of figure-8 | 2.0-3.0m for testing |
| scaleY | 1.0 - 5.0 m | Vertical size of figure-8 | 1.0-1.5m for testing |
| numWaypoints | 50 - 500 | Path resolution (higher = smoother) | 200 for balanced performance |
| targetLaps | 0 - 10 | Number of complete loops (0=unlimited) | 1-3 for quick tests |
Controller Configuration
| Parameter | Range | Description | Effect |
|---|---|---|---|
| lookAheadDistance | 0.2 - 2.0 m | Distance to target waypoint | ↑ Higher: Smoother but less accurate ↓ Lower: More accurate but oscillates |
| maxLinearVelocity | 0.5 - 3.0 m/s | Maximum forward speed | ↑ Higher: Faster but harder to control ↓ Lower: Slower but more stable |
| maxAngularVelocity | 0.5 - 3.0 rad/s | Maximum rotation speed | ↑ Higher: Sharper turns ↓ Lower: Smoother curves |
📊 Understanding the Metrics
Position Error
Distance between robot and target waypoint.
Heading Error
Difference between robot heading and desired heading.
Average Velocity
Mean linear velocity during navigation.
Completion Percentage
Progress through the figure-8 path.
🎮 3D Visualization Controls
Visual Elements Explained
💾 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
🔧 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.Find Closest Waypoint: Locate current position on path using forward-only search
- 2.Look-Ahead Target: Select waypoint ahead based on look-ahead distance
- 3.Calculate Distance: Compute Euclidean distance to target waypoint
- 4.Heading Error: Use waypoint's tangent heading (not position-based)
- 5.Control Commands: Apply proportional control law
Control Law
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