Skip to content

Conversation

@fedeoli
Copy link
Collaborator

@fedeoli fedeoli commented Feb 19, 2025

I need to better understand the code for the heatmap, so I'll just comment here so we can discuss.

self.target_zone_radius = target_zone_radius
self.num_agents = len(agent_positions) if agent_positions else 0
self.num_objects = num_random_objects
self.highway_threshold =0
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is highway_threshold?

self.cells_without_objects.append(empty_cell)
self.all_cells.append(empty_cell) # Add to all_cells

def _set_target_zone(self):
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For future work: maybe we could parametrize this or put a set of different shapes

while total_objects_spawned < self.num_objects:
cell_x = random.randint(0, self.grid_size - 1)
cell_y = random.randint(0, self.grid_size - 1)
cell_center = Point(cell_x + 0.5, cell_y + 0.5) # Center of the grid cell
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the +0.5?

cell_center = Point(cell_x + 0.5, cell_y + 0.5) # Center of the grid cell

if self.target_zone.contains(cell_center):
continue # Skip cells within the target zone
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't this just proceed? I don't get what you're doing here

NirManor and others added 14 commits April 13, 2025 14:07
### Core Algorithm Improvements:
- **Spillage Cell Visualization**: Added spillage cell preview with magenta highlighting during path preview
- **Fixed Visualization Bug**: Corrected horizontal flip in visualize_spillage_for_all_paths output
- **Enhanced Multi-Agent System**: Comprehensive coordination and planning capabilities
- **Optimized Performance**: Improved heat map calculations and selective environment updates

### New Infrastructure:
- **Strategic Planning Framework**: Complete infrastructure for multi-scenario sequential move planning
- **State Management**: Sophisticated environment serialization/deserialization for scenario exploration
- **Documentation**: Comprehensive algorithm documentation and implementation summaries

### Technical Enhancements:
- **Dual Value Tracking**: Spillage-affected vs raw object tracking for optimal pathfinding
- **Selective Updates**: Efficient dependency-based recalculation system
- **Advanced Visualization**: Real-time spillage preview and multi-agent coordination display
- **Memory Optimization**: Lazy computation and incremental update strategies

### New Files:
- ALGORITHM_DOCUMENTATION.md: Comprehensive technical documentation
- IMPLEMENTATION_SUMMARY.md: Implementation details and architectural decisions
- STRATEGIC_INFRASTRUCTURE_DOCUMENTATION.md: Strategic planning framework design

### Key Features Added:
✅ Spillage cell visualization in path preview mode
✅ Fixed coordinate system in spillage visualization plots
✅ Multi-agent coordination with forward planning
✅ Strategic scenario management architecture
✅ State preservation and restoration capabilities
✅ Performance optimizations for real-time interaction

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Enhanced strategic analysis with convex hull, distance, and heatmap metrics
- Improved save/load functionality with complete state preservation
- Fixed spillage model to respect disabled setting and preserve object conservation
- Added comprehensive benchmarking system with performance analysis
- Implemented user-friendly save interface with timestamps and numbered load selection
- All calculated fields (heat maps, paths, velocities, distances) now preserved across save/load

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…on reports

- Complete 8.28-hour benchmark analysis with 7,280 samples
- Environment Update Optimization: 87.1% performance improvement (7.0-8.5x speedup)
- A* Suffix Stitching: 19.5% performance improvement validated
- Linear scalability achieved (R² = 0.988)
- Generated detailed analysis reports and optimization comparisons
- Added comprehensive documentation for thesis integration
- Performance breakthrough enables real-time capabilities

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
NirManor and others added 15 commits September 18, 2025 15:03
…ation results

Major additions and improvements:
- Added comprehensive benchmark analysis report with 87.1% environment update optimization
- Added optimization comparison summary showing major performance breakthroughs
- Updated core algorithm files with latest optimizations
- Added memory analysis and plot generation tools
- Complete benchmark results from 8.28-hour testing session (7,280 samples)
- Individual visualization plots for thesis integration
- HTML performance reports with detailed analysis
- Statistical validation of linear scalability (R² = 0.988)

Performance achievements validated:
- Environment Update Optimization: 87.1% improvement (7.0-8.5x speedup)
- A* Suffix Stitching: 19.5% improvement
- Linear scaling characteristics proven
- Real-time capability enabled for interactive applications

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
The comprehensive benchmark analysis and results have been properly moved to
the correct location in "2D Algorithm and Benchmark" directory. This commit
removes the duplicate files that were mistakenly committed to the wrong path.

All analysis results, reports, and optimizations are now correctly located at:
earth_moving/2D Algorithm and Benchmark/

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Added complete 3D integration implementation including:
- Latest version from 3d_integration 090925 with PyBullet integration
- Complete rover simulation with physics-based movement
- Trajectory planning and pure pursuit algorithms
- Environment and spillage model integration
- Multiple versions and iterations for development history
- URDF files for rover and pebbles simulation
- Test files for trajectory validation
- Conversation summaries and documentation

Key components:
- pybullet_integration.py: Main 3D simulation engine
- orchestrator.py: High-level coordination system
- pure_pursuit.py: Path following algorithms
- engine_rover.py: Rover control implementation
- test_pure_pursuit.py: Validation and testing
- Multiple development versions preserved for reference

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Complete APF navigation tool with aggressive parameters (k_rep=0.05, d0=0.45m, v_max=1.3m/s)
- Interactive heatmap visualization of potential field before navigation
- Minimal file set with all dependencies included
- Comprehensive documentation (README, QUICKSTART, HEATMAP_GUIDE)
- PyBullet physics simulation with real-time obstacle handling
- User's special file preserved (GPT_potential_field_nonholonomic.py)

