Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
wolf_ros_node
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
mobile_robotics
wolf_projects
wolf_ros
wolf_ros_node
Commits
d1e61d44
Commit
d1e61d44
authored
5 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
working appearently
parent
8f8d0200
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!11
new release
,
!10
new release
,
!2
Multithread
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/node.cpp
+6
-6
6 additions, 6 deletions
src/node.cpp
with
6 additions
and
6 deletions
src/node.cpp
+
6
−
6
View file @
d1e61d44
...
...
@@ -171,6 +171,7 @@ void WolfRosNode::broadcastTf()
void
WolfRosNode
::
solveLoop
()
{
WOLF_DEBUG
(
"Started solver loop"
);
ros
::
Rate
solverRate
(
1
/
solver_period_
);
while
(
ros
::
ok
())
...
...
@@ -181,7 +182,7 @@ void WolfRosNode::solveLoop()
if
(
ros
::
isShuttingDown
())
break
;
}
WOLF_
INFO
(
"Solver loop finished"
);
WOLF_
DEBUG
(
"Solver loop finished"
);
}
int
main
(
int
argc
,
char
**
argv
)
...
...
@@ -198,7 +199,7 @@ int main(int argc, char **argv)
ros
::
Time
last_solve_time
=
ros
::
Time
(
0
);
// Solver thread
std
::
thread
(
&
WolfRosNode
::
solveLoop
,
&
wolf_node
)
.
detach
()
;
std
::
thread
solver_thread
(
&
WolfRosNode
::
solveLoop
,
&
wolf_node
);
while
(
ros
::
ok
())
{
...
...
@@ -227,10 +228,9 @@ int main(int argc, char **argv)
// relax to fit output rate
loopRate
.
sleep
();
}
WOLF_INFO
(
"Node is shutting down outside loop... waiting for the thread to stop..."
);
//solver_thread.join();
//std::terminate();
WOLF_INFO
(
"thread stopped."
);
WOLF_DEBUG
(
"Node is shutting down outside loop... waiting for the thread to stop..."
);
solver_thread
.
join
();
WOLF_DEBUG
(
"thread stopped."
);
// file.close();
return
0
;
...
...
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