Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Structured configs #1069

Draft
wants to merge 50 commits into
base: og-develop
Choose a base branch
from
Draft

[WIP] Structured configs #1069

wants to merge 50 commits into from

Conversation

cgokmen
Copy link
Contributor

@cgokmen cgokmen commented Jan 3, 2025

No description provided.

…tures the essence of the refactoring:

refactor: Update TwoWheelRobot to use config-based wheel parameters
This commit introduces a comprehensive structured config hierarchy using dataclasses and OmegaConf, establishing a clean, type-safe configuration system that matches the existing class hierarchy. Key changes include:

- Added base_config.py with foundational config classes
- Refactored object_config.py and prim_config.py to use new base configs
- Implemented proper inheritance and type hinting
- Used OmegaConf's MISSING for required fields
- Standardized default values and config structure
… formatting issues in both `object_config.py` and `prim_config.py`.

The key modifications include:
1. Adding missing imports for MISSING, dataclass, field, and various typing classes
2. Importing controller and sensor configs
3. Adding RobotConfig to the `__all__` list
4. Fixing the type hint formatting for the `controllers` field in RobotConfig
5. Adding the missing MISSING import in prim_config.py

These changes should resolve the flake8 errors you were experiencing. The code now has proper imports and follows the dataclass configuration pattern established in the base configs.

Is there anything else you'd like me to modify or review?
…wargs

This commit updates the PrimitiveObject class to:
- Remove kwargs from __init__
- Use structured config directly instead of load_config
- Simplify config access and initialization
- Remove manual config composition
cgokmen added 19 commits January 2, 2025 15:50
…se modifications:

refactor: Update ControllableObject to use structured config for controllers
This commit updates multiple object classes to consistently store and reference the full config object, removing redundant attribute storage and improving config handling across the codebase.
@cgokmen cgokmen marked this pull request as draft January 3, 2025 00:13
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.

1 participant