Main Page
Namespaces
Classes
Files
File List
nodes
tf_connector.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
__author__ =
'mehdi tlili'
3
import
rospy
4
from
tf2_msgs.msg
import
TFMessage
5
import
tf
6
7
class
Remapper
(object):
8
9
def
__init__
(self):
10
self.
br
=
tf.TransformBroadcaster
()
11
rospy.Subscriber(
"/tf"
, TFMessage, self.
tf_remapper
)
12
13
def
tf_remapper
(self, msg):
14
15
if
msg.transforms[0].header.frame_id ==
"/robot0"
:
16
self.br.sendTransform((0, 0, 0),
17
tf.transformations.quaternion_from_euler(0, 0, 0),
18
rospy.Time.now(),
19
"base_footprint"
,
20
"robot0"
)
21
22
23
if
__name__ ==
'__main__'
:
24
rospy.init_node(
'remapper_nav'
)
25
remapper =
Remapper
()
26
rospy.spin()
tf_connector.Remapper.tf_remapper
def tf_remapper(self, msg)
Definition:
tf_connector.py:13
tf_connector.Remapper.__init__
def __init__(self)
Definition:
tf_connector.py:9
tf_connector.Remapper
Definition:
tf_connector.py:7
tf_connector.Remapper.br
br
Definition:
tf_connector.py:10
tf::TransformBroadcaster
turtlebot_stdr
Author(s): Mehdi Tlili
autogenerated on Mon Jun 10 2019 15:44:58