Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iri_action_server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
labrobotica
ros
iri_core
iri_action_server
Commits
3322344f
Commit
3322344f
authored
13 years ago
by
Sergi Hernandez
Browse files
Options
Downloads
Patches
Plain Diff
Modified the iri action server to use the isActive() function in the execute callback function.
parent
3cc8a8f9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/iri_action_server/iri_action_server.h
+7
-6
7 additions, 6 deletions
include/iri_action_server/iri_action_server.h
with
7 additions
and
6 deletions
include/iri_action_server/iri_action_server.h
+
7
−
6
View file @
3322344f
...
@@ -73,7 +73,7 @@ class IriActionServer
...
@@ -73,7 +73,7 @@ class IriActionServer
typedef
boost
::
shared_ptr
<
Feedback
>
FeedbackPtr
;
typedef
boost
::
shared_ptr
<
Feedback
>
FeedbackPtr
;
private:
private:
/**
/**
* \brief Start Callback object
* \brief Start Callback object
*
*
...
@@ -307,6 +307,7 @@ IriActionServer<ActionSpec>::IriActionServer(ros::NodeHandle & nh, const std::st
...
@@ -307,6 +307,7 @@ IriActionServer<ActionSpec>::IriActionServer(ros::NodeHandle & nh, const std::st
template
<
class
ActionSpec
>
template
<
class
ActionSpec
>
IriActionServer
<
ActionSpec
>::~
IriActionServer
(
void
)
IriActionServer
<
ActionSpec
>::~
IriActionServer
(
void
)
{
{
ROS_DEBUG
(
"IriActionServer::Destructor"
);
ROS_DEBUG
(
"IriActionServer::Destructor"
);
}
}
...
@@ -359,10 +360,10 @@ void IriActionServer<ActionSpec>::executeCallback(const GoalConstPtr& goal)
...
@@ -359,10 +360,10 @@ void IriActionServer<ActionSpec>::executeCallback(const GoalConstPtr& goal)
start_action_callback_
(
goal
);
start_action_callback_
(
goal
);
// boolean to control action status
// boolean to control action status
bool
is_active
=
true
;
//
bool is_active = true;
// while action is active
// while action is active
while
(
is_a
ctive
)
while
(
this
->
as_
.
isA
ctive
()
)
{
{
ROS_DEBUG
(
"IriActionServer::executeCallback::Active!"
);
ROS_DEBUG
(
"IriActionServer::executeCallback::Active!"
);
...
@@ -371,17 +372,17 @@ void IriActionServer<ActionSpec>::executeCallback(const GoalConstPtr& goal)
...
@@ -371,17 +372,17 @@ void IriActionServer<ActionSpec>::executeCallback(const GoalConstPtr& goal)
if
(
as_
.
isPreemptRequested
()
||
!
ros
::
ok
()
)
if
(
as_
.
isPreemptRequested
()
||
!
ros
::
ok
()
)
{
{
ROS_DEBUG
(
"IriActionServer::executeCallback::PREEMPTED!"
);
ROS_DEBUG
(
"IriActionServer::executeCallback::PREEMPTED!"
);
is_active
=
false
;
//
is_active = false;
// stop action
// stop action
stop_action_callback_
();
stop_action_callback_
();
as_
.
set
Preemp
ted
();
as_
.
set
Abor
ted
();
}
}
// check if action has finished
// check if action has finished
else
if
(
is_finished_callback_
()
)
else
if
(
is_finished_callback_
()
)
{
{
ROS_DEBUG
(
"IriActionServer::executeCallback::FINISH!"
);
ROS_DEBUG
(
"IriActionServer::executeCallback::FINISH!"
);
is_active
=
false
;
//
is_active = false;
// get action result
// get action result
ResultPtr
result
(
new
Result
);
ResultPtr
result
(
new
Result
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment