Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

PID settings should go in their own yaml #53

Open
KenwoodFox opened this issue Mar 2, 2022 · 2 comments
Open

PID settings should go in their own yaml #53

KenwoodFox opened this issue Mar 2, 2022 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@KenwoodFox
Copy link
Member

This is low priority but simple enough

@KenwoodFox KenwoodFox added enhancement New feature or request good first issue Good for newcomers labels Mar 2, 2022
@RishiKumarRay
Copy link

can you elaboarte this ?

@KenwoodFox
Copy link
Member Author

KenwoodFox commented Mar 3, 2022

can you elaboarte this ?

Yep! The pid settings should be in their own yaml instead of in hardware.yaml, fixing this will involve using the yaml loader to load the seperate settings file when adjusting PID

The main reason for this, is that the hardware config is useful for in-the-pits work, but the pid is not.

Start under rio/constants and break the pid sections away, should look something like this:

robot_hardware.yaml

subsytem:
	motor_id: 2
	another_motor_id: 69

robot_pid.yaml

subsystem:
	motor_kp: 0
	motor_kd: 0
	motor_ki: 69

etc.

And to load them, you'll need another load command in python:

constants = getConstants("robot_hardware")
pidConstants = getConstants("robot_pid")

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Status: No status
Development

No branches or pull requests

2 participants