Beispiel #1
0
    def __init__(self, max_samples=500, pace=2, cusum_window_size=10):
        self.data_ = []
        self.data_.append([0, 0, 0, 0, 0, 0])
        self.step_ = []
        self.step_.append(0)
        self.i = 0
        self.msg = 0
        self.delta = 1
        self.offset_x = 0
        self.offset_y = 0
        self.offset_z = 0
        self.current_data = Twist()
        self.window_size = cusum_window_size
        RealTimePlotter.__init__(self, max_samples, pace, False)
        self.initKalmanFilter()
        rospy.init_node("kalman_filter_plotter", anonymous=True)
        self.openLoop_ = Twist()
        self.closeLoop_ = Twist()
        rospy.Subscriber("/imu/data", Imu, self.closeLoopCB)
        rospy.Subscriber("/base/odometry_controller/odometry", Odometry,
                         self.openLoopCB)
        self.header = 0

        plt.legend()
        plt.show()
        rospy.spin()
        plt.close("all")
    def __init__(self, threshold=100, pace=10):
        self.data_ = []
        self.step_ = []
        print("Plotter Constructor Initialized")
        RealTimePlotter.__init__(self, threshold, pace, False)
        #self.ax.legend("True")
        rospy.init_node("microphone_plotter", anonymous=False)
        audio = pyaudio.PyAudio()

        self.stream = audio.open(format=pyaudio.paInt16,
                                 channels=1,
                                 rate=44100,
                                 input=True,
                                 frames_per_buffer=1)
        self.stream.start_stream()
        self.i = 0
        #_thread.start_new_thread( self.read, () )
        r = rospy.Rate(10)
        plt.show(block=False)

        while not rospy.is_shutdown():
            self.read()
            r.sleep()
        self.stream.stop_stream()
        plt.close("all")
 def __init__(self, threshold=1000, pace=200):
     self.data_ = []
     self.step_ = []
     print("Plotter Constructor Initialized")
     RealTimePlotter.__init__(self, threshold, pace)
     rospy.init_node("accelerometer_plotter", anonymous=True)
     rospy.Subscriber("accel", AccelStamped, self.accCB)
     plt.show()
     rospy.spin()
     plt.close("all")
Beispiel #4
0
 def __init__(self, threshold = 1000, pace = 200, input_topic='/imu'):
     self.data_ = []
     self.step_ = []
     print ("Plotter Constructor Initialized")
     RealTimePlotter.__init__(self,threshold,pace)
     rospy.init_node("imu_plotter", anonymous=True)
     rospy.Subscriber(input_topic, Imu, self.imuCB)
     plt.show()
     rospy.spin()
     plt.close("all")
Beispiel #5
0
 def __init__(self, threshold=1000, pace=200):
     self.data_ = []
     self.step_ = []
     print("Plotter Constructor Initialized")
     RealTimePlotter.__init__(self, threshold, pace, True)
     #self.ax.legend("True")
     rospy.init_node("amcl_plotter", anonymous=True)
     rospy.Subscriber("/odom", Odometry, self.amclCB)
     plt.show()
     rospy.spin()
     plt.close("all")
 def __init__(self, threshold=1000, pace=200):
     self.data_ = []
     self.step_ = []
     print("Plotter Constructor Initialized")
     RealTimePlotter.__init__(self, threshold, pace, False)
     self.ax.legend("False")
     rospy.init_node("laser_plotter", anonymous=True)
     rospy.Subscriber("/scan_unified", LaserScan, self.laserCB)
     plt.show()
     rospy.spin()
     rospy.sleep(2)
     plt.close("all")
Beispiel #7
0
 def __init__(self, max_samples=500, pace=2, cusum_window_size=10):
     self.data_ = []
     self.step_ = []
     self.i = 0
     self.msg = 0
     self.window_size = cusum_window_size
     RealTimePlotter.__init__(self, max_samples, pace, True)
     ChangeDetection.__init__(self, 3)
     rospy.init_node("amcl_monitoring_cusum", anonymous=True)
     rospy.Subscriber("/odom", Odometry, self.amclCB)
     plt.show()
     rospy.spin()
     plt.close("all")
Beispiel #8
0
 def __init__(self, max_samples=500, pace=2, cusum_window_size=15):
     self.data_ = []
     self.step_ = []
     self.i = 0
     self.msg = 0
     self.window_size = cusum_window_size
     RealTimePlotter.__init__(self, max_samples, pace, False)
     ChangeDetection.__init__(self, 1)
     rospy.init_node("laser_detection_ros_cusum", anonymous=True)
     rospy.Subscriber("/scan_unified", LaserScan, self.laserCB)
     plt.show()
     rospy.spin()
     plt.close("all")
