39 from .bag_widget
import BagWidget
45 Subclass of Plugin to provide interactive bag visualization, playing(publishing) and recording
50 :param context: plugin context hook to enable adding widgets as a ROS_GUI pane, ''PluginContext''
53 self.setObjectName(
'Bag')
58 if context.serial_number() > 1:
60 self.
_widget.windowTitle() + (
' (%d)' % context.serial_number()))
61 context.add_widget(self.
_widget)
64 for bagfile
in args.bagfiles:
67 load_thread = threading.Thread(target=load_bags)
71 parser = argparse.ArgumentParser(prog=
'rqt_bag', add_help=
False)
72 Bag.add_arguments(parser)
73 return parser.parse_args(argv)
77 if os.path.isfile(arg):
80 parser.error(
"Bag file %s does not exist" % (arg))
84 group = parser.add_argument_group(
'Options for rqt_bag plugin')
85 group.add_argument(
'--clock', action=
'store_true', help=
'publish the clock time')
86 group.add_argument(
'bagfiles', type=
lambda x: Bag._isfile(parser, x),
87 nargs=
'*', default=[], help=
'Bagfiles to load')