From f2ead32c3ed8f57e65622ca6585eacf5e3d992a3 Mon Sep 17 00:00:00 2001 From: themarex <themarex@042f3d55-54a8-47e9-b7fb-15903f145c44> Date: Mon, 29 Sep 2014 08:39:10 +0000 Subject: [PATCH] Fix locking for getAngularMomentum and getLinearMomentum git-svn-id: http://svn.code.sf.net/p/simox/code/trunk@700 042f3d55-54a8-47e9-b7fb-15903f145c44 --- SimDynamics/DynamicsEngine/BulletEngine/BulletRobot.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SimDynamics/DynamicsEngine/BulletEngine/BulletRobot.cpp b/SimDynamics/DynamicsEngine/BulletEngine/BulletRobot.cpp index 0046edad1..5f672ea2f 100644 --- a/SimDynamics/DynamicsEngine/BulletEngine/BulletRobot.cpp +++ b/SimDynamics/DynamicsEngine/BulletEngine/BulletRobot.cpp @@ -1208,7 +1208,7 @@ Eigen::Vector3f BulletRobot::getComVelocityGlobal( VirtualRobot::RobotNodeSetPtr Eigen::Vector3f BulletRobot::getLinearMomentumGlobal( VirtualRobot::RobotNodeSetPtr set) { - boost::recursive_mutex::scoped_lock scoped_lock(*engineMutexPtr); + MutexLockPtr lock = getScopedLock(); Eigen::Vector3f linMomentum = Eigen::Vector3f::Zero(); for (unsigned int i = 0; i < set->getSize(); i++) { @@ -1224,7 +1224,7 @@ Eigen::Vector3f BulletRobot::getLinearMomentumGlobal( VirtualRobot::RobotNodeSet Eigen::Vector3f BulletRobot::getAngularMomentumGlobal( VirtualRobot::RobotNodeSetPtr set) { - boost::recursive_mutex::scoped_lock scoped_lock(*engineMutexPtr); + MutexLockPtr lock = getScopedLock(); Eigen::Vector3f angMomentum = Eigen::Vector3f::Zero(); for (unsigned int i = 0; i < set->getSize(); i++) { -- GitLab