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')
57 self.
_widget = BagWidget(context, args.clock)
58 if context.serial_number() > 1:
59 self._widget.setWindowTitle(
60 self._widget.windowTitle() + (
' (%d)' % context.serial_number()))
61 context.add_widget(self.
_widget)
64 for bagfile
in args.bagfiles:
65 self._widget.load_bag(bagfile)
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')
90 self._widget.shutdown_all()
def save_settings(self, plugin_settings, instance_settings)
def shutdown_plugin(self)
def restore_settings(self, plugin_settings, instance_settings)
def _parse_args(self, argv)
def __init__(self, context)
def add_arguments(parser)