Features:
✓ Potential field heatmap visualization (matplotlib-based)
✓ Aggressive parameters only (proven optimal configuration)
✓ Multiple obstacle configuration options
✓ Interactive goal selection
✓ Real-time PyBullet simulation
✓ Comprehensive metrics reporting

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…obstacles

- Reorganized from nested earth_moving/3D integration/November/3_11/apf_interactive_tool/
- to root-level apf_static_obstacles/ directory for cleaner structure
- All files preserved with same functionality

Content:
✓ APF interactive navigation tool with aggressive parameters
✓ Potential field heatmap visualization (matplotlib-based)
✓ PyBullet physics simulation with static obstacles
✓ Complete APF navigation module (apf_nav/)
✓ Comprehensive documentation (README, QUICKSTART, HEATMAP_GUIDE)
✓ Robot models (rover.urdf, pebbles.urdf, 2_wheel_rover.urdf)
✓ User's special file (GPT_potential_field_nonholonomic.py)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Created earth_moving/3D integration/obstacle avoidance/ directory
- Moved apf_static_obstacles folder under obstacle avoidance/
- New structure: earth_moving/3D integration/obstacle avoidance/apf_static_obstacles/

This organizes all obstacle avoidance algorithms under a unified module within
the 3D integration suite.

Content preserved:
✓ APF interactive navigation tool with aggressive parameters
✓ Potential field heatmap visualization
✓ PyBullet physics simulation
✓ Complete APF navigation module (apf_nav/)
✓ All documentation and robot models
✓ User's special file (GPT_potential_field_nonholonomic.py)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…dance

- Removed all legacy 3D integration implementations
- Removed dated project folders (3d_integration 040925, 090925, 100825, 300725, 300825, etc.)
- Removed supporting folders (2D Algorithm, August, July, October, September, November)
- Removed legacy files and utilities
- Kept only obstacle_avoidance/ module with apf_static_obstacles implementation

This cleanup consolidates the 3D integration efforts into a single,
well-organized obstacle avoidance module with the latest APF navigation tool.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Removed 3d_integration 180725 folder from git tracking
- Removed clutter folder from git tracking
- Local PC files remain untouched and preserved

These folders contained legacy/experimental code and are no longer
needed in the repository. They remain safely stored on local disk.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add orchestrator.py: Main 2D/3D integration orchestrator
- Add core modules: main.py, env.py, visualizer.py, pybullet_integration.py
- Add utility modules: cell.py, coordinate_converter.py, spillage_model.py
- Add algorithm modules: search.py, agents.py, engine_rover.py, pure_pursuit.py
- Add robot models: pebbles.urdf, rover.urdf, 2_wheel_rover.urdf (3 URDF files)

Complete dependency tree for orchestrator.py orchestration system.
Total: 15 files (~467 KB)

Features:
✓ 2D/3D coordinate transformations
✓ PyBullet physics simulation
✓ Path planning and control
✓ Pygame visualization

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add nh_ORCA.py: ORCA-based dynamic obstacle avoidance system
- Add scenarios.py: Obstacle scenario definitions
- Add 2_wheel_rover.urdf: Robot model for ORCA simulation

Features:
✓ Dynamic collision avoidance using ORCA algorithm
✓ Multi-agent scenario support
✓ PyBullet-based simulation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…ementation

Fixed critical issues in the hybrid collision avoidance planner:

Key Changes:
- Replaced broken ORCA reimplementation with proven working code from ORCA/nh_ORCA.py
- Fixed Unicode encoding error in print statements (ω -> w)
- Simplified hybrid coordinator to use ORCA-only (APF integration requires more work)
- All rovers now successfully reach their goals without colliding

Testing Results:
✓ 4-rover crossing scenario: All 4 rovers reached goals (R0:7.8s, R2:9.0s, R1:11.0s, R3:12.7s)
✓ 2-rover head-on scenario: Both rovers reached goals (R0:10.3s, R1:13.0s)
✓ Multi-scenario testing passes

Current Status:
- Layer 1 (ORCA): WORKING - handles rover-to-rover collision avoidance correctly
- Layer 2 (APF): AVAILABLE but NOT YET INTEGRATED (requires proper decoupling)

Note: The hybrid approach architecture remains, but APF integration needs careful design
to avoid breaking ORCA's rover-rover safety guarantees. The foundation is now solid
with the proven ORCA implementation in place.

Files Modified:
- hybrid_planner.py: Simplified plan() method to use ORCA-only
- hybrid_simulation.py: Fixed Unicode encoding issues
- nh_ORCA.py: Fixed Unicode encoding issues

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…tation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
NirManor and others added 4 commits December 4, 2025 23:41
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Explains flow field navigation and path-following implementation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…dling

- Emphasize that path following tracks shovel position (0.17m offset), not rover center
- Clarify that obstacle avoidance is primarily for goal-directed navigation
- Update environment description to reflect optional obstacle usage

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Added complete flow field implementation with:
- Dijkstra-based distance field computation
- Gradient descent direction field
- Shovel-point tracking (0.17m offset)
- Obstacle stamping and avoidance
- Detailed README explaining flow field algorithm

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants