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
a4141bae
Commit
a4141bae
authored
Aug 12, 2017
by
drallensmith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removal of setLastActionStatus()
parent
095319b4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
17 deletions
+16
-17
src/agent.cpp
src/agent.cpp
+16
-16
src/agent.h
src/agent.h
+0
-1
No files found.
src/agent.cpp
View file @
a4141bae
...
@@ -276,16 +276,16 @@ void Agent::actionImpl() {
...
@@ -276,16 +276,16 @@ void Agent::actionImpl() {
setLastActionStatusCollision
(
may_fix
,
this
->
doTurn
(
params
[
0
]));
setLastActionStatusCollision
(
may_fix
,
this
->
doTurn
(
params
[
0
]));
break
;
break
;
case
TACKLE
:
case
TACKLE
:
setLastActionStatus
(
this
->
doTackle
(
params
[
0
],
false
)
);
last_action_status
=
this
->
doTackle
(
params
[
0
],
false
);
break
;
break
;
case
KICK
:
case
KICK
:
setLastActionStatus
(
this
->
doKick
(
params
[
0
],
params
[
1
])
);
last_action_status
=
this
->
doKick
(
params
[
0
],
params
[
1
]
);
break
;
break
;
case
KICK_TO
:
case
KICK_TO
:
if
(
feature_extractor
!=
NULL
)
{
if
(
feature_extractor
!=
NULL
)
{
setLastActionStatus
(
Body_SmartKick
(
Vector2D
(
feature_extractor
->
absoluteXPos
(
params
[
0
]),
last_action_status
=
Body_SmartKick
(
Vector2D
(
feature_extractor
->
absoluteXPos
(
params
[
0
]),
feature_extractor
->
absoluteYPos
(
params
[
1
])),
feature_extractor
->
absoluteYPos
(
params
[
1
])),
params
[
2
],
params
[
2
]
*
0.99
,
3
).
execute
(
this
)
);
params
[
2
],
params
[
2
]
*
0.99
,
3
).
execute
(
this
);
}
}
break
;
break
;
case
MOVE_TO
:
case
MOVE_TO
:
...
@@ -308,41 +308,41 @@ void Agent::actionImpl() {
...
@@ -308,41 +308,41 @@ void Agent::actionImpl() {
setLastActionStatusCollision
(
may_fix
,
Body_Intercept
().
execute
(
this
));
setLastActionStatusCollision
(
may_fix
,
Body_Intercept
().
execute
(
this
));
break
;
break
;
case
MOVE
:
case
MOVE
:
setLastActionStatus
(
this
->
doMove
()
);
last_action_status
=
this
->
doMove
(
);
break
;
break
;
case
SHOOT
:
case
SHOOT
:
setLastActionStatus
(
this
->
doSmartKick
()
);
last_action_status
=
this
->
doSmartKick
(
);
break
;
break
;
case
PASS
:
case
PASS
:
setLastActionStatus
(
this
->
doPassTo
(
int
(
params
[
0
])
));
last_action_status
=
this
->
doPassTo
(
int
(
params
[
0
]
));
break
;
break
;
case
DRIBBLE
:
case
DRIBBLE
:
setLastActionStatus
(
this
->
doDribble
()
);
last_action_status
=
this
->
doDribble
(
);
break
;
break
;
case
CATCH
:
case
CATCH
:
setLastActionStatus
(
this
->
doCatch
()
);
last_action_status
=
this
->
doCatch
(
);
break
;
break
;
case
NOOP
:
case
NOOP
:
setLastActionStatus
(
false
)
;
last_action_status
=
false
;
break
;
break
;
case
QUIT
:
case
QUIT
:
std
::
cout
<<
"Got quit from agent."
<<
std
::
endl
;
std
::
cout
<<
"Got quit from agent."
<<
std
::
endl
;
handleExit
();
handleExit
();
return
;
return
;
case
REDUCE_ANGLE_TO_GOAL
:
case
REDUCE_ANGLE_TO_GOAL
:
setLastActionStatus
(
this
->
doReduceAngleToGoal
()
);
last_action_status
=
this
->
doReduceAngleToGoal
(
);
break
;
break
;
case
MARK_PLAYER
:
case
MARK_PLAYER
:
setLastActionStatus
(
this
->
doMarkPlayer
(
int
(
params
[
0
])
));
last_action_status
=
this
->
doMarkPlayer
(
int
(
params
[
0
]
));
break
;
break
;
case
DEFEND_GOAL
:
case
DEFEND_GOAL
:
setLastActionStatus
(
this
->
doDefendGoal
()
);
last_action_status
=
this
->
doDefendGoal
(
);
break
;
break
;
case
GO_TO_BALL
:
case
GO_TO_BALL
:
setLastActionStatus
(
this
->
doGoToBall
()
);
last_action_status
=
this
->
doGoToBall
(
);
break
;
break
;
case
REORIENT
:
case
REORIENT
:
setLastActionStatus
(
this
->
doReorient
()
);
last_action_status
=
this
->
doReorient
(
);
break
;
break
;
default:
default:
std
::
cerr
<<
"ERROR: Unsupported Action: "
std
::
cerr
<<
"ERROR: Unsupported Action: "
...
...
src/agent.h
View file @
a4141bae
...
@@ -99,7 +99,6 @@ protected:
...
@@ -99,7 +99,6 @@ protected:
bool
doDefendGoal
();
bool
doDefendGoal
();
bool
doGoToBall
();
bool
doGoToBall
();
bool
doNewAction1
();
bool
doNewAction1
();
inline
void
setLastActionStatus
(
bool
likely_success
)
{
last_action_status
=
likely_success
;
}
void
setLastActionStatusCollision
(
bool
may_fix
,
bool
likely_success
);
void
setLastActionStatusCollision
(
bool
may_fix
,
bool
likely_success
);
...
...
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