14
14
# You should have received a copy of the GNU General Public License along
15
15
# with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
17
- from __future__ import absolute_import
18
-
19
17
import rospy
20
18
from geometry_msgs .msg import Quaternion , TransformStamped
21
19
from leap_motion .msg import Human
@@ -73,11 +71,11 @@ def frame(self, human):
73
71
self .heartbeat_publisher .publish (not ((not self .left_tfs ) and (not self .right_tfs )))
74
72
75
73
def publish_tfs (self , transforms , root_tf_name ):
76
- buffer = Buffer ()
74
+ tf_buffer = Buffer ()
77
75
tf_authority = ""
78
76
root_tf_found = False
79
77
for transform in transforms :
80
- buffer .set_transform (transform , tf_authority )
78
+ tf_buffer .set_transform (transform , tf_authority )
81
79
if transform .child_frame_id == root_tf_name :
82
80
root_tf_found = True
83
81
# If the requested root TF name isn't one of the TFs reported by Leap Motion, report all TFs relative to Leap
@@ -90,7 +88,7 @@ def publish_tfs(self, transforms, root_tf_name):
90
88
else :
91
89
for transform in transforms :
92
90
if transform .child_frame_id != root_tf_name :
93
- reparented_tf = buffer .lookup_transform (root_tf_name , transform .child_frame_id , rospy .Time ())
91
+ reparented_tf = tf_buffer .lookup_transform (root_tf_name , transform .child_frame_id , rospy .Time ())
94
92
self .transform_broadcaster .sendTransform (reparented_tf )
95
93
96
94
def common_frame (self , human , hand = None , arm_prefix = "ra_" , hand_prefix = "rh_" ):
0 commit comments