Beispiel #9
0
 def __init__(self, threshold=1000, pace=200):
     self.data_ = []
     self.step_ = []
     print("Plotter Constructor Initialized")
     rospy.init_node("velocity_controller_monitoring")
     RealTimePlotter.__init__(self, threshold, pace, True)
     #self.ax.legend("True")
     rospy.Subscriber("/base/twist_mux/command_navigation", Twist,
                      self.openLoopCB)
     rospy.Subscriber("/base/odometry_controller/odometry", Odometry,
                      self.closeLoopCB)
     self.openLoop_ = Twist()
     self.closeLoop_ = Twist()
     self.count = 0
     plt.show()
 def __init__(self, max_samples=500, pace=2, cusum_window_size=10):
     self.data_ = []
     self.data_.append([0, 0, 0])
     self.i = 0
     self.msg = 0
     self.window_size = cusum_window_size
     RealTimePlotter.__init__(self, max_samples, pace)
     ChangeDetection.__init__(self, 10, 512)
     GaussPlot.__init__(self)
     rospy.init_node("laser_detection_ros_gaus_cusum", anonymous=True)
     rospy.Subscriber("scan_front", LaserScan, self.laserCB)
     plt.legend()
     plt.show()
     rospy.spin()
     plt.close("all")
    def __init__(self, max_samples = 500, pace = 2, cusum_window_size = 10 ):
        self.data_ = []
        self.data_.append([0,0,0])
        self.i = 0
        self.msg = 0
        self.window_size = cusum_window_size
        RealTimePlotter.__init__(self,max_samples,pace)
        ChangeDetection.__init__(self,3)
        GaussPlot.__init__(self )
        rospy.init_node("accelerometer_gauss_cusum", anonymous=True)
        rospy.Subscriber("accel", AccelStamped, self.accCB)
        self.dyn_reconfigure_srv = Server(accelerometerGaussConfig, self.dynamic_reconfigureCB)

        plt.legend()
        plt.show()
        rospy.spin()
        plt.close("all")
    def __init__(self, max_samples=500, pace=2, cusum_window_size=10):
        self.data_ = []
        self.data_.append([0, 0, 0, 0, 0, 0])
        self.i = 0
        self.msg = 0
        self.window_size = cusum_window_size
        RealTimePlotter.__init__(self, max_samples, pace)
        ChangeDetection.__init__(self, 6)
        GaussPlot.__init__(self)
        rospy.init_node("imu_gauss", anonymous=False)
        rospy.Subscriber("imu/data", Imu, self.imuCB)
        self.dyn_reconfigure_srv = Server(imuGaussConfig,
                                          self.dynamic_reconfigureCB)

        plt.legend()
        plt.show()
        rospy.spin()
        plt.close("all")
    def __init__(self, max_samples = 500, pace = 10, cusum_window_size = 20 ):
        self.data_ = []
        self.data_.append([0,0,0,0,0,0])
        self.step_ = []
        self.step_.append(0)
        self.i = 0
        self.msg = 0
        self.window_size = cusum_window_size
        RealTimePlotter.__init__(self,max_samples,pace)
        ChangeDetection.__init__(self,6)
        rospy.init_node("imu_cusum", anonymous=True)
        input_topic = rospy.get_param("~input_topic", '/imu/data')
        rospy.Subscriber(input_topic, Imu, self.imuCB)
        self.dyn_reconfigure_srv = Server(imuGaussConfig, self.dynamic_reconfigureCB)

        plt.legend()
        plt.show()
        rospy.spin()
        plt.close("all")
Beispiel #14
0
    def __init__(self, max_samples = 500, pace = 2, cusum_window_size = 10 ):
        self.data_ = []
        self.data_.append([0,0,0])
        self.step_ = []
        self.step_.append(0)
        self.i = 0
        self.msg = 0
        self.current_data = Twist()
        self.window_size = cusum_window_size
        RealTimePlotter.__init__(self,max_samples,pace)
        ChangeDetection.__init__(self,3)
        rospy.init_node("controller_cusum", anonymous=True)
        self.openLoop_ = Twist()
        self.closeLoop_ = Twist()
        rospy.Subscriber("/base/twist_mux/command_navigation", Twist, self.openLoopCB)
        rospy.Subscriber("/base/odometry_controller/odometry", Odometry, self.closeLoopCB)
        self.header = 0

        plt.legend()
        plt.show()
        rospy.spin()
        plt.close("all")