Fixed missing polish letters
This commit is contained in:
parent
a6ac4c8dfd
commit
511d552eff
@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
# coding=utf-8
|
||||||
import os
|
import os
|
||||||
import rospy
|
import rospy
|
||||||
import rospkg
|
import rospkg
|
||||||
@ -56,9 +57,9 @@ class QtWrapper:
|
|||||||
self.stdItemModel.setHeaderData( 0, Qt.Horizontal, 'Robot' )
|
self.stdItemModel.setHeaderData( 0, Qt.Horizontal, 'Robot' )
|
||||||
self.stdItemModel.setHeaderData( 1, Qt.Horizontal, 'Stan baterii' )
|
self.stdItemModel.setHeaderData( 1, Qt.Horizontal, 'Stan baterii' )
|
||||||
self.stdItemModel.setHeaderData( 2, Qt.Horizontal, 'Stan robota' )
|
self.stdItemModel.setHeaderData( 2, Qt.Horizontal, 'Stan robota' )
|
||||||
self.stdItemModel.setHeaderData( 3, Qt.Horizontal, 'Stan sprzegla' )
|
self.stdItemModel.setHeaderData( 3, Qt.Horizontal, 'Stan sprzęgła' )
|
||||||
self.stdItemModel.setHeaderData( 4, Qt.Horizontal, 'Predk. lin.' )
|
self.stdItemModel.setHeaderData( 4, Qt.Horizontal, 'Prędk. lin.' )
|
||||||
self.stdItemModel.setHeaderData( 5, Qt.Horizontal, 'Predk. obr.' )
|
self.stdItemModel.setHeaderData( 5, Qt.Horizontal, 'Prędk. obr.' )
|
||||||
|
|
||||||
self.widget.robotsList.setModel(self.stdItemModel)
|
self.widget.robotsList.setModel(self.stdItemModel)
|
||||||
|
|
||||||
@ -112,7 +113,7 @@ class QtWrapper:
|
|||||||
if self.master_stop_state == SS.RUNNING:
|
if self.master_stop_state == SS.RUNNING:
|
||||||
self.master_stop_state_updated_callback()
|
self.master_stop_state_updated_callback()
|
||||||
else:
|
else:
|
||||||
reply = QMessageBox.warning(self.widget,"UWAGA","Na pewno chcesz odblokowac wszystkie roboty?",QMessageBox.Yes,QMessageBox.No)
|
reply = QMessageBox.warning(self.widget,"UWAGA","Na pewno chcesz odblokować wszystkie roboty?",QMessageBox.Yes,QMessageBox.No)
|
||||||
|
|
||||||
if reply == QMessageBox.Yes:
|
if reply == QMessageBox.Yes:
|
||||||
self.master_stop_state_updated_callback()
|
self.master_stop_state_updated_callback()
|
||||||
@ -132,7 +133,7 @@ class QtWrapper:
|
|||||||
items_to_add.append(QStandardItem('{:.2f}'.format(robot_info.battery_voltage)))
|
items_to_add.append(QStandardItem('{:.2f}'.format(robot_info.battery_voltage)))
|
||||||
|
|
||||||
if robot_info.state == SS.RUNNING:
|
if robot_info.state == SS.RUNNING:
|
||||||
item = QStandardItem('Dziala')
|
item = QStandardItem('Działa')
|
||||||
item.setBackground(QBrush(Qt.green))
|
item.setBackground(QBrush(Qt.green))
|
||||||
items_to_add.append(item)
|
items_to_add.append(item)
|
||||||
elif robot_info.state == SS.STOPPED:
|
elif robot_info.state == SS.STOPPED:
|
||||||
@ -143,11 +144,11 @@ class QtWrapper:
|
|||||||
raise ValueError('Undefined value of robot_info.robot_state')
|
raise ValueError('Undefined value of robot_info.robot_state')
|
||||||
|
|
||||||
if robot_info.clutch == CS.ENGAGED:
|
if robot_info.clutch == CS.ENGAGED:
|
||||||
item = QStandardItem('Sprzegniete')
|
item = QStandardItem('Sprzęgnięte')
|
||||||
item.setBackground(QBrush(Qt.green))
|
item.setBackground(QBrush(Qt.green))
|
||||||
items_to_add.append(item)
|
items_to_add.append(item)
|
||||||
elif robot_info.clutch == CS.DISENGAGED:
|
elif robot_info.clutch == CS.DISENGAGED:
|
||||||
item = QStandardItem('Rozprzegniete')
|
item = QStandardItem('Rozprzęgnięte')
|
||||||
item.setBackground(QBrush(Qt.red))
|
item.setBackground(QBrush(Qt.red))
|
||||||
items_to_add.append(item)
|
items_to_add.append(item)
|
||||||
else:
|
else:
|
||||||
@ -174,12 +175,12 @@ class QtWrapper:
|
|||||||
def master_stopped(self):
|
def master_stopped(self):
|
||||||
self.master_stop_state = SS.STOPPED
|
self.master_stop_state = SS.STOPPED
|
||||||
self.display_master_stop_off()
|
self.display_master_stop_off()
|
||||||
self.log_info('Przycisk masterSTOP zostal nacisniety. Zatrzymuje roboty')
|
self.log_info('Przycisk masterSTOP zostal naciśnięty. Zatrzymuję roboty')
|
||||||
|
|
||||||
def master_started(self):
|
def master_started(self):
|
||||||
self.master_stop_state = SS.RUNNING
|
self.master_stop_state = SS.RUNNING
|
||||||
self.display_master_stop_on()
|
self.display_master_stop_on()
|
||||||
self.log_info('Przycisk masterSTOP odcisniety')
|
self.log_info('Przycisk masterSTOP odciśnięty')
|
||||||
|
|
||||||
|
|
||||||
def add_robot(self,robot_id):
|
def add_robot(self,robot_id):
|
||||||
@ -192,7 +193,7 @@ class QtWrapper:
|
|||||||
self.stdItemModel.setItem(self.stdItemModel.rowCount(),0,new_robot_info)
|
self.stdItemModel.setItem(self.stdItemModel.rowCount(),0,new_robot_info)
|
||||||
|
|
||||||
self.displayed_robots_id_list.append(robot_id)
|
self.displayed_robots_id_list.append(robot_id)
|
||||||
self.log_info('PIONIER{0} polaczony'.format(robot_id))
|
self.log_info('PIONIER{0} połączony'.format(robot_id))
|
||||||
else:
|
else:
|
||||||
raise RuntimeError('Adding robot, which is already in master GUI')
|
raise RuntimeError('Adding robot, which is already in master GUI')
|
||||||
|
|
||||||
@ -204,7 +205,7 @@ class QtWrapper:
|
|||||||
row_number = item.row()
|
row_number = item.row()
|
||||||
self.stdItemModel.removeRow(row_number)
|
self.stdItemModel.removeRow(row_number)
|
||||||
|
|
||||||
self.log_info('PIONIER{0} rozlaczony'.format(robot_id))
|
self.log_info('PIONIER{0} rozłączony'.format(robot_id))
|
||||||
self.displayed_robots_id_list.remove(robot_id)
|
self.displayed_robots_id_list.remove(robot_id)
|
||||||
|
|
||||||
def log_info(self,info_text):
|
def log_info(self,info_text):
|
||||||
@ -239,4 +240,4 @@ class QtWrapper:
|
|||||||
|
|
||||||
def scroll_to_bottom(self):
|
def scroll_to_bottom(self):
|
||||||
scrollbar = self.widget.logsBrowser.verticalScrollBar()
|
scrollbar = self.widget.logsBrowser.verticalScrollBar()
|
||||||
scrollbar.setValue(scrollbar.maximum())
|
scrollbar.setValue(scrollbar.maximum())
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
# coding=utf-8
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import rospy
|
import rospy
|
||||||
import rospkg
|
import rospkg
|
||||||
@ -66,7 +68,7 @@ class QtWrapper:
|
|||||||
if self.robot_state == SS.RUNNING:
|
if self.robot_state == SS.RUNNING:
|
||||||
self.handle_stopButton_clicked_callback()
|
self.handle_stopButton_clicked_callback()
|
||||||
else:
|
else:
|
||||||
reply = QMessageBox.warning(self.widget,"UWAGA","Na pewno chcesz odblokowac robota?",QMessageBox.Yes,QMessageBox.No)
|
reply = QMessageBox.warning(self.widget,"UWAGA","Na pewno chcesz odblokować robota?",QMessageBox.Yes,QMessageBox.No)
|
||||||
|
|
||||||
if reply == QMessageBox.Yes:
|
if reply == QMessageBox.Yes:
|
||||||
self.handle_stopButton_clicked_callback()
|
self.handle_stopButton_clicked_callback()
|
||||||
@ -83,12 +85,12 @@ class QtWrapper:
|
|||||||
def display_clutch_on(self):
|
def display_clutch_on(self):
|
||||||
# self.widget.clutchLabel.setPixmap(self.ok_pixmap.scaled(40,40))
|
# self.widget.clutchLabel.setPixmap(self.ok_pixmap.scaled(40,40))
|
||||||
self.widget.clutchButton.setStyleSheet("QPushButton { color: black; background-color: green; font: bold 20px}")
|
self.widget.clutchButton.setStyleSheet("QPushButton { color: black; background-color: green; font: bold 20px}")
|
||||||
self.widget.clutchButton.setText('Rozlacz sprzeglo')
|
self.widget.clutchButton.setText('Rozłącz sprzęgło')
|
||||||
|
|
||||||
def display_clutch_off(self):
|
def display_clutch_off(self):
|
||||||
# self.widget.clutchLabel.setPixmap(self.cancel_pixmap.scaled(40,40))
|
# self.widget.clutchLabel.setPixmap(self.cancel_pixmap.scaled(40,40))
|
||||||
self.widget.clutchButton.setStyleSheet("QPushButton { color: black; background-color: red; font: bold 20px}")
|
self.widget.clutchButton.setStyleSheet("QPushButton { color: black; background-color: red; font: bold 20px}")
|
||||||
self.widget.clutchButton.setText('Polacz sprzeglo')
|
self.widget.clutchButton.setText('Połącz sprzęgło')
|
||||||
|
|
||||||
def display_state_on(self):
|
def display_state_on(self):
|
||||||
self.widget.stateLabel.setPixmap(self.ok_pixmap.scaled(40,40))
|
self.widget.stateLabel.setPixmap(self.ok_pixmap.scaled(40,40))
|
||||||
@ -103,7 +105,7 @@ class QtWrapper:
|
|||||||
self.robot_state = SS.STOPPED
|
self.robot_state = SS.STOPPED
|
||||||
|
|
||||||
def handle_not_selected_error(self):
|
def handle_not_selected_error(self):
|
||||||
self.log_error('Najpierw wybierz PIONIERA z listy robotow')
|
self.log_error('Najpierw wybierz PIONIERA z listy robotów')
|
||||||
|
|
||||||
def handle_openButton_clicked(self):
|
def handle_openButton_clicked(self):
|
||||||
selected_robot_id = self.get_selected_robot_id()
|
selected_robot_id = self.get_selected_robot_id()
|
||||||
@ -111,7 +113,7 @@ class QtWrapper:
|
|||||||
if selected_robot_id != None:
|
if selected_robot_id != None:
|
||||||
self.handle_openButton_clicked_callback(selected_robot_id)
|
self.handle_openButton_clicked_callback(selected_robot_id)
|
||||||
else:
|
else:
|
||||||
self.log_error('Najpierw wybierz PIONIERA z listy robotow')
|
self.log_error('Najpierw wybierz PIONIERA z listy robotów')
|
||||||
|
|
||||||
def handle_closeButton_clicked(self):
|
def handle_closeButton_clicked(self):
|
||||||
self.handle_closeButton_clicked_callback()
|
self.handle_closeButton_clicked_callback()
|
||||||
@ -132,14 +134,14 @@ class QtWrapper:
|
|||||||
self.disconnect_signals()
|
self.disconnect_signals()
|
||||||
self.connect_robot_signals()
|
self.connect_robot_signals()
|
||||||
self.log_info('PIONIER{0} wybrany!'.format(robot_id))
|
self.log_info('PIONIER{0} wybrany!'.format(robot_id))
|
||||||
self.log_info('Robot zostanie zatrzymany i sprzegniety')
|
self.log_info('Robot zostanie zatrzymany i sprzęgnięty')
|
||||||
|
|
||||||
self.widget.choiceButton.setText('Zwolnij robota')
|
self.widget.choiceButton.setText('Zwolnij robota')
|
||||||
|
|
||||||
def release_robot(self):
|
def release_robot(self):
|
||||||
self.disconnect_signals()
|
self.disconnect_signals()
|
||||||
self.connect_signals()
|
self.connect_signals()
|
||||||
self.log_info('Odlaczam robota')
|
self.log_info('Odłączam robota')
|
||||||
self.clear_robot_info()
|
self.clear_robot_info()
|
||||||
|
|
||||||
def update_robots_list_gui(self,robots_id_list):
|
def update_robots_list_gui(self,robots_id_list):
|
||||||
@ -206,33 +208,33 @@ class QtWrapper:
|
|||||||
|
|
||||||
def master_stopped(self):
|
def master_stopped(self):
|
||||||
self.widget.masterstopLabel.setPixmap(self.cancel_pixmap.scaled(40,40))
|
self.widget.masterstopLabel.setPixmap(self.cancel_pixmap.scaled(40,40))
|
||||||
self.log_info('Przycisk masterSTOP zostal nacisniety. Zatrzymuje roboty')
|
self.log_info('Przycisk masterSTOP został naciśnięty. Zatrzymuje roboty')
|
||||||
|
|
||||||
def master_started(self):
|
def master_started(self):
|
||||||
self.widget.masterstopLabel.setPixmap(self.ok_pixmap.scaled(40,40))
|
self.widget.masterstopLabel.setPixmap(self.ok_pixmap.scaled(40,40))
|
||||||
self.log_info('Przycisk masterSTOP odcisniety. Mozesz uruchomic robota')
|
self.log_info('Przycisk masterSTOP odciśnięty. Mozesz uruchomić robota')
|
||||||
|
|
||||||
def user_stopped(self):
|
def user_stopped(self):
|
||||||
self.log_info('Robot zatrzymany')
|
self.log_info('Robot zatrzymany')
|
||||||
self.display_state_off()
|
self.display_state_off()
|
||||||
|
|
||||||
def user_started(self):
|
def user_started(self):
|
||||||
self.log_info('Robot wystartowal')
|
self.log_info('Robot wystartował')
|
||||||
self.display_state_on()
|
self.display_state_on()
|
||||||
|
|
||||||
def disengage_clutch(self):
|
def disengage_clutch(self):
|
||||||
self.log_info('Rozprzegam sprzeglo')
|
self.log_info('Rozprzęgam sprzęgło')
|
||||||
self.display_clutch_off()
|
self.display_clutch_off()
|
||||||
|
|
||||||
def engage_clutch(self):
|
def engage_clutch(self):
|
||||||
self.log_info('Sprzegam sprzeglo')
|
self.log_info('Sprzęgam sprzegło')
|
||||||
self.display_clutch_on()
|
self.display_clutch_on()
|
||||||
|
|
||||||
def master_is_stopped_notify(self):
|
def master_is_stopped_notify(self):
|
||||||
self.log_error('Nie mozna wystartowac robota. MasterSTOP wcisniety!')
|
self.log_error('Nie można wystartować robota. MasterSTOP wciśnięty!')
|
||||||
|
|
||||||
def obstacle_is_detected_notify(self):
|
def obstacle_is_detected_notify(self):
|
||||||
self.log_error('Nie mozna wystartowac. Przeszkoda w polu dzialania robota')
|
self.log_error('Nie mozna wystartować. Przeszkoda w polu działania robota')
|
||||||
|
|
||||||
def update_restrictions_gui(self,restrictions):
|
def update_restrictions_gui(self,restrictions):
|
||||||
self.widget.distanceRestrictionLabel.setText("{:.2f}".format(restrictions.distance))
|
self.widget.distanceRestrictionLabel.setText("{:.2f}".format(restrictions.distance))
|
||||||
@ -275,17 +277,17 @@ class QtWrapper:
|
|||||||
self.clear_robot_info()
|
self.clear_robot_info()
|
||||||
self.disconnect_signals()
|
self.disconnect_signals()
|
||||||
self.connect_signals()
|
self.connect_signals()
|
||||||
self.log_info('Utrata polaczenia z robotem PIONIER{0}'.format(lost_robot_id))
|
self.log_info('Utrata połączenia z robotem PIONIER{0}'.format(lost_robot_id))
|
||||||
|
|
||||||
def connection_to_master_lost(self):
|
def connection_to_master_lost(self):
|
||||||
self.log_error('Utrata polaczenia z masterstopem. Popros prowadzacego o jego uruchomienie')
|
self.log_error('Utrata połączenia z masterstopem. Poproś prowadzącego o jego uruchomienie')
|
||||||
|
|
||||||
def obstacle_detected(self):
|
def obstacle_detected(self):
|
||||||
self.log_error('Przeszkoda wykryta. Zatrzymuje robota')
|
self.log_error('Przeszkoda wykryta. Zatrzymuję robota')
|
||||||
# TODO Zmiana
|
# TODO Zmiana
|
||||||
|
|
||||||
def obstacle_removed(self):
|
def obstacle_removed(self):
|
||||||
self.log_info('Przeszkoda usunieta')
|
self.log_info('Przeszkoda usunięta')
|
||||||
|
|
||||||
def scroll_to_bottom(self):
|
def scroll_to_bottom(self):
|
||||||
scrollbar = self.widget.logsBrowser.verticalScrollBar()
|
scrollbar = self.widget.logsBrowser.verticalScrollBar()
|
||||||
@ -307,4 +309,4 @@ class QtWrapper:
|
|||||||
self.widget.stopButton.setStyleSheet("")
|
self.widget.stopButton.setStyleSheet("")
|
||||||
|
|
||||||
self.widget.clutchButton.setText('-')
|
self.widget.clutchButton.setText('-')
|
||||||
self.widget.clutchButton.setStyleSheet("")
|
self.widget.clutchButton.setStyleSheet("")
|
||||||
|
Loading…
Reference in New Issue
Block a user