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

Defenders role #82

Open
wants to merge 2 commits into
base: fsm
Choose a base branch
from
Open

Defenders role #82

wants to merge 2 commits into from

Conversation

nisarg1631
Copy link

Added defenders role and driver file for the same

Accepts as command line argument ids of two bots which are to act as defenders
Comment on lines +184 to +186
bot_ball_dir = Vector2D(self.kub.state.ballPos.y-self.kub.state.homePos[self.kub.kubs_id].y , self.kub.state.ballPos.x-self.kub.state.homePos[self.kub.kubs_id].x)
if ( abs(ball_vel_angle - bot_ball_dir.tan_inverse() )< 0.0523599):
return 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Avoid using random numbers.

Copy link
Member

Choose a reason for hiding this comment

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

@nisarg1631 Instead of using Angle threshold like this, make a variable in config file and use that variable here. Once you do that, I think we can merge this.

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.

3 participants