ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
this could be solved like this :
tf_buffer = tf2_py.BufferCore(rospy.Duration(1000000))
bag = rosbag.Bag(bag)
for topic, msg, t in bag.read_messages(topics=['/tf', '/tf_static']):
for msg_tf in msg.transforms:
if topic == '/tf_static':
tf_buffer.set_transform_static(msg_tf, "default_authority")
else:
tf_buffer.set_transform(msg_tf, "default_authority")
return tf_buffer