00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 import rospy
00035 from test_rosbag.msg import *
00036
00037 import rosbag
00038
00039 def generate_data():
00040 bag = rosbag.Bag("test/migrated_explicit_gen3.bag", "w")
00041 m = MigratedExplicit(None, 17, 58.2, "aldfkja", 82)
00042 bag.write("migrated_explicit", m, genpy.Time())
00043 bag.close()
00044
00045 bag = rosbag.Bag("test/migrated_implicit_gen3.bag", "w")
00046 m = MigratedImplicit(None, MigratedExplicit(None, 17, 58.2, "aldfkja", 82), "kljene", 16.32, 34)
00047 bag.write("migrated_implicit", m, genpy.Time())
00048 bag.close()
00049
00050 bag = rosbag.Bag("test/migrated_mixed_gen3.bag", "w")
00051 m = MigratedMixed(None, MigratedImplicit(None, MigratedExplicit(None, 17, 58.2, "aldfkja", 82), "kljene", 16.32, 34), 59)
00052 bag.write("migrated_mixed", m, genpy.Time())
00053 bag.close()
00054
00055 bag = rosbag.Bag("test/partially_migrated_gen3.bag", "w")
00056 m = PartiallyMigrated(40, MigratedExplicit(None, 17, 58.2, "aldfkja", 82), "radasdk")
00057 bag.write("partially_migrated", m, genpy.Time())
00058 bag.close()
00059
00060 bag = rosbag.Bag("test/renamed_gen3.bag", "w")
00061 m = Renamed3(2.17, [8, 2, 5, 1])
00062 bag.write("renamed", m, genpy.Time())
00063 bag.close()
00064
00065 bag = rosbag.Bag("test/converged_gen3.bag", "w")
00066 m = Converged([1.2, 3.4, 5.6, 7.8], [SimpleMigrated(11), SimpleMigrated(22), SimpleMigrated(33), SimpleMigrated(44)])
00067 bag.write("converged", m, genpy.Time())
00068 bag.close()
00069
00070 if __name__ == '__main__':
00071 generate_data()