diff --git a/.gitignore b/.gitignore index 8d4c87d3..23a31eb9 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ *.zip *.bag *.swo +*.dat +*.pcd \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index bbf2226e..f8614b0c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,8 +47,6 @@ dist: trusty sudo: required language: - generic -cache: - - apt # Configuration variables. All variables are global now, but this can be used to # trigger a build matrix for different ROS distributions if desired. @@ -59,6 +57,7 @@ env: - CI_SOURCE_PATH=$(pwd) - CATKIN_OPTIONS=$CI_SOURCE_PATH/catkin.options - ROS_PARALLEL_JOBS='-j8 -l6' + - PYTHONPATH=$PYTHONPATH:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages #- ROSINSTALL_FILE=$CI_SOURCE_PATH/dependencies.rosinstall ################################################################################ diff --git a/costar_bringup/config/iiwa_s_model_camera.rviz b/costar_bringup/config/iiwa_s_model_camera.rviz index 71c864b9..3d49f560 100644 --- a/costar_bringup/config/iiwa_s_model_camera.rviz +++ b/costar_bringup/config/iiwa_s_model_camera.rviz @@ -6,17 +6,14 @@ Panels: Expanded: - /Global Options1 - /Status1 - - /TF1 - /TF1/Frames1 - /TF1/Tree1 - - /PlanningScene1 - /PlanningScene1/Scene Geometry1 - /PlanningScene1/Scene Robot1 - - /PointCloud22 - /Planned Path1 - - /PointCloud23 + - /PointCloud24 Splitter Ratio: 0.413174 - Tree Height: 948 + Tree Height: 852 - Class: rviz/Selection Name: Selection - Class: rviz/Tool Properties @@ -87,18 +84,6 @@ Visualization Manager: Use Fixed Frame: true Use rainbow: true Value: true - - Class: rviz/Image - Enabled: false - Image Topic: /camera/color/image_raw - Max Value: 1 - Median window: 5 - Min Value: 0 - Name: Image - Normalize Range: true - Queue Size: 2 - Transport Hint: raw - Unreliable: false - Value: false - Class: rviz/TF Enabled: true Frame Timeout: 15 @@ -106,8 +91,16 @@ Visualization Manager: 00 Home: Value: true All Enabled: false - ar_marker_0: - Value: false + a1: + Value: true + a2: + Value: true + a3: + Value: true + a4: + Value: true + ar_marker_2: + Value: true base: Value: false base_link: @@ -136,33 +129,13 @@ Visualization Manager: Value: false marker_link: Value: false - obj_link_uniform_1: - Value: true - obj_link_uniform_2: - Value: true - obj_link_uniform_3: - Value: true - obj_node_uniform_1: + place1: Value: true - obj_node_uniform_2: + place2: Value: true - obj_node_uniform_3: + place3: Value: true - obj_node_uniform_4: - Value: true - objects/link_uniform/1: - Value: false - objects/link_uniform/2: - Value: true - objects/link_uniform/3: - Value: true - objects/node_uniform/1: - Value: false - objects/node_uniform/2: - Value: false - objects/node_uniform/3: - Value: true - objects/node_uniform/4: + place4: Value: true preferred_orientation: Value: false @@ -194,25 +167,19 @@ Visualization Manager: {} camera_rgb_frame: camera_rgb_optical_frame: - ar_marker_0: - {} - obj_link_uniform_1: - {} - obj_link_uniform_2: - {} - obj_link_uniform_3: - {} - obj_node_uniform_1: - {} - obj_node_uniform_2: - {} - obj_node_uniform_3: - {} - obj_node_uniform_4: + ar_marker_2: {} world: 00 Home: {} + a1: + {} + a2: + {} + a3: + {} + a4: + {} base_link: preferred_orientation: {} @@ -235,19 +202,13 @@ Visualization Manager: {} table_frame: {} - objects/link_uniform/1: - {} - objects/link_uniform/2: + place1: {} - objects/link_uniform/3: + place2: {} - objects/node_uniform/1: + place3: {} - objects/node_uniform/2: - {} - objects/node_uniform/3: - {} - objects/node_uniform/4: + place4: {} Update Interval: 0 Value: true @@ -609,6 +570,36 @@ Visualization Manager: Use Fixed Frame: true Use rainbow: true Value: false + - Alpha: 1 + Autocompute Intensity Bounds: true + Autocompute Value Bounds: + Max Value: 10 + Min Value: -10 + Value: true + Axis: Z + Channel Name: intensity + Class: rviz/PointCloud2 + Color: 255; 255; 255 + Color Transformer: RGB8 + Decay Time: 0 + Enabled: true + Invert Rainbow: false + Max Color: 255; 255; 255 + Max Intensity: 4096 + Min Color: 0; 0; 0 + Min Intensity: 0 + Name: PointCloud2 + Position Transformer: XYZ + Queue Size: 10 + Selectable: true + Size (Pixels): 3 + Size (m): 0.005 + Style: Spheres + Topic: /pcl_color_segmenter/visualized_cloud_topic + Unreliable: false + Use Fixed Frame: true + Use rainbow: true + Value: true Enabled: true Global Options: Background Color: 48; 48; 48 @@ -633,32 +624,30 @@ Visualization Manager: Views: Current: Class: rviz/Orbit - Distance: 0.655068 + Distance: 0.612647 Enable Stereo Rendering: Stereo Eye Separation: 0.06 Stereo Focal Distance: 1 Swap Stereo Eyes: false Value: false Focal Point: - X: 0.723894 - Y: 0.0879182 - Z: 0.196104 + X: 0.727214 + Y: 0.00867184 + Z: 0.164382 Name: Current View Near Clip Distance: 0.01 - Pitch: 0.269797 + Pitch: 0.369797 Target Frame: Value: Orbit (rviz) - Yaw: 0.080116 + Yaw: 0.460128 Saved: ~ Window Geometry: Displays: collapsed: false - Height: 1151 + Height: 1055 Hide Left Dock: false Hide Right Dock: true - Image: - collapsed: false - QMainWindow State: 000000ff00000000fd0000000400000000000002ae00000446fc0200000009fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000006700fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000001b00000446000000e300fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000000a0049006d00610067006500000002d7000000c90000001600ffffff000000010000010f00000378fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000002800000378000000b300fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e100000197000000030000063e0000003efc0100000002fb0000000800540069006d006502000000020000046d0000063e00000043fb0000000800540069006d006501000000000000045000000000000000000000038c0000044600000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730000000000ffffffff0000000000000000 + QMainWindow State: 000000ff00000000fd0000000400000000000002ae000003e6fc0200000009fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000006700fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000001b000003e6000000e300fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000000a0049006d0061006700650000000338000000c90000000000000000000000010000010f00000378fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000002800000378000000b300fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e100000197000000030000063e0000003efc0100000002fb0000000800540069006d006502000000020000046d0000063e00000043fb0000000800540069006d006501000000000000045000000000000000000000038c000003e600000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730000000000ffffffff0000000000000000 Selection: collapsed: false Time: @@ -668,5 +657,5 @@ Window Geometry: Views: collapsed: true Width: 1600 - X: 0 - Y: 25 + X: 1759 + Y: 0 diff --git a/costar_bringup/launch/config/ur5.launch b/costar_bringup/launch/config/ur5.launch index 51c04a3b..cf94bf18 100644 --- a/costar_bringup/launch/config/ur5.launch +++ b/costar_bringup/launch/config/ur5.launch @@ -1,4 +1,7 @@ + + + @@ -20,6 +23,7 @@ - link_uniform - drill - table + - wood_cube - in_back_of @@ -39,6 +43,22 @@ - world + + + true + + + false + + + + /costar_sp_segmenter + + + /costar_perception + + + /sequential_scene_parsing diff --git a/costar_bringup/launch/predicator_nodes.launch b/costar_bringup/launch/predicator_nodes.launch index 8a662be1..f67494cd 100644 --- a/costar_bringup/launch/predicator_nodes.launch +++ b/costar_bringup/launch/predicator_nodes.launch @@ -3,9 +3,18 @@ + + + + - + + + + + + @@ -25,12 +34,10 @@ - obj_link_uniform_1 - obj_link_uniform_2 - - obj_link_uniform_3 - - obj_link_uniform_4 - obj_node_uniform_1 - obj_node_uniform_2 - - obj_node_uniform_3 - - obj_node_uniform_4 + - obj_wood_cube_1 + - obj_wood_cube_2 - obj_sander_makita_1 - obj_sander_makita_2 - gbeam_link_1/gbeam_link @@ -46,11 +53,13 @@ - world + + - + + + + @@ -23,7 +26,10 @@ - + + + + diff --git a/costar_gripper/gripper_robotiq/launch/robotiq_c_model_endpoint.launch b/costar_gripper/gripper_robotiq/launch/robotiq_c_model_endpoint.launch index 67565af6..159d89d1 100644 --- a/costar_gripper/gripper_robotiq/launch/robotiq_c_model_endpoint.launch +++ b/costar_gripper/gripper_robotiq/launch/robotiq_c_model_endpoint.launch @@ -4,6 +4,6 @@ - + diff --git a/costar_instructor/instructor_core/launch/instructor.launch b/costar_instructor/instructor_core/launch/instructor.launch index d164de73..9a4b5b93 100644 --- a/costar_instructor/instructor_core/launch/instructor.launch +++ b/costar_instructor/instructor_core/launch/instructor.launch @@ -5,7 +5,7 @@ - + diff --git a/costar_instructor/instructor_core/nodes/instructor_view.py b/costar_instructor/instructor_core/nodes/instructor_view.py index 44f35552..8e6bc339 100755 --- a/costar_instructor/instructor_core/nodes/instructor_view.py +++ b/costar_instructor/instructor_core/nodes/instructor_view.py @@ -132,22 +132,22 @@ def __init__(self,app): self.app_ = app self.types__ = ['LOGIC', 'ACTION', - 'CONDITION', 'TASK', + 'CONDITION', 'PROCESS', 'SERVICE', 'VARIABLE'] self.colors__ = ['blue', 'green', + 'sea_green', 'purple', - 'orange', 'pink', 'gray', 'gray'] self.labels__ = ['BUILDING BLOCKS', - 'ROBOT ACTIONS', + 'BASIC ACTIONS', + 'ADVANCED ACTIONS', 'SYSTEM KNOWLEDGE', - 'TASK MODEL', 'PROCESSES', 'SERVICE', 'VARIABLES'] @@ -516,7 +516,7 @@ def set_up_gui(self): self.component_widgets[t] = w self.component_layout.addWidget(w) - self.subtree_container = ListContainer('SUBTREES','SUBTREES',colors['green_light'],'large') + self.subtree_container = ListContainer('SUBTREES','SUBTREES',colors['orange'],'large') # self.node_container = ListContainer('NODES','NODES',colors['pink'],'large') self.subtree_container.show() self.subtree_container.register_callbacks(self.collapse_unused,self.subtree_selected_callback) @@ -579,7 +579,7 @@ def detect_objects_cb(self): #self.info_textbox.notify('Detecting objects...') self.toast('Please wait... Detecting Objects') self.detect_objects_button.setEnabled(False) - service_name = '/SPServer/SPSegmenter' + service_name = '/costar_perception/segmenter' self.send_service_command(service_name) #self.info_textbox.notify('Detecting objects...DONE') self.detect_objects_button.setEnabled(True) @@ -1572,14 +1572,26 @@ def check_ok(self): self.app_.exit() # MAIN ####################################################### +def main(): + rospy.init_node('instructor_view',anonymous=True) + app = QApplication(sys.argv) + wrapper = Instructor(app) + app.exec_() + if __name__ == '__main__': - rospy.init_node('instructor_view',anonymous=True) - app = QApplication(sys.argv) - wrapper = Instructor(app) - # Running - app.exec_() + # rospy.init_node('instructor_view',anonymous=True) + # app = QApplication(sys.argv) + # wrapper = Instructor(app) + # # Running + # app.exec_() # Done - + profile = False + + if profile: + import cProfile + cProfile.run('main()') + else: + main() diff --git a/costar_instructor/instructor_core/src/instructor_core/instructor_core_nodes.py b/costar_instructor/instructor_core/src/instructor_core/instructor_core_nodes.py index 5e16ea6d..b82fb8e3 100644 --- a/costar_instructor/instructor_core/src/instructor_core/instructor_core_nodes.py +++ b/costar_instructor/instructor_core/src/instructor_core/instructor_core_nodes.py @@ -40,7 +40,7 @@ def save(self): data = self.save_data(data) return data def save_data(self,data): - return data + raise NotImplementedError('save_data is not implemented in base class NodeGUI') def load(self,data): for name, obj in inspect.getmembers(self): if isinstance(obj, NamedField): @@ -54,8 +54,10 @@ def load(self,data): obj.set_index(datum['index']) obj.set_value(datum['current_value']) self.load_data(data) + def load_data(self,data): - pass + raise NotImplementedError('load_data is not implemented in base class NodeGUI') + # raise NotImplementedError('load_data is not implemented in base class NodeGUI') def refresh_data(self): pass #------------------------------------------------------------------------------- @@ -69,6 +71,12 @@ def __init__(self): self.title.setStyleSheet('background-color:#00C8FF;color:#ffffff') self.name.set_field('root') + def save_data(self,data): + return data + + def load_data(self,data): + pass + def generate(self): return beetree.NodeRoot('root','root') @@ -78,6 +86,13 @@ def __init__(self): self.title.setText('PARALLEL ONE LOGIC') self.title.setStyleSheet('background-color:#00C8FF;color:#ffffff') + def save_data(self,data): + return data + + def load_data(self,data): + # no data to load + pass + def generate(self): if all([self.name.full()]): return beetree.NodeParallelOne(self.get_name(),self.get_label()) @@ -90,6 +105,13 @@ def __init__(self): self.title.setText('PARALLEL ALL LOGIC') self.title.setStyleSheet('background-color:#00C8FF;color:#ffffff') + def save_data(self,data): + return data + + def load_data(self,data): + # no data to load + pass + def generate(self): if all([self.name.full()]): return beetree.NodeParallelAll(self.get_name(),self.get_label()) @@ -102,6 +124,13 @@ def __init__(self): self.title.setText('PARALLEL REMOVE LOGIC') self.title.setStyleSheet('background-color:#00C8FF;color:#ffffff') + def save_data(self,data): + return data + + def load_data(self,data): + # no data to load + pass + def generate(self): if all([self.name.full()]): return beetree.NodeParallelRemove(self.get_name(),self.get_label()) @@ -114,6 +143,13 @@ def __init__(self): self.title.setText('SEQUENCE LOGIC') self.title.setStyleSheet('background-color:#00C8FF;color:#ffffff') + def save_data(self,data): + return data + + def load_data(self,data): + # no data to load + pass + def generate(self): if all([self.name.full()]): return beetree.NodeSequence(self.get_name(),self.get_label()) @@ -126,6 +162,13 @@ def __init__(self): self.title.setText('ITERATOR LOGIC') self.title.setStyleSheet('background-color:#00C8FF;color:#ffffff') + def save_data(self,data): + return data + + def load_data(self,data): + # no data to load + pass + def generate(self): if all([self.name.full()]): return beetree.NodeIterator(self.get_name(),self.get_label()) @@ -138,6 +181,13 @@ def __init__(self): self.title.setText('SELECTOR LOGIC') self.title.setStyleSheet('background-color:#00C8FF;color:#ffffff') + def save_data(self,data): + return data + + def load_data(self,data): + # no data to load + pass + def generate(self): if all([self.name.full()]): return beetree.NodeSelector(self.get_name(),self.get_label()) @@ -153,6 +203,13 @@ def __init__(self): self.repeat.set_field('-1') self.layout_.addWidget(self.repeat) + def save_data(self,data): + return data + + def load_data(self,data): + # no data to load + pass + def generate(self): if all([self.name.full(),self.repeat.full()]): return beetree.NodeDecoratorRepeat(self.get_name(),self.get_label(),int(self.repeat.get())) @@ -167,6 +224,13 @@ def __init__(self): self.reset = NamedField('Reset (-1) for infinity',self.get_label()) self.layout_.addWidget(self.reset) + def save_data(self,data): + return data + + def load_data(self,data): + # no data to load + pass + def generate(self): if all([self.name.full(),self.reset.full()]): return beetree.NodeDecoratorReset(self.get_name(),self.get_label(),int(self.reset.get())) @@ -181,6 +245,13 @@ def __init__(self): self.repeat = NamedField('Repeat',self.get_label()) self.layout_.addWidget(self.repeat) + def save_data(self,data): + return data + + def load_data(self,data): + # no data to load + pass + def generate(self): if all([self.name.full()]): return beetree.NodeDecoratorIgnoreFail(self.get_name(),self.get_label()) @@ -196,6 +267,13 @@ def __init__(self): self.timeout.set_field('-1') self.layout_.addWidget(self.timeout) + def save_data(self,data): + return data + + def load_data(self,data): + # no data to load + pass + def generate(self): if all([self.name.full(),self.timeout.full()]): return beetree.NodeDecoratorWaitForSuccess(self.get_name(),self.get_label(),int(self.timeout.get())) diff --git a/costar_instructor/instructor_plugins/package.xml b/costar_instructor/instructor_plugins/package.xml index 6f010351..c2e0e02e 100644 --- a/costar_instructor/instructor_plugins/package.xml +++ b/costar_instructor/instructor_plugins/package.xml @@ -21,7 +21,7 @@ type="ACTION" group="TIMING" description="Sleep Action" - cases="baseline" + cases="baseline drvk" name="Sleep"/> @@ -76,45 +76,45 @@ @@ -132,6 +132,14 @@ description="publish_message" cases="" name="Publish Message" /> + + + 0: + L +='\nwith predicates [%s]'%', '.join(selected_predicates) + super(NodeActionSmartmove,self).__init__(name,L,'#26A65B',"SmartMove Service",display_name=selected_smartmove) self.selected_region = selected_region self.selected_reference = selected_reference @@ -221,6 +273,7 @@ def __init__(self,name,label,selected_region,selected_object,selected_smartmove, self.command_vel = vel self.manager = smartmove_manager self.listener_ = smartmove_manager.listener + self.selected_predicates = selected_predicates def make_service_call(self,request,*args): self.manager.load_all() @@ -238,15 +291,18 @@ def make_service_call(self,request,*args): msg = SmartMoveRequest() msg.pose = self.manager.lookup_waypoint(self.selected_object,self.selected_smartmove) if msg.pose is None: - rospy.logerr('Invalid Smarresulttmove Waypoint') + rospy.logerr('Invalid Smartmove Waypoint') self.finished_with_success = False return msg.obj_class = self.selected_object msg.name = self.selected_smartmove - predicate = PredicateStatement() - predicate.predicate = self.selected_region - predicate.params = ['*',self.selected_reference,'world'] - msg.predicates = [predicate] + + position_predicate = PredicateStatement(predicate=self.selected_region, params=['*',self.selected_reference,'world']) + msg.predicates = [position_predicate] + for predicate_name in self.selected_predicates: + new_predicate = PredicateStatement(predicate=predicate_name, params=['*','','']) + msg.predicates.append(new_predicate) + msg.vel = self.command_vel msg.accel = self.command_acc # Send SmartMove Command diff --git a/costar_instructor/instructor_plugins/src/instructor_plugins/instructor_action_stop.py b/costar_instructor/instructor_plugins/src/instructor_plugins/instructor_action_stop.py index ace9741c..183c3871 100644 --- a/costar_instructor/instructor_plugins/src/instructor_plugins/instructor_action_stop.py +++ b/costar_instructor/instructor_plugins/src/instructor_plugins/instructor_action_stop.py @@ -30,6 +30,11 @@ def __init__(self): self.stop_time = NamedField('Stop Time', '','green') self.layout_.addWidget(self.stop_time) + def save_data(self,data): + return data + def load_data(self,data): + pass + def generate(self): if all([self.name.full(), self.stop_time.full()]): return NodeActionStop(self.get_name(), self.get_label(), float(self.stop_time.get())) diff --git a/costar_instructor/instructor_plugins/src/instructor_plugins/instructor_detect_objects.py b/costar_instructor/instructor_plugins/src/instructor_plugins/instructor_detect_objects.py index 57aedfa5..012bc638 100644 --- a/costar_instructor/instructor_plugins/src/instructor_plugins/instructor_detect_objects.py +++ b/costar_instructor/instructor_plugins/src/instructor_plugins/instructor_detect_objects.py @@ -31,6 +31,10 @@ def __init__(self): self.note = NoteField('(1 = true, 0 = false)','purple') self.layout_.addWidget(self.wait_finish) self.layout_.addWidget(self.note) + def save_data(self,data): + return data + def load_data(self,data): + pass def generate(self): if all([self.name.full(),self.wait_finish.full()]): return NodeActionDetectObjects(self.get_name(),self.get_label(),int(self.wait_finish.get())) @@ -50,7 +54,7 @@ def __init__(self,name,label,wait_finish): def make_service_call(self,request,*args): # Check to see if service exists - service_name = '/SPServer/SPSegmenter' + service_name = '/costar_perception/segmenter' try: rospy.wait_for_service(service_name) except rospy.ROSException as e: diff --git a/costar_instructor/instructor_plugins/src/instructor_plugins/instructor_knowledge_test.py b/costar_instructor/instructor_plugins/src/instructor_plugins/instructor_knowledge_test.py index 2bc901a1..a4f7131d 100644 --- a/costar_instructor/instructor_plugins/src/instructor_plugins/instructor_knowledge_test.py +++ b/costar_instructor/instructor_plugins/src/instructor_plugins/instructor_knowledge_test.py @@ -48,21 +48,6 @@ def __init__(self): ### Git initial list of targets ### rospy.loginfo('Waiting for service...') - try: - rospy.wait_for_service('/predicator/get_possible_assignment',2) - rospy.loginfo('FOUND') - except: - rospy.logerr('Could not find service') - try: - proxy = rospy.ServiceProxy('predicator/get_possible_assignment', srv.GetTypedList) - - rospy.loginfo('Found TARGETS:') - self.found_assignments = proxy().data - rospy.loginfo(self.found_assignments) - for a in self.found_assignments: - self.ui.target_box.addItem(str(a).upper()) - except rospy.ServiceException, e: - print e # Finish self.reset() @@ -76,8 +61,35 @@ def reset(self): self.ui.statement_label.hide() self.ui.value_box.setCurrentIndex(0) self.ui.knowledge_box.setCurrentIndex(0) + self.refresh_data() self.ui.target_box.setCurrentIndex(0) + def refresh_data(self): + try: + rospy.wait_for_service('/predicator/get_possible_assignment',2) + rospy.loginfo('FOUND') + except: + rospy.logerr('Could not find service') + try: + proxy = rospy.ServiceProxy('predicator/get_possible_assignment', srv.GetTypedList) + + rospy.loginfo('Found TARGETS:') + self.found_assignments = proxy().data + rospy.loginfo(self.found_assignments) + + self.ui.target_box.clear(); + list_of_items = [] + for a in self.found_assignments: + # self.ui.target_box.addItem(str(a).upper()) + list_of_items.append(str(a).upper()) + + list_of_items.sort() + for item in list_of_items: + self.ui.target_box.addItem(item) + + except rospy.ServiceException, e: + print e + def reset_knowledge(self): self.ui.knowledge_box.clear() self.ui.knowledge_box.addItem('