RoboTeamTwente / roboteam_input

1 stars 0 forks source link

Feature/auto play #12

Closed RobZelluf closed 4 years ago

RobZelluf commented 6 years ago

Created autoPlay and getBall.

By pressing A + leftBumper you activate the keeper, by pressing A + rightBumper you activate the attacker.

By pressing and holding the right joystick you let the robot get the ball and put it in the field (for example when it is close to the edge).

mrlukasbos commented 6 years ago

Personally I do not like this. You actually make a terminal command to use some skills from roboteam_tactics to use autoplay. It feels hacky, and it will most likely break with our upcoming updates on roboteam_ai.

I have to admit though that I don't see another way, and I also see it's use for demonstrations. Still I have a code suggestion then:

I would suggest keeping the joystick controller as it was before, and making a new manager class, for example, joystickAutoController, which is a subclass of the joystick manager. In that case we can always have a working version of the 'normal' joystick manager.

RobZelluf commented 6 years ago

I think I get what you mean, but how is the current joystick manager not working anymore? Effectively nothing has changed if you don't actually switch to any of the autoPlay modes.

The terminal thing is definitely hacky, but right now I think it's the best way, especially since tactics is rewritten anyways.

I agree that it should be rewritten soon, but for now I think this works and is good enough. We could also just leave it on the branch and checkout if we want to use autoPlay?