[openrtm-commit:01458] r166 - branches/newCMakeForVC2010/ImageProcessing/opencv/components/TkCalibGUI
openrtm @ openrtm.org
openrtm @ openrtm.org
2014年 6月 10日 (火) 18:31:56 JST
Author: kawauchi
Date: 2014-06-10 18:31:56 +0900 (Tue, 10 Jun 2014)
New Revision: 166
Modified:
branches/newCMakeForVC2010/ImageProcessing/opencv/components/TkCalibGUI/tkcalibgui.py
Log:
Fixed the end of processing when you manually start the ImageCalibrationComp.
Modified: branches/newCMakeForVC2010/ImageProcessing/opencv/components/TkCalibGUI/tkcalibgui.py
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/TkCalibGUI/tkcalibgui.py 2014-06-10 03:56:53 UTC (rev 165)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/TkCalibGUI/tkcalibgui.py 2014-06-10 09:31:56 UTC (rev 166)
@@ -204,7 +204,6 @@
# automatically connect the components
ret = self.connect_components_auto()
if not ret:
- self.register_me()
self.comp_all_found = False
else:
# manually connect the components
@@ -412,6 +411,10 @@
if len(lists) == 0:
self.set_warning_msg()
self.set_calib_not_found_msg()
+
+ # register the component found
+ self.tree = self.comp_startup_check(camera_rtc)
+ self.rtc_list.append(camera_rtc)
return False
else:
# Environment variable exists
@@ -419,6 +422,10 @@
if val == "":
self.set_warning_msg()
self.set_calib_not_found_msg()
+
+ # register the component found
+ self.tree = self.comp_startup_check(camera_rtc)
+ self.rtc_list.append(camera_rtc)
return False
else:
calib_path = val
@@ -438,6 +445,10 @@
if val == "":
self.set_warning_msg()
self.set_calib_not_found_msg()
+
+ # register the component found
+ self.tree = self.comp_startup_check(camera_rtc)
+ self.rtc_list.append(camera_rtc)
return False
else:
calib_path = val
@@ -533,7 +544,7 @@
return
# Start a thread to observe the transition state of the component.
- self.comp_transition_thread = CompTransitionThread('Exit', self.rtc_list, self.tree)
+ self.comp_transition_thread = CompTransitionThread('Exit', self.rtc_list, self.tree, self.comp_all_found)
self.comp_transition_thread.start()
self.exit_state = True
self.check_exit()
@@ -695,11 +706,12 @@
# Thread class
class CompTransitionThread(Thread):
- def __init__(self, msg, rtc_list, tree):
+ def __init__(self, msg, rtc_list, tree, flg=True):
Thread.__init__(self)
self.msg = msg
self.rtc_list = rtc_list
self.tree = tree
+ self.comp_all_found = flg
self.running = False
if self.msg.find("Activate") != -1:
@@ -716,9 +728,11 @@
self.check_comp(self.cmd, self.rtc_list[i])
if self.msg == "Exit":
- for i in range(comp_cnt):
- # rtdis
- self.check_comp('rtdis', self.rtc_list[i])
+ if self.comp_all_found:
+ # components automatically connected
+ for i in range(comp_cnt):
+ # rtdis
+ self.check_comp('rtdis', self.rtc_list[i])
for i in range(comp_cnt):
# rtexit
More information about the openrtm-commit
mailing list