Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
Seminar-HFO
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
Seminar-HFO
Commits
4577c119
Commit
4577c119
authored
Feb 27, 2015
by
Matthew Hausknecht
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added optional patch to rcssserver to allow for long action delays.
parent
52447fba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
0 deletions
+48
-0
README.md
README.md
+3
-0
stadium.patch
stadium.patch
+45
-0
No files found.
README.md
View file @
4577c119
...
...
@@ -13,6 +13,9 @@ HFO
2.
`cmake .`
3.
`make`
## (Optional) Patch rcssserver for longer decision making
It's necessary to patch rcssserver if the agent takes longer then two seconds to select an action. To apply the patch, run
`patch your_path/rcssserver-15.2.2/src/stadium.cpp < stadium.patch`
.
## Run
```
bash
./bin/start.py
...
...
stadium.patch
0 → 100644
View file @
4577c119
2527c2527
< const double max_msec_waited = 25 * 50;
---
> const double max_msec_waited = 25 * 5000;
2533a2534
> timeval tv_lastNotification;
2638a2640,2677
>
> // Start modifcation to prevent timeouts
> // get time difference with start of loop, first get time difference in seconds
> gettimeofday( &tv_now, NULL );
> double time_diff_notification
> = ( static_cast< double >( tv_now.tv_sec )
> + static_cast< double >( tv_now.tv_usec ) / 1000000 )
> - ( static_cast< double >( tv_lastNotification.tv_sec )
> + static_cast< double >( tv_lastNotification.tv_usec ) / 1000000 );
>
> if ((done == DS_FALSE) && (time_diff_notification > 1.0)) {
> const char *aliveMsg = "(ok say)";
> for ( int i = 0; i < MAX_PLAYER*2; ++i ) {
> if ( wait_players[i] && M_players[i]->connected() && M_players[i]->doneReceived()) {
> M_players[i]->send( aliveMsg );
> }
> }
>
> for ( int i = 0; i < 2; ++i ) {
> if ( wait_coach[i] && M_olcoaches[i]->connected() && M_olcoaches[i]->doneReceived()) {
> M_olcoaches[i]->send( aliveMsg );
> }
> }
>
> if ( wait_trainer && M_coach->connected() && M_coach->doneReceived()) {
> M_coach->send( aliveMsg );
> }
>
> for ( MonitorCont::iterator i = M_monitors.begin();
> i != M_monitors.end();
> ++i )
> {
> (*i)->sendShow();
> }
> gettimeofday( &tv_lastNotification, NULL );
>
> }
> // end modification to prevent timeouts
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment