From: Kyle Maroney Date: Mon, 12 Nov 2012 16:22:02 +0000 (+0000) Subject: Not necessary to lock the scope for the real-time interface. Previous falling out... X-Git-Url: http://git.ece.ufrgs.br/?a=commitdiff_plain;h=efbed9a088f96637037be5aaaa3a67b96b50d917;p=barrett-ros-pkg.git Not necessary to lock the scope for the real-time interface. Previous falling out of RT on PC/104 now resolved. --- diff --git a/wam_robot/wam_node/src/wam_node.cpp b/wam_robot/wam_node/src/wam_node.cpp index ada5bd9..866ca0b 100644 --- a/wam_robot/wam_node/src/wam_node.cpp +++ b/wam_robot/wam_node/src/wam_node.cpp @@ -66,7 +66,7 @@ #include static const int PUBLISH_FREQ = 250; // Default Control Loop / Publishing Frequency -static const int BHAND_PUBLISH_FREQ = 10; // Publishing Frequency for the BarretHand +static const int BHAND_PUBLISH_FREQ = 5; // Publishing Frequency for the BarretHand static const double SPEED = 0.03; // Default Cartesian Velocity using namespace barrett; @@ -772,8 +772,6 @@ template } else if (new_rt_cmd) { - BARRETT_SCOPED_LOCK(pm.getMutex()); - //Forces us into real-time ramp.reset(); // reset the ramp to 0 ramp.setSlope(cart_vel_mag); cart_dir.setValue(rt_cv_cmd); // set our cartesian direction to subscribed command @@ -807,8 +805,6 @@ template } else if (new_rt_cmd) { - BARRETT_SCOPED_LOCK(pm.getMutex()); - //Forces us into real-time ramp.reset(); // reset the ramp to 0 ramp.setSlope(ortn_vel_mag); // updating the commanded angular velocity magnitude rpy_cmd.setValue(rt_ortn_cmd); // set our angular rpy command to subscribed command @@ -831,8 +827,6 @@ template } else if (new_rt_cmd) { - BARRETT_SCOPED_LOCK(pm.getMutex()); - //Forces us into real-time jv_track.setValue(rt_jv_cmd); // set our joint velocity to subscribed command } jnt_vel_status = true; @@ -852,8 +846,6 @@ template } else if (new_rt_cmd) { - BARRETT_SCOPED_LOCK(pm.getMutex()); - //Forces us into real-time jp_track.setValue(rt_jp_cmd); // set our joint position to subscribed command jp_rl.setLimit(rt_jp_rl); // set our rate limit to subscribed rate to control the rate of the moves } @@ -876,8 +868,6 @@ template } else if (new_rt_cmd) { - BARRETT_SCOPED_LOCK(pm.getMutex()); - //Forces us into real-time cp_track.setValue(rt_cp_cmd); // Set our cartesian positions to subscribed command cp_rl.setLimit(rt_cp_rl); // Updating the rate limit to subscribed rate to control the rate of the moves }