articles:nextage_rtm

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
articles:nextage_rtm [2021/08/30 13:31] – [プログラムの構造上の問題点] Takashi Suehiroarticles:nextage_rtm [2021/09/22 11:16] (現在) – [init1] Takashi Suehiro
行 151: 行 151:
 データの部分書き換えなどの整合性をとっている. データの部分書き換えなどの整合性をとっている.
  
-__init__関数ではgazeboシミュレータの利用をチェックしている.gazeboを使わない場合はHIRONXの__init__を呼び出す.+%%__init__関数%%ではgazeboシミュレータの利用をチェックしている.gazeboを使わない場合はHIRONXの%%__init__%%を呼び出す.
  
 gazeboを使う方の処理は今回は無視する. gazeboを使う方の処理は今回は無視する.
行 683: 行 683:
         self.configurator_name = cname         self.configurator_name = cname
 </code> </code>
 +=== waitForRTCManager ===
 +<code python>
 +    def waitForRTCManager(self, managerhost=nshost):
 +        '''!@brief
 +        Wait for RTC manager.
 +
 +        @param managerhost str: name of host computer that manager is running
 +        '''
 +        self.ms = None
 +        while self.ms == None:
 +            time.sleep(1)
 +            if managerhost == "localhost":
 +                managerhost = socket.gethostname()
 +            self.ms = rtm.findRTCmanager(managerhost)
 +            print(self.configurator_name + "wait for RTCmanager : " + str(managerhost))
 +</code>
 +=== waitForRobotHardware ===
 +<code python>
 +    def waitForRobotHardware(self, robotname="Robot"):
 +        '''!@brief
 +        Wait for RobotHardware is exists and activated.
 +
 +        @param robotname str: name of RobotHardware component.
 +        '''
 +        self.rh = None
 +        timeout_count = 0
 +        # wait for simulator or RobotHardware setup which sometime takes a long time
 +        while self.rh == None and timeout_count < 10:  # <- time out limit
 +            if timeout_count > 0: # do not sleep initial loop
 +                time.sleep(1);
 +            self.rh = rtm.findRTC("RobotHardware0")
 +            if not self.rh:
 +                self.rh = rtm.findRTC(robotname)
 +            print(self.configurator_name + "wait for %s : %s ( timeout %d < 10)" % ( robotname, self.rh, timeout_count))
 +            if self.rh and self.rh.isActive() == None:  # just in case rh is not ready...
 +                self.rh = None
 +            timeout_count += 1
 +        if not self.rh:
 +            print(self.configurator_name + "Could not find " + robotname)
 +            if self.ms:
 +                print(self.configurator_name + "Candidates are .... " + str([x.name()  for x in self.ms.get_components()]))
 +            print(self.configurator_name + "Exitting.... " + robotname)
 +            exit(1)
 +
 +        print(self.configurator_name + "findComps -> %s : %s isActive? = %s " % (self.rh.name(), self.rh,  self.rh.isActive()))
 +
 +</code>
 +
 +=== getJointAngleControllerList ===
 +<code python>
 +    def getJointAngleControllerList(self):
 +        '''!@brief
 +        Get list of controller list that need to control joint angles
 +        '''
 +        controller_list = [self.es, self.ic, self.gc, self.abc, self.st, self.co,
 +                           self.tc, self.hes, self.el]
 +        return filter(lambda c: c != None, controller_list)  # only return existing controllers
 +</code>
 +==== rtm ====
 +=== findRTCManager ===
 +=== findRTC ===
 +
 +
  
 ===== nextage_handleに必要な情報 ===== ===== nextage_handleに必要な情報 =====
行 1004: 行 1067:
             self.log.start(self.log.owned_ecs[0])             self.log.start(self.log.owned_ecs[0])
 </code> </code>
 +==== キャリブレーション ====
 +キャリブレションの実施確認
 +
 +hiro_handle:なし
 +
 +nextage:
 +
 +
 +==== 動作 ====
 +
  • articles/nextage_rtm.1630297910.txt.gz
  • 最終更新: 2021/08/30 13:31
  • by Takashi Suehiro