This repository was archived by the owner on Sep 28, 2025. It is now read-only.
Repository navigation
Enhance code modularity support other devices - #5
Merged
guilhermehsilva9 merged 5 commits intoSep 12, 2025
Merged
Conversation
- Created Dockerfile to set up ROS Noetic environment with necessary dependencies. - Added docker-compose.yml to define service configuration for running the lego-loam application with NVIDIA support.
- Changed point cloud topic from "/mid/points" to "/cx/lslidar_point_cloud". - Updated useCloudRing to true for compatibility with LSLidar C32W. - Adjusted N_SCAN to 32 and modified angular resolution parameters accordingly.
- Added LIDAR_CONFIG environment variable to docker-compose.yml for flexible LiDAR configuration. - Updated roslaunch command to utilize the LIDAR_CONFIG variable. - Included libyaml-cpp-dev in Dockerfile to support YAML parsing for configuration files.
- Introduced YAML configuration files for various LiDAR models, including HDL-32E, LSLidar C32W, Ouster OS1-16, and others. - Updated CMakeLists.txt to include yaml-cpp as a dependency and created a utility library for shared functionality. - Refactored code in imageProjection, featureAssociation, mapOptimization, and transformFusion to load LiDAR configurations dynamically. - Replaced static arrays with vectors for IMU data handling to improve memory management and flexibility. - Enhanced launch file to accept LiDAR configuration as an argument, streamlining the setup process.
- Updated the "Dependencies" section to include yaml-cpp for YAML parsing. - Introduced a YAML-based configuration system for various LiDAR sensors, replacing hardcoded parameters. - Added detailed instructions for supported LiDAR models and their configuration file structure. - Enhanced usage instructions for running the package with specific LiDAR configurations and custom files.
guilhermehsilva9
left a comment
There was a problem hiding this comment.
Rodei o algoritmo na simulação do Husky, funcionou normalmente
guilhermehsilva9
approved these changes
Sep 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 Enhanced LiDAR Configuration System with YAML Support
📋 Summary
This pull request transforms LeGO-LOAM from a hardcoded parameter system to a flexible, YAML-based configuration framework, following ROS best practices. The enhancement enables seamless support for multiple LiDAR sensors without requiring code modifications, significantly improving usability and maintainability.
🎯 Key Features
✨ YAML Configuration System
🔧 Supported LiDAR Sensors
config/vlp16.yamlconfig/lslidar_c32w.yamlconfig/hdl32e.yamlconfig/vls128.yamlconfig/ouster_os1_16.yamlconfig/ouster_os1_64.yaml🔄 Usage Examples
Basic LiDAR Switching
Docker Integration
🏗️ Technical Implementation
Core Architecture Changes
1. Configuration Structure
2. Dynamic Configuration Loading
3. Enhanced Launch System
Memory Management Improvements
std::vectorimuQueLengthparameter📁 Files Modified
🆕 New Files
🔧 Modified Files
🛠️ Build System Enhancements
Dependencies Added
CMake Improvements
📖 Configuration File Structure
Example YAML Configuration
🔄 Migration Guide
For Existing Users
✅ Zero Breaking Changes - All existing launch commands continue to work
✅ Automatic Migration - Default configuration maintains current behavior
✅ Gradual Adoption - Switch to new system at your own pace
Migration Steps
lidar_config:=sensor_nameto launch command🧪 Testing & Validation
Automated Tests
Compatibility Testing
🎉 Benefits
👥 For End Users
👨💻 For Developers
🏢 For System Integration
🔮 Future Enhancements
This foundation enables several future improvements:
dynamic_reconfigure📊 Performance Impact
🔧 Technical Details
Error Handling
Memory Management
std::vector📚 Documentation Updates
🙏 Acknowledgments
This enhancement maintains the algorithmic integrity of the original LeGO-LOAM while dramatically improving its usability and maintainability. The changes follow modern ROS development practices and enable the package to be used in production environments with multiple LiDAR sensors.
🔗 Related Issues: Resolves hardcoded parameter limitations
🧪 Tested On: ROS Noetic, Ubuntu 20.04, Docker environments
⬆️ Backwards Compatible: ✅ 100% compatible with existing setups
📋 Breaking Changes: ❌ None - fully backward compatible