Skip to content

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