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

Save robot configuration with dataclasses #254

Draft
wants to merge 33 commits into
base: main
Choose a base branch
from
Draft

Conversation

codingpaula
Copy link
Contributor

@codingpaula codingpaula commented Jan 15, 2025

This PR introduces a new format to save robot configurations.

Changes

  • rename thooth_count to tooth_count
  • add FieldFriendConfiguration dataclass with more configurations as properties
  • update field_friend_hardware.py to use the new FieldFriendConfiguration
    • remove check_pins function
    • remove LedEyesHardware since it's not used anymore
    • remove differentiation between Tornado v1.0 and v1.1
    • remove flashlight v1
  • add configuration for u4
  • correct some types in tornado.py and others

ToDos

  • update get_config to dynamically load configuration
  • test new configuration with u4
  • transfer all configurations into new format
  • check if m_per_tick is used correctly in all hardware elements
  • remove flashlight v1 class as well?

@codingpaula codingpaula added the enhancement New feature or request label Jan 15, 2025
@codingpaula codingpaula self-assigned this Jan 15, 2025
@pascalzauberzeug pascalzauberzeug added this to the 0.8.0 milestone Jan 15, 2025
Copy link
Contributor

@pascalzauberzeug pascalzauberzeug left a comment

Choose a reason for hiding this comment

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

I think we can convert the other configs

m0_can_address=config.external_mower.m0_can_address,
m1_can_address=config.external_mower.m1_can_address,
m2_can_address=config.external_mower.m2_can_address,
m_per_tick=self.M_PER_TICK, # TODO: this is a different value than in external_mower.m_per_tick!!
Copy link
Contributor

Choose a reason for hiding this comment

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

@Johannes-Thiel do you know why the mower uses M_PER_TICK and not the 0.01 from the config?

@pascalzauberzeug
Copy link
Contributor

I merged main into this branch and added a gnss configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants