Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 import roslib; roslib.load_manifest('srs_likelihood_calculation')
00015 import rospy
00016 from std_msgs.msg import String
00017
00018 from random import choice
00019
00020 """
00021 tasks=['get milk table1','get book table2','bring a cup of tea','open the door','get cup table1','help me walk around','cook paster','hoover the living room','get milk table2','get book table1','get cup table2','get milk fridge','get cup table3','help me walk around']
00022
00023 intervals= [2,5,3,4,7,8,9,10,15,17,19,20]
00024
00025 """
00026
00027
00028
00029 foo = ['table2', 'table1','fridge']
00030
00031 def historical_data_publisher():
00032 pub = rospy.Publisher('historical_data', String)
00033 rospy.init_node('DEM_talker')
00034 while not rospy.is_shutdown():
00035
00036
00037 action="move(base,%s)"%choice(foo)
00038 actions=[action]
00039 actions.append('detect(milkbox)')
00040 action="move(base,%s)"%choice(foo)
00041 actions.append(action)
00042 actions.append('detect(milkbox)')
00043 actions.append('grasp(Milk box)')
00044 actions.append('place_on_tray(Milk box)')
00045
00046
00047 str=', '.join(actions)
00048
00049 print str
00050
00051
00052 pub.publish(String(str))
00053
00054
00055 rospy.sleep(1.0)
00056 if __name__ == '__main__':
00057 try:
00058 historical_data_publisher()
00059 except rospy.ROSInterruptException: pass