Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
imu
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_lib
plugins
imu
Commits
789b42d2
Commit
789b42d2
authored
7 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
undo changes in state_block
parent
635a6a68
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
src/state_block.h
+14
-3
14 additions, 3 deletions
src/state_block.h
with
14 additions
and
3 deletions
src/state_block.h
+
14
−
3
View file @
789b42d2
...
...
@@ -47,6 +47,8 @@ public:
mutable
Notifications
notifications_
;
mutable
std
::
mutex
notifictions_mut_
;
bool
registered_
=
false
;
///< Indicate whether the state was notified as ADD or not
NodeBaseWPtr
node_ptr_
;
//< pointer to the wolf Node owning this StateBlock
std
::
atomic_bool
fixed_
;
///< Key to indicate whether the state is fixed or not
...
...
@@ -241,9 +243,18 @@ inline void StateBlock::setLocalParametrizationPtr(LocalParametrizationBasePtr _
inline
void
StateBlock
::
addNotification
(
const
StateBlock
::
Notification
_new_notification
)
{
std
::
lock_guard
<
std
::
mutex
>
lock
(
notifictions_mut_
);
notifications_
.
emplace_back
(
_new_notification
);
}
std
::
lock_guard
<
std
::
mutex
>
lock
(
notifictions_mut_
);
if
(
registered_
or
_new_notification
==
StateBlock
::
Notification
::
ADD
)
{
notifications_
.
emplace_back
(
_new_notification
);
}
registered_
=
(
_new_notification
==
StateBlock
::
Notification
::
ADD
)
?
true
:
(
_new_notification
==
StateBlock
::
Notification
::
REMOVE
)
?
false
:
registered_
;
}
inline
StateBlock
::
Notifications
StateBlock
::
consumeNotifications
()
const
{
...
...
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