-
Notifications
You must be signed in to change notification settings - Fork 27
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
Pass receive #61
base: fsm
Are you sure you want to change the base?
Pass receive #61
Conversation
Make a digraph for this FSM using graphviz. When you run the code, an image will be formed in Digraph folder. Put that image in this thread. |
Since there have been recent commits and Merges in fsm branch, there are merge conflicts now. Resolve them. |
utils/math_functions.py
Outdated
# y = point.y +(3.5 * BOT_RADIUS) *(math.sin(theta)) | ||
# return Vector2D(int(x), int(y)) | ||
def getPointBehindTheBall(point ,theta, factor=3.5): | ||
x = point.x +(factor * BOT_RADIUS) *(math.cos(theta)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation has been affected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ultrainstinct30 , I think in your last PR of adding variable threshold for getbehindBall, the indentation got changed. Also it would be good to remove the redundant getPointbehindBall here :
robocup/utils/math_functions.py
Line 214 in 6031170
def getPointBehindTheBall(point, theta): |
8b2d9fb
to
6648d43
Compare
Ref: #35 |
Do passer and receiver move parallelly with this code? |
Yes, passer and receiver move together. When we pass two bot ids, those two pass the ball amongst each other. The passer and receiver are decided with the help of their distance from the ball. This pass_and_receive.py is written so that the two bots pass to each other in a loop. |
Okay.. we can keep this for testing pass receive skills of bots but during the play we dont want passer and receiver to keep passing the ball among them. Role needs to be completed or failed or cancelled. |
There should be a coordinate passing tactic in 'tactics/'. You can also look at that for any help. |
I have edited pass_and_receive.py to use only skills like GoToPoint and turnAround.
In turnAround.py, the allowable error was fixed to 2xROTATION_FACTOR which is nearly 17 deg. So I changed it so that the allowable error is now a parameter with default value equal to the above value.
In math_functions.py, there were two definitions of the method getPointBehindTheBall, so I removed one of them, and changed the definition to:
x = x_0 + r.cos(theta)
y = y_0 + r.sin(theta)
with r = 3.5xBOT_RADIUS
The coordinated-pass.py is the same structure as the goalie_vs_attacker.py
I have tested the above changes 15-20 times. It works well. The current issues are that sometimes the kick is somewhat off from the receiver bot, but unless the bot is very near to the boundary, this doesn't cause much problem as the ball stops before going out of vision and the receiver goes to ball as the ball stops. Other than this, it works nearly perfectly