qsrlib = QSRlib()
        qsrlib_response_message = qsrlib.request_qsrs(
            req_msg=qsrlib_request_message)

    pretty_print_world_qsr_trace(which_qsr, qsrlib_response_message)

    qstag = qsrlib_response_message.qstag

    t2 = time()

    print("Time: ", t2 - t1)

    if args.print_graph:
        """PRINT THE GRAPH TO FILE"""
        dirname = os.path.dirname(os.path.abspath(__file__))
        utils.graph2dot(
            qstag, """{dirname}/../../../speech/simulator/beta_graph.dot""")
        os.system(
            """dot -Tpdf {dirname}/../../../speech/simulator/beta_graph.dot -o {dirname}/../../../speech/simulator/beta_graph.pdf"""
        )
        os.system(
            """dot -Tpng {dirname}/../../../speech/simulator/beta_graph.dot -o {dirname}/../../../speech/simulator/beta_graph.png"""
        )
        img = mpimg.imread(dirname +
                           '/../../../speech/simulator/beta_graph.png')
        imgplot = plt.imshow(img)
        plt.show()

    if args.print_episodes:
        print("Episodes:")
        for i in qstag.episodes:
            print(i)
Ejemplo n.º 2
0
            from qsrlib_ros.qsrlib_ros_client import QSRlib_ROS_Client
        except ImportError:
            raise ImportError("ROS not found")
        client_node = rospy.init_node("qsr_lib_ros_client_example")
        cln = QSRlib_ROS_Client()
        req = cln.make_ros_request_message(qsrlib_request_message)
        res = cln.request_qsrs(req)
        qsrlib_response_message = pickle.loads(res.data)
    else:
        qsrlib = QSRlib()
        qsrlib_response_message = qsrlib.request_qsrs(
            req_msg=qsrlib_request_message)

    pretty_print_world_qsr_trace(which_qsr, qsrlib_response_message)

    qstag = qsrlib_response_message.qstag
    """PRINT THE GRAPH TO FILE"""
    #print("QSTAG Graph:\n", qstag.graph)
    utils.graph2dot(qstag, "/tmp/graph.dot")
    os.system('dot -Tpng /tmp/graph.dot -o /tmp/graph.png')

    print("Episodes:")
    for i in qstag.episodes:
        print(i)

    print("\n,Graphlets:")
    for i, j in qstag.graphlets.graphlets.items():
        print("\n", j)

    print("\nHistogram of Graphlets:")
    print(qstag.graphlets.histogram)
        qsrlib_response_message = qsrlib.request_qsrs(
            req_msg=qsrlib_request_message)

    pretty_print_world_qsr_trace(which_qsr, qsrlib_response_message)

    qstag = qsrlib_response_message.qstag

    t2 = time()

    print("Time: ", t2 - t1)

    if args.print_graph:
        """PRINT THE GRAPH TO FILE"""
        #print("QSTAG Graph:\n", qstag.graph)
        utils.graph2dot(
            qstag,
            "/home/aswin/Documents/Courses/Udacity/Intel-Edge/Work/EdgeApp/PGCR-Results-Analysis/ocr-data/graphs/weibull_graph.dot"
        )
        os.system(
            'dot -Tpdf /home/aswin/Documents/Courses/Udacity/Intel-Edge/Work/EdgeApp/PGCR-Results-Analysis/ocr-data/graphs/weibull_graph.dot -o /home/aswin/Documents/Courses/Udacity/Intel-Edge/Work/EdgeApp/PGCR-Results-Analysis/ocr-data/graphs/weibull_graph.pdf'
        )
        os.system(
            'dot -Tpng /home/aswin/Documents/Courses/Udacity/Intel-Edge/Work/EdgeApp/PGCR-Results-Analysis/ocr-data/graphs/weibull_graph.dot -o /home/aswin/Documents/Courses/Udacity/Intel-Edge/Work/EdgeApp/PGCR-Results-Analysis/ocr-data/graphs/weibull_graph.png'
        )

    print("Episodes:")
    for i in qstag.episodes:
        print(i)

    print("\n,Graphlets:")
    for i, j in qstag.graphlets.graphlets.items():
        print("\n", j)
		except ImportError:
			raise ImportError("ROS not found")
		client_node = rospy.init_node("qsr_lib_ros_client_example")
		cln = QSRlib_ROS_Client()
		req = cln.make_ros_request_message(qsrlib_request_message)
		res = cln.request_qsrs(req)
		qsrlib_response_message = pickle.loads(res.data)
	else:
		qsrlib = QSRlib()
		qsrlib_response_message = qsrlib.request_qsrs(req_msg=qsrlib_request_message)

	pretty_print_world_qsr_trace(which_qsr, qsrlib_response_message)

	qstag = qsrlib_response_message.qstag

	"""PRINT THE GRAPH TO FILE"""
	#print("QSTAG Graph:\n", qstag.graph)
	utils.graph2dot(qstag, "/tmp/graph.dot")
	os.system('dot -Tpng /tmp/graph.dot -o /tmp/graph.png')

	print("Episodes:")
	for i in qstag.episodes:
		print(i)

	print("\n,Graphlets:")
	for i, j in qstag.graphlets.graphlets.items():
		print("\n", j)

	print("\nHistogram of Graphlets:")
	print(qstag.graphlets.histogram)
Ejemplo n.º 5
0
        qsrlib = QSRlib()
        qsrlib_response_message = qsrlib.request_qsrs(
            req_msg=qsrlib_request_message)

    pretty_print_world_qsr_trace(which_qsr, qsrlib_response_message)

    qstag = qsrlib_response_message.qstag

    t2 = time()

    print("Time: ", t2 - t1)

    if args.print_graph:
        dirname = os.path.dirname(os.path.abspath(__file__))
        utils.graph2dot(
            qstag,
            """{dirname}/../../../speech/simulator/rayleigh_graph.dot""")
        os.system(
            """dot -Tpdf {dirname}/../../../speech/simulator/rayleigh_graph.dot -o {dirname}/../../../speech/simulator/rayleigh_graph.pdf"""
        )
        os.system(
            """dot -Tpng {dirname}/../../../speech/simulator/rayleigh_graph.dot -o {dirname}/../../../speech/simulator/rayleigh_graph.png"""
        )
        img = mpimg.imread(dirname +
                           '/../../../speech/simulator/rayleigh_graph.png')
        imgplot = plt.imshow(img)
        plt.show()

    if args.print_episodes:
        print("Episodes:")
        for i in qstag.episodes: