Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iri_tiago_gripper_module
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
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
platforms
TIAGo
iri_tiago_gripper_module
Commits
71937c36
Commit
71937c36
authored
4 years ago
by
Alejandro Lopez Gestoso
Browse files
Options
Downloads
Patches
Plain Diff
new_goal port of async actions is automatically changed to false only if the action returns running
parent
0af6f1fb
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/tiago_gripper_module/tiago_gripper_module_bt.h
+8
-9
8 additions, 9 deletions
include/tiago_gripper_module/tiago_gripper_module_bt.h
src/tiago_gripper_module_bt.cpp
+10
-5
10 additions, 5 deletions
src/tiago_gripper_module_bt.cpp
with
18 additions
and
14 deletions
include/tiago_gripper_module/tiago_gripper_module_bt.h
+
8
−
9
View file @
71937c36
...
...
@@ -399,13 +399,13 @@ class CTiagoGripperModuleBT
BT
::
NodeStatus
is_tiago_gripper_module_fb_watchdog
(
void
);
/**
* \brief Checks if the
navig
ation goal could not be reached.
* \brief Checks if the a
c
tion goal could not be reached.
*
* This function must be used to know the type of failure, once the last
* goal has finished. Specifically, it checks if it failed because the
*
navig
ation goal could not be reached.
* a
c
tion goal could not be reached.
*
* \return a BT:NodeStatus indicating whether the
navig
ation goal could not
* \return a BT:NodeStatus indicating whether the a
c
tion goal could not
* be reached (BT:NodeStatus::SUCCESS) or if it failed due to another
* reason (BT:NodeStatus::FAILURE).
*
...
...
@@ -413,14 +413,14 @@ class CTiagoGripperModuleBT
BT
::
NodeStatus
is_tiago_gripper_module_aborted
(
void
);
/**
* \brief Checks if the current
navig
ation goal has been cancelled by
* \brief Checks if the current a
c
tion goal has been cancelled by
* another goal.
*
* This function must be used to know the type of failure, once the last
* goal has finished. Specifically, it checks if it failed because the
* current
navig
ation goal has been cancelled by another goal.
* current a
c
tion goal has been cancelled by another goal.
*
* \return a BT:NodeStatus indicating whether the current
navig
ation goal
* \return a BT:NodeStatus indicating whether the current a
c
tion goal
* has been cancelled by another goal (BT:NodeStatus::SUCCESS) or if it
* failed due to another reason (BT:NodeStatus::FAILURE).
*
...
...
@@ -442,11 +442,10 @@ class CTiagoGripperModuleBT
BT
::
NodeStatus
is_tiago_gripper_module_rejected
(
void
);
/**
* \brief Checks if the g
oal information is not vali
d.
* \brief Checks if the g
rasping action faile
d.
*
* This function must be used to know the type of failure, once the last
* goal has finished. Specifically, it checks if it failed because the
* goal information is not valid and the goal will not be executed.
* goal has finished. Specifically, it checks if the grasping action has failed.
*
* \return a BT:NodeStatus indicating whether the goal information is not
* valid (BT:NodeStatus::SUCCESS) or if it failed due to another reason
...
...
This diff is collapsed.
Click to expand it.
src/tiago_gripper_module_bt.cpp
+
10
−
5
View file @
71937c36
...
...
@@ -95,7 +95,6 @@ BT::NodeStatus CTiagoGripperModuleBT::async_close_tiago_gripper(BT::TreeNode& se
else
duration_goal
=
duration
.
value
();
self
.
setOutput
(
"new_goal"
,
false
);
this
->
tiago_gripper_module
.
close
(
duration_goal
);
}
if
(
this
->
tiago_gripper_module
.
is_finished
())
...
...
@@ -106,6 +105,8 @@ BT::NodeStatus CTiagoGripperModuleBT::async_close_tiago_gripper(BT::TreeNode& se
else
return
BT
::
NodeStatus
::
FAILURE
;
}
if
(
new_goal
)
self
.
setOutput
(
"new_goal"
,
false
);
return
BT
::
NodeStatus
::
RUNNING
;
}
...
...
@@ -144,7 +145,6 @@ BT::NodeStatus CTiagoGripperModuleBT::async_open_tiago_gripper(BT::TreeNode& sel
else
duration_goal
=
duration
.
value
();
self
.
setOutput
(
"new_goal"
,
false
);
this
->
tiago_gripper_module
.
open
(
duration_goal
);
}
if
(
this
->
tiago_gripper_module
.
is_finished
())
...
...
@@ -155,6 +155,8 @@ BT::NodeStatus CTiagoGripperModuleBT::async_open_tiago_gripper(BT::TreeNode& sel
else
return
BT
::
NodeStatus
::
FAILURE
;
}
if
(
new_goal
)
self
.
setOutput
(
"new_goal"
,
false
);
return
BT
::
NodeStatus
::
RUNNING
;
}
...
...
@@ -217,7 +219,6 @@ BT::NodeStatus CTiagoGripperModuleBT::async_move_fingers_tiago_gripper(BT::TreeN
else
duration_goal
=
duration
.
value
();
self
.
setOutput
(
"new_goal"
,
false
);
this
->
tiago_gripper_module
.
move_fingers
(
left_finger_goal
,
right_finger_goal
,
duration_goal
);
}
if
(
this
->
tiago_gripper_module
.
is_finished
())
...
...
@@ -228,6 +229,8 @@ BT::NodeStatus CTiagoGripperModuleBT::async_move_fingers_tiago_gripper(BT::TreeN
else
return
BT
::
NodeStatus
::
FAILURE
;
}
if
(
new_goal
)
self
.
setOutput
(
"new_goal"
,
false
);
return
BT
::
NodeStatus
::
RUNNING
;
}
...
...
@@ -280,7 +283,6 @@ BT::NodeStatus CTiagoGripperModuleBT::async_move_fingers_multi_tiago_gripper(BT:
right_finger_goal
=
right_finger
.
value
();
duration_goal
=
duration
.
value
();
self
.
setOutput
(
"new_goal"
,
false
);
this
->
tiago_gripper_module
.
move_fingers
(
left_finger_goal
,
right_finger_goal
,
duration_goal
);
}
if
(
this
->
tiago_gripper_module
.
is_finished
())
...
...
@@ -291,6 +293,8 @@ BT::NodeStatus CTiagoGripperModuleBT::async_move_fingers_multi_tiago_gripper(BT:
else
return
BT
::
NodeStatus
::
FAILURE
;
}
if
(
new_goal
)
self
.
setOutput
(
"new_goal"
,
false
);
return
BT
::
NodeStatus
::
RUNNING
;
}
...
...
@@ -349,7 +353,6 @@ BT::NodeStatus CTiagoGripperModuleBT::async_fingers_distance_tiago_gripper(BT::T
else
duration_goal
=
duration
.
value
();
self
.
setOutput
(
"new_goal"
,
false
);
this
->
tiago_gripper_module
.
fingers_distance
(
distance_goal
,
duration_goal
);
}
if
(
this
->
tiago_gripper_module
.
is_finished
())
...
...
@@ -360,6 +363,8 @@ BT::NodeStatus CTiagoGripperModuleBT::async_fingers_distance_tiago_gripper(BT::T
else
return
BT
::
NodeStatus
::
FAILURE
;
}
if
(
new_goal
)
self
.
setOutput
(
"new_goal"
,
false
);
return
BT
::
NodeStatus
::
RUNNING
;
}
...
...
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