Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gz_gep_tools
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
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Olivier Stasse
gz_gep_tools
Commits
9c64d532
Commit
9c64d532
authored
1 week ago
by
Olivier Stasse
Browse files
Options
Downloads
Plain Diff
Merge branch 'fix/lock_guard' into 'main'
Fix lock_guard not being used properly See merge request
ostasse/gz_gep_tools!1
parents
a46c2a90
66bd145c
No related branches found
Branches containing commit
Tags
v1.0.1
1 merge request
!1
Fix lock_guard not being used properly
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/joint_state_interface.cc
+2
-2
2 additions, 2 deletions
src/joint_state_interface.cc
with
2 additions
and
2 deletions
src/joint_state_interface.cc
+
2
−
2
View file @
9c64d532
...
...
@@ -157,7 +157,7 @@ void JointStateInterface::CallbackJointState(
const
gz
::
msgs
::
Model
&
a_gz_model_msg
)
{
std
::
lock_guard
(
gz_robot_joints_
.
lock_state_access_
)
;
auto
lock
=
std
::
lock_guard
{
gz_robot_joints_
.
lock_state_access_
}
;
for
(
auto
jointItr
=
a_gz_model_msg
.
joint
().
begin
();
jointItr
!=
a_gz_model_msg
.
joint
().
end
();
...
...
@@ -229,7 +229,7 @@ bool JointStateInterface::GetPosVel(RobotCtrlJointInfos &rbt_ctrl_joint_infos,
<<
std
::
endl
;
return
false
;
}
std
::
lock_guard
(
gz_robot_joints_
.
lock_state_access_
)
;
auto
lock
=
std
::
lock_guard
{
gz_robot_joints_
.
lock_state_access_
}
;
time
=
(
double
)
gz_robot_joints_
.
time_sec_
+
1e-9
*
(
double
)
gz_robot_joints_
.
time_nsec_
;
for
(
auto
ctrl_joint_it
=
rbt_ctrl_joint_infos
.
begin
();
ctrl_joint_it
!=
rbt_ctrl_joint_infos
.
end
();
...
...
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