예제 #1
0
  def __init__(self):
    PlotWindow.__init__(self)

    self.window_size=200
    self.values=numpy.zeros((self.window_size))
    self.index=0

    rospy.init_node('visualizer', anonymous=True)
    self.subscriber = rospy.Subscriber("event", Event, self.plotResults, queue_size = 1 )
예제 #2
0
    def __init__(self):
        PlotWindow.__init__(self)

        self.window_size = 200
        self.values = numpy.zeros((self.window_size))
        self.index = 0

        rospy.init_node('visualizer', anonymous=True)
        self.subscriber = rospy.Subscriber("event",
                                           Event,
                                           self.plotResults,
                                           queue_size=1)
예제 #3
0
    def __init__(self):
        PlotWindow.__init__(self)

        print("Verifying RGBD")

        rospy.Subscriber("estimate_error", SyncEstimateError, self.error_cb)

        self.window_size = 10000
        self.counter = 0
        self.index = 0
        self.x_deque = deque(maxlen=self.window_size)
        self.y_deque = deque(maxlen=self.window_size)
        self.z_deque = deque(maxlen=self.window_size)
        self.paused = False

        self.pauseButton.clicked.connect(self.pauseClicked)
        self.resetButton.clicked.connect(self.resetClicked)
예제 #4
0
    def __init__(self):
        PlotWindow.__init__(self)

        self.window_size = 1000
        self.values = deque(
            maxlen=self.window_size)  #numpy.zeros((self.window_size))
        self.index = 0
        self.draw_counter = 0
        self.paused = False

        rospy.init_node('visualizer', anonymous=True)
        self.subscriber = rospy.Subscriber("range_data",
                                           Range,
                                           self.plotResults,
                                           queue_size=1)

        self.pauseButton.clicked.connect(self.pauseClicked)
        self.resetButton.clicked.connect(self.resetClicked)
예제 #5
0
    def __init__(self):
        PlotWindow.__init__(self)
    
        self.window_size=20
        self.values=numpy.zeros((self.window_size))
        self.index=0

        self.axes2D.set_autoscaley_on(False)
        self.axes2D.set_xlim((-1, 1))
        self.axes2D.set_ylim((-1, 1))
        
        self.axes3D.set_autoscaley_on(True)

        self.current_step = 0
        self.current_data = "flat"
        self.new_calibration = False
                        
        self.data_read = { "mag" : False, "pwm" : False, "bat" : False }
        self.latest = { "mag" : numpy.zeros(3), "pwm" : numpy.zeros(1), "bat" : numpy.zeros(1) }
        self.thrust = 0
        self.all_data = { "flat" :   { "mag" : { "x": [], "y": [], "z": []}, 
                                       "thrust" : [],
                                       "bat" : [] },
                          "sphere" : { "mag" : { "x": [], "y": [], "z": []}, 
                                       "thrust" : [],
                                       "bat" : [] }, 
                          "motor"  : { "mag" : { "x": [], "y": [], "z": []}, 
                                       "thrust" : [],
                                       "bat" : [] }}
        
        ## ROS
        rospy.init_node('magCalibrator', anonymous=True)
        self.subscriber = rospy.Subscriber("/cf/mag", magMSG, self.readMag, queue_size = 1 )
        self.subscriber = rospy.Subscriber("/cf/motor", motorMSG, self.readMotor, queue_size = 1 )
        self.subscriber = rospy.Subscriber("/cf/bat", batMSG, self.readBat, queue_size = 1 )
        self.sub_joy   = rospy.Subscriber("/cfjoy", joyMSG, self.new_joydata)
        self.pub_cal   = rospy.Publisher("/magCalib", magCalibMSG)

        self._readCalibrationFromFile()
예제 #6
0
    def __init__(self):
        PlotWindow.__init__(self)

        self.window_size = 20
        self.values = numpy.zeros((self.window_size))
        self.index = 0

        self.axes2D.set_autoscaley_on(False)
        self.axes2D.set_xlim((-1, 1))
        self.axes2D.set_ylim((-1, 1))

        self.axes3D.set_autoscaley_on(True)

        self.current_step = 0
        self.current_data = "flat"
        self.new_calibration = False

        self.data_read = {"mag": False, "pwm": False, "bat": False}
        self.latest = {
            "mag": numpy.zeros(3),
            "pwm": numpy.zeros(1),
            "bat": numpy.zeros(1)
        }
        self.thrust = 0
        self.all_data = {
            "flat": {
                "mag": {
                    "x": [],
                    "y": [],
                    "z": []
                },
                "thrust": [],
                "bat": []
            },
            "sphere": {
                "mag": {
                    "x": [],
                    "y": [],
                    "z": []
                },
                "thrust": [],
                "bat": []
            },
            "motor": {
                "mag": {
                    "x": [],
                    "y": [],
                    "z": []
                },
                "thrust": [],
                "bat": []
            }
        }

        ## ROS
        rospy.init_node('magCalibrator', anonymous=True)
        self.subscriber = rospy.Subscriber("/cf/mag",
                                           magMSG,
                                           self.readMag,
                                           queue_size=1)
        self.subscriber = rospy.Subscriber("/cf/motor",
                                           motorMSG,
                                           self.readMotor,
                                           queue_size=1)
        self.subscriber = rospy.Subscriber("/cf/bat",
                                           batMSG,
                                           self.readBat,
                                           queue_size=1)
        self.sub_joy = rospy.Subscriber("/cfjoy", joyMSG, self.new_joydata)
        self.pub_cal = rospy.Publisher("/magCalib", magCalibMSG)

        self._readCalibrationFromFile()