KRSSG / robocup

Main Code Base for SSL
21 stars 27 forks source link

Pass receive #61

Open ultrainstinct30 opened 5 years ago

ultrainstinct30 commented 5 years ago

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

thebhatman commented 5 years ago

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.

ultrainstinct30 commented 5 years ago

PassReceive

thebhatman commented 5 years ago

Since there have been recent commits and Merges in fsm branch, there are merge conflicts now. Resolve them.

saurabhkgp21 commented 5 years ago

Ref: #35

saurabhkgp21 commented 5 years ago

Do passer and receiver move parallelly with this code?

ultrainstinct30 commented 5 years ago

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.

saurabhkgp21 commented 5 years ago

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.

saurabhkgp21 commented 5 years ago

There should be a coordinate passing tactic in 'tactics/'. You can also look at that for any help.