Code Monkey home page Code Monkey logo

Comments (8)

AaFishy avatar AaFishy commented on September 22, 2024

Our team also has encountered the exact same error! We also have an issue with running the precomputation with sample-adf.

Output from running:
$ bash launch.sh -t 1,0,1,0,1,0 -h localhost -pre 1 & APID=$! ; sleep 120 ; kill

Returns either
<Connecting to Daemon>
or
<Idle>

But expected output is:

[INFO] Connected - adf.agent.platoon.PlatoonFire@756ec19c (PRECOMPUTATION)
[INFO] Connected - adf.agent.platoon.PlatoonPolice@366bbbe (PRECOMPUTATION)
[INFO] Connected - adf.agent.platoon.PlatoonAmbulance@2a453513 (PRECOMPUTATION)
********************
[FINISH] Connect PoliceForce (success:1)
[FINISH] Connect AmbulanceTeam (success:1)
[FINISH] Connect FireBrigade (success:1)
[FINISH] Done connecting to server (3 agents)

[EDIT] Fixed precomp output issue by changing command to (removing "& APID=$!"):
$ bash launch.sh -t 1,0,1,0,1,0 -h localhost -pre 1 ; sleep 120 ; kill

from adf-sample-agent-java.

gnardin avatar gnardin commented on September 22, 2024

Dear @stanmoon and @AaFishy

We have made some changes to the rcrs-adf-core but we have not concluded the necessary changes to the rcrs-adf-sample yet. The changes are planned to be released the corrected version soon.

Thank you for notifying us,

from adf-sample-agent-java.

stanmoon avatar stanmoon commented on September 22, 2024

Dear @gnardin,
thanks for your prompt reply.
I am wondering if you have an estimated time for the update.
Is there a previous running version I can work with meanwhile?
Thanks a lot,

from adf-sample-agent-java.

stanmoon avatar stanmoon commented on September 22, 2024

Dear @gnardin,
I am working with the version labeled 2020 online competition
(just in case there is any actual current inconsistency between this project and the core).
After inspecting the logs and configuration files in the server project I've found out that the scenario.xml does not contain the central agent locations.
I believe this might be the cause of the errors.
I have found that by changing the default map the error goes away.
For example, I ran the server as follows:
bash start-comprun.sh -m ../maps/gml/kobe/map/
Then the central agents can connect.
Screenshot from 2021-04-07 16-22-25
Moreover, the platoon agents just move back and forth.
By changing the file launch.cfg in the rcrs-adf-sample project this behavior can be improved.

#adf.agent.moduleconfig.file: config/module_sample.cfg
adf.agent.moduleconfig.file: config/module.cfg

Thanks!

from adf-sample-agent-java.

stanmoon avatar stanmoon commented on September 22, 2024

OK. I think the inconsistency is real.
I tried again in the latest version and the following errors appear (I changed the scenario definition like in the previous post).

~/rcrs/latest-version/rcrs-adf-sample$ ./launch.sh -all

> Task :launch
[ RCRS ADF Version 3.0.0 (build 20210313181747) ]

