Functions | |
def | read_file |
Variables | |
list | arm_joint_names |
tuple | effort = map( lambda x: js.effort[x], idx ) |
tuple | idx = map( joint_states[0].name.index, joint_names ) |
list | in_fname = sys.argv[1] |
list | joint_names = [] |
tuple | joint_states = read_file( in_fname, '/joint_states' ) |
tuple | l_arm_joint_names = map(lambda s: s.replace('lr_', 'l_'), arm_joint_names ) |
list | last_time = joint_states[0] |
list | out_fname = sys.argv[2] |
tuple | pos = map( lambda x: js.position[x], idx ) |
tuple | r_arm_joint_names = map(lambda s: s.replace('lr_', 'r_'), arm_joint_names ) |
tuple | row = sum( [[time], pos, vel, effort], [] ) |
tuple | time = (js.header.stamp - last_time) |
tuple | vel = map( lambda x: js.velocity[x], idx ) |
tuple | writer = csv.writer( open( out_fname, 'wb' ), delimiter = ',', quotechar = '|' ) |
def rosbagtocsv.read_file | ( | fname, | |
topic | |||
) |
Definition at line 12 of file rosbagtocsv.py.
00001 ['lr_shoulder_pan_joint', 00002 'lr_shoulder_lift_joint', 00003 'lr_upper_arm_roll_joint', 00004 'lr_elbow_flex_joint', 00005 'lr_forearm_roll_joint', 00006 'lr_wrist_flex_joint', 00007 'lr_wrist_roll_joint']
Definition at line 25 of file rosbagtocsv.py.
tuple rosbagtocsv::effort = map( lambda x: js.effort[x], idx ) |
Definition at line 78 of file rosbagtocsv.py.
tuple rosbagtocsv::idx = map( joint_states[0].name.index, joint_names ) |
Definition at line 63 of file rosbagtocsv.py.
list rosbagtocsv::in_fname = sys.argv[1] |
Definition at line 43 of file rosbagtocsv.py.
Definition at line 37 of file rosbagtocsv.py.
tuple rosbagtocsv::joint_states = read_file( in_fname, '/joint_states' ) |
Definition at line 55 of file rosbagtocsv.py.
tuple rosbagtocsv::l_arm_joint_names = map(lambda s: s.replace('lr_', 'l_'), arm_joint_names ) |
Definition at line 34 of file rosbagtocsv.py.
Definition at line 73 of file rosbagtocsv.py.
list rosbagtocsv::out_fname = sys.argv[2] |
Definition at line 44 of file rosbagtocsv.py.
tuple rosbagtocsv::pos = map( lambda x: js.position[x], idx ) |
Definition at line 76 of file rosbagtocsv.py.
tuple rosbagtocsv::r_arm_joint_names = map(lambda s: s.replace('lr_', 'r_'), arm_joint_names ) |
Definition at line 35 of file rosbagtocsv.py.
Definition at line 80 of file rosbagtocsv.py.
tuple rosbagtocsv::time = (js.header.stamp - last_time) |
Definition at line 79 of file rosbagtocsv.py.
tuple rosbagtocsv::vel = map( lambda x: js.velocity[x], idx ) |
Definition at line 77 of file rosbagtocsv.py.
tuple rosbagtocsv::writer = csv.writer( open( out_fname, 'wb' ), delimiter = ',', quotechar = '|' ) |
Definition at line 65 of file rosbagtocsv.py.