Exemple #1
0
    def publish(self):
        flystate = MsgFlystate()
        flystate.header = Header(seq=self.iCount,
                                 stamp=self.stamp,
                                 frame_id='Fly')

        if (self.params['gui']['head']['track']):
            flystate.head = self.head.state
        else:
            flystate.head = MsgState()

        if (self.params['gui']['abdomen']['track']):
            flystate.abdomen = self.abdomen.state
        else:
            flystate.abdomen = MsgState()

        if (self.params['gui']['left']['track']):
            flystate.left = self.left.state
        else:
            flystate.left = MsgState()

        if (self.params['gui']['right']['track']):
            flystate.right = self.right.state
        else:
            flystate.right = MsgState()

        if (self.params['gui']['aux']['track']):
            flystate.aux = self.aux.state
        else:
            flystate.aux = MsgState()

        self.iCount += 1

        self.pubFlystate.publish(flystate)
Exemple #2
0
    def __init__(self, name=None, params={}, color='white', bEqualizeHist=False):
        MotionTrackedBodypartPolar.__init__(self, name, params, color, bEqualizeHist)
        
        self.phasecorr          = imageprocessing.PhaseCorrelation()
        self.state              = MsgState() # In the bodypart frame.
        self.stateOrigin_p      = MsgState() # In the bodypart frame.
        self.stateLo_p          = MsgState() # In the bodypart frame.
        self.stateHi_p          = MsgState() # In the bodypart frame.

        self.imgComparison      = None
        
        self.windowStabilized   = ImageWindow(False, self.name+'Stable')
        self.windowComparison   = ImageWindow(True, self.name+'Comparison')
        self.set_params(params)
Exemple #3
0
    def __init__(self, name=None, params={}, color='white', bEqualizeHist=False):
        MotionTrackedBodypart.__init__(self, name, params, color, bEqualizeHist)
        
        self.name       = name
        self.detector   = EdgeDetectorByHoughTransform(self.name, params)
        self.state      = MsgState()
        self.windowEdges = ImageWindow(False, self.name+'Edges')
        self.set_params(params)

        # Services, for live intensities plots via live_wing_histograms.py
        self.service_trackerdata    = rospy.Service('trackerdata_'+self.name, SrvTrackerdata, self.serve_trackerdata_callback)
Exemple #4
0
    def __init__(self, name=None, params={}, color='white', bEqualizeHist=False):
        MotionTrackedBodypartPolar.__init__(self, name, params, color, bEqualizeHist)
        
        self.name     = name
        self.detector = TipDetector()
        self.state    = MsgState()
        self.set_params(params)
        self.windowTip = ImageWindow(False, self.name+'Tip')
        self.iAngle = 0
        self.iRadius = 0

        # Services, for live intensities plots via live_wing_histograms.py
        self.service_trackerdata    = rospy.Service('trackerdata_'+self.name, SrvTrackerdata, self.serve_trackerdata_callback)
Exemple #5
0
    def __init__(self,
                 name=None,
                 params={},
                 color='white',
                 bEqualizeHist=False):
        IntensityTrackedBodypart.__init__(self, name, params, color,
                                          bEqualizeHist)

        self.state = MsgState()
        self.state.intensity = 0.0
        self.state.freq = 0.0

        self.wingbeat = WingbeatDetector(0, 1000)

        self.set_params(params)