scripts
republish_tf_static.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
import
rospy
3
from
tf2_msgs.msg
import
TFMessage
4
5
msg=TFMessage()
6
7
def
callback
(data):
8
global
msg
9
if
len
(msg.transforms) == 0:
10
msg = data
11
else
:
12
msg.transforms = msg.transforms+ data.transforms
13
rospy.loginfo(
"Received /tf_static_old and republising latched /tf_static"
)
14
pub.publish(msg)
15
16
if
__name__ ==
'__main__'
:
17
rospy.init_node(
'listener'
, anonymous=
True
)
18
rospy.Subscriber(
"tf_static_old"
, TFMessage, callback)
19
pub = rospy.Publisher(
'tf_static'
, TFMessage, queue_size=10, latch=
True
)
20
rospy.spin()
republish_tf_static.callback
def callback(data)
Definition:
republish_tf_static.py:7
len
size_t len(handle h)
rtabmap_util
Author(s): Mathieu Labbe
autogenerated on Mon Apr 28 2025 02:40:50