Created
August 22, 2018 23:12
-
-
Save michalpelka/76a3168279b172cbc1bf6a577c031e29 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import rosbag | |
from tqdm import tqdm | |
from os.path import basename | |
bagFileName="3velo_2018-07-28-10-00-18_nocam.bag" | |
bagIn = rosbag.Bag(bagFileName, 'r') | |
bagOut = rosbag.Bag(basename(bagFileName)+"_noekf.bag", 'w') | |
tot = bagIn.get_message_count() | |
for topic, msg, t in tqdm(bagIn.read_messages(), total=tot): | |
if topic == '/tf': | |
#if len(msg.transforms) > 1: | |
# import pdb; pdb.set_trace() | |
#print msg.transforms[0].header.frame_id | |
if msg.transforms[0].header.frame_id == "husky/odom": | |
#import pdb; pdb.set_trace() | |
continue | |
bagOut.write(topic, msg, t) | |
bagIn.close() | |
bagOut.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment