Main Page
Namespaces
Classes
Files
File List
File Members
launch
jfr2018
filterBagTF.py
Go to the documentation of this file.
1
import
rosbag
2
from
tf.msg
import
tfMessage
3
with
rosbag.Bag
(
'2012-01-25-12-14-25-noOdomCombined.bag'
,
'w'
)
as
outbag:
4
for
topic, msg, t
in
rosbag.Bag
(
'2012-01-25-12-14-25.bag'
).read_messages():
5
if
topic ==
"/tf"
and
msg.transforms:
6
newList = [];
7
for
m
in
msg.transforms:
8
if
m.header.frame_id !=
"odom_combined"
:
9
newList.append(m)
10
else
:
11
print
'map frame removed!'
12
if
len(newList)>0:
13
msg.transforms = newList
14
outbag.write(topic, msg, t)
15
else
:
16
outbag.write(topic, msg, t)
rosbag::Bag
rtabmap_ros
Author(s): Mathieu Labbe
autogenerated on Mon Dec 14 2020 03:42:19