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
#!/usr/bin/env python2 | |
""" | |
merge accel and gyro message into one IMU topic in the given bag | |
""" | |
import rosbag | |
import sys | |
from sensor_msgs.msg import Imu | |
def main(): | |
files = sys.argv[1:] |
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
def get_data_from_xls(filename, column_letters=(), column_titles=()): | |
""" | |
Fetch data in given columns from a xls/xlsx file | |
Specify columns either by letters (e.g. ('A', 'B', 'AE')) or by titles in the first row | |
Return a list of dict, with the given letters or titles as keys | |
""" | |
wb = load_workbook(filename='data.xlsx') | |
sheetname = wb.sheetnames[0] # assume first sheet in the workbook | |
sheet = wb[sheetname] | |
print('Reading %s in %s' % (sheetname, filename)) |