diff --git a/safety_user_plugin/scripts/qt_wrapper.py b/safety_user_plugin/scripts/qt_wrapper.py index c813968..eb32776 100644 --- a/safety_user_plugin/scripts/qt_wrapper.py +++ b/safety_user_plugin/scripts/qt_wrapper.py @@ -135,6 +135,8 @@ class QtWrapper: self.widget.batteryLabel.setText("{:.2f}".format(robot_info.battery_voltage)) self.widget.linearLabel.setText("{:.2f}".format(linear_vel)) self.widget.angularLabel.setText("{:.2f}".format(robot_info.angular_velocity[2])) + + # self.log_info(str(robot_info.clutch == CS.ENGAGED)) if robot_info.clutch == CS.ENGAGED: self.widget.clutchLabel.setText('1') @@ -180,9 +182,9 @@ class QtWrapper: self.log_error('Nie mozna wystartowac robota. MasterSTOP wcisniety!') def update_restrictions_gui(self,restrictions): - self.distanceRestrictionLabel.setText("{:.2f}".format(restrictions.distance)) - self.linearRestrictionLabel.setText("{:.2f}".format(restrictions.linear_velocity)) - self.angularRestrictionLabel.setText("{:.2f}".format(restrictions.angular_velocity)) + self.widget.distanceRestrictionLabel.setText("{:.2f}".format(restrictions.distance)) + self.widget.linearRestrictionLabel.setText("{:.2f}".format(restrictions.linear_velocity)) + self.widget.angularRestrictionLabel.setText("{:.2f}".format(restrictions.angular_velocity)) def log_info(self,info_text): self.logger_counter += 1 diff --git a/safety_user_plugin/scripts/ros_wrapper.py b/safety_user_plugin/scripts/ros_wrapper.py index 3bd0ac1..190b604 100644 --- a/safety_user_plugin/scripts/ros_wrapper.py +++ b/safety_user_plugin/scripts/ros_wrapper.py @@ -167,7 +167,7 @@ class ROSWrapper: def handle_restrictions_update(self,msg): restrictions = Restrictions(msg) - restrictions_update_callback(restrictions) + self.restrictions_update_callback(restrictions) # UserPlugin Callbacks def set_robots_list_update_callback(self,callback_function): diff --git a/safety_user_plugin/ui/user_view.ui b/safety_user_plugin/ui/user_view.ui index 0935d86..e744a25 100644 --- a/safety_user_plugin/ui/user_view.ui +++ b/safety_user_plugin/ui/user_view.ui @@ -200,6 +200,9 @@ <html><head/><body><p align="center">-</p></body></html> + + Qt::AlignCenter + @@ -232,6 +235,9 @@ <html><head/><body><p align="center">-</p></body></html> + + Qt::AlignCenter + @@ -245,6 +251,9 @@ <html><head/><body><p align="center">-</p></body></html> + + Qt::AlignCenter +