plugin/test_plugin.py
Go to the documentation of this file.
1 from app_manager import AppManagerPlugin
2 from std_msgs.msg import String
3 import rospy
4 
6  def __init__(self):
7  super(TestPlugin, self).__init__()
8  self.pub = rospy.Publisher('/test_plugin', String)
9  #wait for listener
10  while self.pub.get_num_connections() == 0:
11  rospy.logwarn('wait for subscriber...')
12 
13  def app_manager_start_plugin(self, app, ctx, plugin_args):
14  self.start_time = rospy.Time.now()
15  self.pub.publish("{{'start_plugin': {}}}".format(plugin_args))
16 
17  def app_manager_stop_plugin(self, app, ctx, plugin_args):
18  self.pub.publish(
19  "{{'stop_plugin': {},"
20  "'exit_code': {},"
21  "'stopped': {},"
22  "'timeout': {},"
23  "}}".format(plugin_args,
24  ctx['exit_code'],
25  ctx['stopped'],
26  ctx['timeout']))
27  ctx['test_app_exit_code'] = 0
28  return ctx
def app_manager_stop_plugin(self, app, ctx, plugin_args)
def app_manager_start_plugin(self, app, ctx, plugin_args)


app_manager
Author(s): Jeremy Leibs, Ken Conley, Yuki Furuta
autogenerated on Thu Oct 13 2022 02:59:17