projects
/
ufrgs_wam.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff7c92e
)
Fix scope problem in handPubThread. Join it.
author
Walter Fetter Lages
<w.fetter@ieee.org>
Wed, 19 Dec 2018 11:53:23 +0000
(09:53 -0200)
committer
Walter Fetter Lages
<w.fetter@ieee.org>
Wed, 19 Dec 2018 11:53:23 +0000
(09:53 -0200)
wam_node_sim/src/wam_node_sim.cpp
patch
|
blob
|
history
diff --git
a/wam_node_sim/src/wam_node_sim.cpp
b/wam_node_sim/src/wam_node_sim.cpp
index
10fcf0e
..
b6a3d70
100644
(file)
--- a/
wam_node_sim/src/wam_node_sim.cpp
+++ b/
wam_node_sim/src/wam_node_sim.cpp
@@
-817,7
+817,8
@@
int main(int argc,char *argv[])
WamNode<7> wam_node(wam,bhand);
ros::Rate loop(PUBLISH_FREQ);
- if(useHand) std::thread handPubThread(&WamNode<7>::publishHand,&wam_node);
+ std::thread handPubThread;
+ if(useHand) handPubThread=std::thread(&WamNode<7>::publishHand,&wam_node);
while (ros::ok())
{
@@
-827,5
+828,6
@@
int main(int argc,char *argv[])
loop.sleep();
}
+ handPubThread.join();
return 0;
}