[START ] Connect to server (host:localhost, port:7000)
[INFO  ] Connected - adf.agent.office.OfficePolice@5745c864 (NON_PRECOMPUTE)
[INFO  ] Connected - adf.agent.platoon.PlatoonFire@13637915 (NON_PRECOMPUTE)
[INFO  ] Connected - adf.agent.platoon.PlatoonPolice@60d41a20 (NON_PRECOMPUTE)
[INFO  ] Connected - adf.agent.platoon.PlatoonAmbulance@3c2f9d84 (NON_PRECOMPUTE)
[INFO  ] Connected - adf.agent.office.OfficeAmbulance@7f6c5489 (NON_PRECOMPUTE)
[INFO  ] Connected - adf.agent.office.OfficeFire@1a4b3d93 (NON_PRECOMPUTE)
[FINISH] [ERROR ] Cannot Load AmbulanceCentre Control !!
[FINISH] Connect AmbulanceCentre (success:1)
[SampleKMeans] Cluster : 1
[SampleKMeans] Cluster : 6
[FINISH] [ERROR ] Cannot Load FireStation Control !!
[SampleKMeans] Cluster : 1
[FINISH] Connect FireStation (success:1)
[FINISH] [ERROR ] Cannot Load PoliceOffice Control !!
[FINISH] Connect PoliceOffice (success:1)
[FINISH] [ERROR ] Cannot Load AmbulanceTeam Tactics !!
[FINISH] Connect AmbulanceTeam (success:1)
[FINISH] [ERROR ] Cannot Load FireBrigade Tactics !!
[FINISH] Connect FireBrigade (success:1)
[INFO  ] Connected - adf.agent.platoon.PlatoonPolice@3cdce8a9 (NON_PRECOMPUTE)
[SampleKMeans] Cluster : 6
[INFO  ] Connected - adf.agent.platoon.PlatoonPolice@435e279e (NON_PRECOMPUTE)
[SampleKMeans] Cluster : 6
[INFO  ] Connected - adf.agent.platoon.PlatoonPolice@2b48199c (NON_PRECOMPUTE)
[SampleKMeans] Cluster : 6
[INFO  ] Connected - adf.agent.platoon.PlatoonPolice@4ad916e1 (NON_PRECOMPUTE)
[SampleKMeans] Cluster : 6
[INFO  ] Connected - adf.agent.platoon.PlatoonPolice@43344003 (NON_PRECOMPUTE)
[SampleKMeans] Cluster : 6
[FINISH] [ERROR ] Cannot Load PoliceForce Control !!
[FINISH] Connect PoliceForce (success:6)
[FINISH] Done connecting to server (11 agents)

from adf-sample-agent-java.

gnardin avatar gnardin commented on September 22, 2024

Dear @stanmoon
Thank you the updates and the tests. The problem is not the AmbulanceCentre, FireStation, and PoliceOffice not connecting to the server. These agents do not connect because the scenario does not include them as you identified.
The problems are the errors in the FireBrigade Tactics and AmbulanceTeam Tactics modules.
I am working on solving this problem now. Hopefully, I can upload a fixed version tonight.
Thank you,

from adf-sample-agent-java.

gnardin avatar gnardin commented on September 22, 2024

Dear @stanmoon and @AaFishy

I debugged the rcrs-adf-sample and rcrs-adf-core code. The error messages are not actually errors, they were displayed as designed. Note that the last messages indicate that the number of successful connections is 1 to all agent types, which correspond to the number of agents defined in the Test scenario.

[FINISH] Connect PoliceForce (success:1)
[FINISH] Connect AmbulanceTeam (success:1)
[FINISH] Connect FireBrigade (success:1)

Although misleading, these messages indicate that all agents of the specific type defined in the scenario were successfully loaded and connected to the server whenever the rcrs-adf-sample is launched with the number of agents of each type equals to -1.

The number of agents to connect can be defined in the command line when launch the team or in the config/launch.cfg file in the following parameter:

adf.team.office.ambulance.count: -1
adf.team.platoon.ambulance.count: -1
adf.team.office.fire.count: -1
adf.team.platoon.fire.count: -1
adf.team.office.police.count: -1
adf.team.platoon.police.count: -1

To avoid future misleading, I changed the connectors in the adf.launcher.connect package in the rcrs-adf-core to not show any ERROR message when agents cannot connect to the server. The elimination of the error message does not prevent the developer to identify that something when wrong in the connection because the developer can use the number of successfully connected agents of each types as a reference to confirm that all agents connected to the server.

Please let me know if you have any further question or comment.

Kind Regards,

from adf-sample-agent-java.

stanmoon avatar stanmoon commented on September 22, 2024

Great, thanks so much!

from adf-sample-agent-java.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.