frc1418 / 2018-robot

:robot: Code for our 2018 competition robot, Panthera.
MIT License
3 stars 2 forks source link

Position reversal is sketchy #123

Closed ErikBoesen closed 6 years ago

ErikBoesen commented 6 years ago

In opposite side scale auto, we switch between left and right positions. This change persists across runs, though. Won't really matter in competition as we always reboot the robot, but it's annoying for testing and generally a messy way to do things.

ArchdukeTim commented 6 years ago

I imagine this has to do with a value stored in networktables?

ErikBoesen commented 6 years ago

Yes, it does.

ArchdukeTim commented 6 years ago

This will happen in competition if you don't restart the dashboard as well. Has to do with the way nt stores things. Where in the code does it use it, cause theoretically you should be setting this value at the beginning of auto anyway

ErikBoesen commented 6 years ago

@twinters007 Do you have an idea for handling this a better way? We can't afford to let the robot spin the other direction and cross out of the null zone into the other team's territory; that would be a gigantic penalty.

JosephCarpenter commented 6 years ago

Should we just repeat the same code from the other part of the scale autonomous rather than switching, at least until we come up with a better idea? A little repetition imo is not as bad as non-functionality.

ErikBoesen commented 6 years ago

@JosephCarpenter My PR fixed this.

ErikBoesen commented 6 years ago

We're just using target_direction to get the direction relative to the actual target now.