LARG / HFO

Half Field Offense in Robocup 2D Soccer
MIT License
232 stars 93 forks source link

What is order of communication say and hear between agents? #94

Open cp-lab-uts opened 4 years ago

cp-lab-uts commented 4 years ago

For example, if agent1 say to ask help, agent2 get that and say some information, before hearing this information, agent1 cannot take action.

cp-lab-uts commented 4 years ago

When the agent tries to communicate, there is an error:

Traceback (most recent call last): File "./example/transferL.py", line 407, in main() File "./example/transferL.py", line 326, in main msg = hfo_env.hear() File "/home/congcong/.local/lib/python3.6/site-packages/hfo/hfo.py", line 171, in hear return hfo_lib.hear(self.obj).decode('utf-8') UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0 in position 0: invalid continuation byte

pedMatias commented 4 years ago

@congyoubanmian777 I didn't understood your problem. But answering to your question, "hear" should be called after the command "say". Although, "hear" and "say" shouldn't throw any exception by themselves, per say. I think the problem is more related with the characters that you are using. I have been using the hear and say commands. If you use "hear" before "say", it should return an empty string