예제 #1
0
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        loadUi(os.path.join(path, 'resources', 'part.ui'), self)

        self.pub_marker_array = rospy.Publisher('visualization_marker_array',
                                                MarkerArray,
                                                queue_size=1)

        self.btnLoad.clicked.connect(self.btnLoadClicked)
        self.btnProcessMesh.clicked.connect(self.btnProcessMeshClicked)
        self.btnProcessLayer.clicked.connect(self.btnProcessLayerClicked)
        self.btnAcceptPath.clicked.connect(self.btnAcceptPathClicked)

        self.sbPositionX.valueChanged.connect(self.changePosition)
        self.sbPositionY.valueChanged.connect(self.changePosition)
        self.sbPositionZ.valueChanged.connect(self.changePosition)

        self.sbSizeX.valueChanged.connect(self.changeSize)
        self.sbSizeY.valueChanged.connect(self.changeSize)
        self.sbSizeZ.valueChanged.connect(self.changeSize)

        self.processing = False
        self.timer = QtCore.QTimer(self)
        self.timer.timeout.connect(self.updateProcess)

        self.robpath = RobPath()
예제 #2
0
    def __init__(self):
        super(RobPathUI, self).__init__()
        path = rospkg.RosPack().get_path('etna_planning')
        loadUi(os.path.join(path, 'resources', 'robviz.ui'), self)

        self.boxPlot.addWidget(MyViz())

        self.btnLoad.clicked.connect(self.btnLoadClicked)
        self.btnProcessMesh.clicked.connect(self.btnProcessMeshClicked)
        self.btnSaveRapid.clicked.connect(self.btnSaveRapidClicked)
        self.btnRecord.clicked.connect(self.btnRecordClicked)

        self.sbSpeed.valueChanged.connect(self.changeSpeed)
        self.sbPower.valueChanged.connect(self.changePower)

        self.sbPositionX.valueChanged.connect(self.changePosition)
        self.sbPositionY.valueChanged.connect(self.changePosition)
        self.sbPositionZ.valueChanged.connect(self.changePosition)

        self.sbSizeX.valueChanged.connect(self.changeSize)
        self.sbSizeY.valueChanged.connect(self.changeSize)
        self.sbSizeZ.valueChanged.connect(self.changeSize)

        self.btnQuit.clicked.connect(self.btnQuitClicked)

        self.publisher = rospy.Publisher('visualization_marker',
                                         Marker,
                                         queue_size=1)

        self.recording = False
        cloud_topic = rospy.get_param('~cloud',
                                      '/camera/cloud')  # cameara/points
        rospy.Subscriber(cloud_topic,
                         PointCloud2,
                         self.callback_point_cloud,
                         queue_size=1)

        self.listener = tf.TransformListener()
        #rospy.spin()

        self.processing = False
        self.timer = QtCore.QTimer(self.boxPlot)
        self.timer.timeout.connect(self.updateProcess)

        self.robpath = RobPath()