示例#1
0
    def changeSubscriptionBDI(self, newBDIChannel="POSE_BDI"):
        # used to monitor a different pose e.g. POSE_BODY_LOGGED in playback
        self.bdiChannel = newBDIChannel
        lcmUtils.removeSubscriber ( self.bdiSubcribe )

        self.bdiSubcribe = lcmUtils.addSubscriber( self.bdiChannel , pose_t, self.onPoseBDI)
        self.bdiSubcribe.setSpeedLimit(60)
示例#2
0
    def changeSubscriptionBDI(self, newBDIChannel="POSE_BDI"):
        # used to monitor a different pose e.g. POSE_BODY_LOGGED in playback
        self.bdiChannel = newBDIChannel
        lcmUtils.removeSubscriber ( self.bdiSubcribe )

        self.bdiSubcribe = lcmUtils.addSubscriber( self.bdiChannel , pose_t, self.onPoseBDI)
        self.bdiSubcribe.setSpeedLimit(60)
示例#3
0
 def setEnabled(self, enabled):
     if enabled and not self.subscriber:
         self.subscriber = lcmUtils.addSubscriber('LCMGL.*',
                                                  callback=self.onMessage)
     elif not enabled and self.subscriber:
         lcmUtils.removeSubscriber(self.subscriber)
         self.subscriber = None
示例#4
0
 def _removeSubscribers(self):
     for sub in self.subscribers:
         lcmUtils.removeSubscriber(sub)
     self.subscribers = []
示例#5
0
 def removeLCMUpdater(self):
     lcmUtils.removeSubscriber(self.subscriber)
     self.subscriber = None
示例#6
0
 def __del__(self):
     lcmUtils.removeSubscriber(self.sub)
示例#7
0
 def stop(self):
     for sub in self.subs:
         lcmUtils.removeSubscriber(sub)
示例#8
0
 def removeLCMUpdater(self):
     lcmUtils.removeSubscriber(self.subscriber)
     self.subscriber = None
示例#9
0
 def __exit__(self):
     if self.lcmsub is not None:
         lcmUtils.removeSubscriber(self.lcmsub)
示例#10
0
 def setEnabled(self, enabled):
     if enabled and not self.subscriber:
         self.subscriber = lcmUtils.addSubscriber('LCMGL.*', callback=self.onMessage)
     elif not enabled and self.subscriber:
         lcmUtils.removeSubscriber(self.subscriber)
         self.subscriber = None