[Documentation] [TitleIndex] [WordIndex

This page lists changes that are made in the 1.0.x series of geometry (Box Turtle).

1.0.4 (forthcoming)

1.0.3 (2010-06-14)

1.0.2 (2010-03-08)

1.0.1 (2010-02-09)

1.0.0 (2010-01-12)

Notes about recent changes

There is a lot of new documentation on the wiki at tf

Rebagging script

   1 #!/usr/bin/env python
   2 
   3 NAME = 'tf_message_to_tf.py'
   4 PKG = 'rosrecord'
   5 import roslib; roslib.load_manifest(PKG)
   6 import rospy
   7 import rosrecord
   8 import os
   9 
  10 def split_rawstereo(inbags):
  11   for b in inbags:
  12     print "Trying to migrating file: %s"%b
  13     outbag = b+'.tmp'
  14     rebag = rosrecord.Rebagger(outbag)
  15     try:
  16       for (topic, msg, t) in rosrecord.logplayer(b, raw=True):
  17         if topic == 'tf_message':
  18           rebag.add('tf', msg, t, raw=True)
  19         elif topic == '/tf_message':
  20           rebag.add('/tf', msg, t, raw=True)
  21         else:
  22           rebag.add(topic, msg, t, raw=True)
  23       rebag.close()
  24     except rosrecord.ROSRecordException, e:
  25       print " Migration failed: %s"%(e.message)
  26       os.remove(outbag)
  27       continue
  28 
  29     oldnamebase = b+'.old'
  30     oldname = oldnamebase
  31     i = 1
  32     while os.path.isfile(oldname):
  33       i=i+1
  34       oldname = oldnamebase + str(i)
  35     os.rename(b, oldname)
  36     os.rename(outbag, b)
  37     print " Migration successful.  Original stored as: %s"%oldname
  38 
  39 if __name__ == '__main__':
  40   import sys
  41   if len(sys.argv) >= 2:
  42     split_rawstereo(sys.argv[1:])
  43   else:
  44     print "usage: %s bag1 [bag2 bag3 ...]"%NAME

2022-05-28 12:37