优化界面

pull/30/head
大耳刮子 3 years ago
parent 45153ce6a6
commit 062a36cccb

@ -87,7 +87,7 @@ void QNode::AutoMove(float speed_linear, float speed_turn,
//How fast will we update the robot's movement?
double rate = 50;
double rate = 1;
//Set the equivalent ROS rate variable
ros::Rate loopRate(rate);
@ -138,7 +138,7 @@ void QNode::AutoMove(float speed_linear, float speed_turn,
twist.angular.y = 0;
twist.angular.z = speed_turn * th;
ticks = int(total_times * rate);
ticks = int(total_times);
for(int i = 0; i < ticks; i++)
{

@ -7,9 +7,21 @@
<x>0</x>
<y>0</y>
<width>1440</width>
<height>810</height>
<height>860</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>1440</width>
<height>860</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>1440</width>
<height>860</height>
</size>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
@ -17,8 +29,178 @@
<string notr="true"/>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_menu">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="btn_main">
<property name="minimumSize">
<size>
<width>0</width>
<height>60</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string/>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_uav">
<property name="minimumSize">
<size>
<width>0</width>
<height>60</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string/>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_ugv">
<property name="minimumSize">
<size>
<width>0</width>
<height>60</height>
</size>
</property>
<property name="cursor">
<cursorShape>ArrowCursor</cursorShape>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset theme="://images/toolbar_dash.png">
<normaloff>../../../../../catkin_ws/src/Ros_Qt5_Gui_App/ui</normaloff>../../../../../catkin_ws/src/Ros_Qt5_Gui_App/ui</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_map">
<property name="minimumSize">
<size>
<width>0</width>
<height>60</height>
</size>
</property>
<property name="cursor">
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="styleSheet">
<string notr="true">QPushButton:hover{
background-color:rgb(186, 189, 182);
border-bottom:2px solid rgb(67, 154, 246);
}
QPushButton:checked{
background-color:cyan;
border-bottom:2px solid white
}
QPushButton:pressed{
background-color:rgb(67, 154, 246)
}
QPushButton{
background-color:rgb(238, 238, 236);
border:none;
padding:0px 0px 0px 0px;
margin:0px 0px 0px 0px;
}</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset theme="://images/toolbar_map.png">
<normaloff>../../../../../catkin_ws/src/Ros_Qt5_Gui_App/ui</normaloff>../../../../../catkin_ws/src/Ros_Qt5_Gui_App/ui</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_other">
<property name="minimumSize">
<size>
<width>0</width>
<height>60</height>
</size>
</property>
<property name="cursor">
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="styleSheet">
<string notr="true">QPushButton:hover{
background-color:rgb(186, 189, 182);
border-bottom:2px solid rgb(67, 154, 246);
}
QPushButton:checked{
background-color:cyan;
border-bottom:2px solid white
}
QPushButton:pressed{
background-color:rgb(67, 154, 246)
}
QPushButton{
background-color:rgb(238, 238, 236);
border:none;
padding:0px 0px 0px 0px;
margin:0px 0px 0px 0px;
}</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset theme="://images/toolbar_other.png">
<normaloff>../../../../../catkin_ws/src/Ros_Qt5_Gui_App/ui</normaloff>../../../../../catkin_ws/src/Ros_Qt5_Gui_App/ui</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0">
<widget class="QStackedWidget" name="stackedWidget_main">
<property name="currentIndex">
<number>2</number>
@ -54,20 +236,302 @@
</widget>
</widget>
<widget class="QWidget" name="UGVWidget">
<widget class="QWidget" name="layoutWidget">
<widget class="QWidget" name="">
<property name="geometry">
<rect>
<x>1000</x>
<y>30</y>
<width>407</width>
<height>680</height>
<x>700</x>
<y>0</y>
<width>735</width>
<height>750</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_9">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QLabel" name="label_time">
<property name="minimumSize">
<size>
<width>60</width>
<height>0</height>
</size>
</property>
<property name="font">
<font>
<pointsize>13</pointsize>
</font>
</property>
<property name="text">
<string>00:00:00</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_19">
<property name="minimumSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap>:/images/robot2.png</pixmap>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_18">
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string>系统状态:</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_status">
<property name="minimumSize">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="cursor">
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="styleSheet">
<string notr="true">QPushButton{
border:none;
padding:0px 0px 0px 0px;
margin:0px 0px 0px 0px;
}</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_12">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_10">
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_8">
<property name="maximumSize">
<size>
<width>30</width>
<height>30</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap>:/images/power.png</pixmap>
</property>
</widget>
</item>
<item>
<widget class="QProgressBar" name="progressBar">
<property name="maximumSize">
<size>
<width>90</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QProgressBar#progressBar
{
border:none; /*无边框*/
background:rgb(211, 215, 207);
border-radius:5px;
text-align:center; /*文本的位置*/
color: rgb(229, 229, 229); /*文本颜色*/
}
QProgressBar::chunk
{
background-color:rgb(115, 210, 22);
border-radius:4px;
}
</string>
</property>
<property name="value">
<number>70</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_11">
<property name="minimumSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap>:/images/power-v.png</pixmap>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_power">
<property name="minimumSize">
<size>
<width>50</width>
<height>32</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>50</width>
<height>32</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string>00.00V</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<layout class="QVBoxLayout" name="verticalLayout_8">
<item>
<widget class="QLabel" name="label_9">
<property name="minimumSize">
<size>
<width>270</width>
<height>200</height>
</size>
</property>
<property name="text">
<string>map</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_12">
<property name="minimumSize">
<size>
<width>270</width>
<height>200</height>
</size>
</property>
<property name="text">
<string>target</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_6">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_13">
<property name="minimumSize">
<size>
<width>270</width>
<height>200</height>
</size>
</property>
<property name="text">
<string>shortcut</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="horizontalSpacer_13">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QStackedWidget" name="stackedWidget_ros_control">
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="keyboard_control">
<layout class="QHBoxLayout" name="horizontalLayout_3">
@ -666,54 +1130,23 @@ background-color: rgb(255,255,255);
</layout>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="widget_speed_x" native="true">
<property name="geometry">
<rect>
<x>100</x>
<y>400</y>
<width>302</width>
<height>300</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>300</width>
<height>300</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
</widget>
<widget class="QWidget" name="widget_speed_th" native="true">
<widget class="QWidget" name="">
<property name="geometry">
<rect>
<x>490</x>
<y>400</y>
<width>302</width>
<height>300</height>
<x>21</x>
<y>1</y>
<width>660</width>
<height>756</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>300</width>
<height>300</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
</widget>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<widget class="QGroupBox" name="groupBox_12">
<property name="geometry">
<rect>
<x>50</x>
<y>10</y>
<width>541</width>
<height>368</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
@ -723,195 +1156,196 @@ background-color: rgb(255,255,255);
<property name="title">
<string>Logging</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="1" column="0">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label_camera">
<property name="minimumSize">
<size>
<width>600</width>
<height>270</height>
</size>
</property>
<property name="text">
<string>CameraLabel</string>
</property>
</widget>
</item>
<item>
<widget class="QListView" name="view_logging_2">
<property name="enabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_camera">
<property name="text">
<string>CameraLabel</string>
<property name="minimumSize">
<size>
<width>600</width>
<height>81</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>81</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_menu">
<property name="spacing">
<number>0</number>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QPushButton" name="btn_main">
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="QWidget" name="widget_speed_x" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>60</height>
<width>300</width>
<height>300</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string/>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_uav">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="label_4">
<property name="minimumSize">
<size>
<width>0</width>
<height>60</height>
<width>160</width>
<height>30</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string/>
<string>x 轴线速度</string>
</property>
<property name="iconSize">
</widget>
</item>
<item>
<spacer name="horizontalSpacer_9">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>32</width>
<height>32</height>
<width>40</width>
<height>20</height>
</size>
</property>
</widget>
</spacer>
</item>
<item>
<widget class="QPushButton" name="btn_ugv">
<widget class="QLabel" name="label_5">
<property name="minimumSize">
<size>
<width>0</width>
<height>60</height>
<width>60</width>
<height>35</height>
</size>
</property>
<property name="cursor">
<cursorShape>ArrowCursor</cursorShape>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string/>
<string>正向</string>
</property>
<property name="icon">
<iconset theme="://images/toolbar_dash.png">
<normaloff>../../../../../catkin_ws/src/Ros_Qt5_Gui_App/ui</normaloff>../../../../../catkin_ws/src/Ros_Qt5_Gui_App/ui</iconset>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<spacer name="horizontalSpacer_11">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="iconSize">
<property name="sizeHint" stdset="0">
<size>
<width>32</width>
<height>32</height>
<width>40</width>
<height>20</height>
</size>
</property>
</widget>
</spacer>
</item>
<item>
<widget class="QPushButton" name="btn_map">
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QWidget" name="widget_speed_th" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>60</height>
<width>300</width>
<height>300</height>
</size>
</property>
<property name="cursor">
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="styleSheet">
<string notr="true">QPushButton:hover{
background-color:rgb(186, 189, 182);
border-bottom:2px solid rgb(67, 154, 246);
}
QPushButton:checked{
background-color:cyan;
border-bottom:2px solid white
}
QPushButton:pressed{
background-color:rgb(67, 154, 246)
}
QPushButton{
background-color:rgb(238, 238, 236);
border:none;
padding:0px 0px 0px 0px;
margin:0px 0px 0px 0px;
}</string>
<string notr="true"/>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QLabel" name="label_6">
<property name="minimumSize">
<size>
<width>160</width>
<height>30</height>
</size>
</property>
<property name="text">
<string/>
<string>x 轴线速度</string>
</property>
<property name="icon">
<iconset theme="://images/toolbar_map.png">
<normaloff>../../../../../catkin_ws/src/Ros_Qt5_Gui_App/ui</normaloff>../../../../../catkin_ws/src/Ros_Qt5_Gui_App/ui</iconset>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_10">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="iconSize">
<property name="sizeHint" stdset="0">
<size>
<width>32</width>
<height>32</height>
<width>40</width>
<height>20</height>
</size>
</property>
</widget>
</spacer>
</item>
<item>
<widget class="QPushButton" name="btn_other">
<widget class="QLabel" name="label_7">
<property name="minimumSize">
<size>
<width>0</width>
<height>60</height>
<width>60</width>
<height>35</height>
</size>
</property>
<property name="cursor">
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="styleSheet">
<string notr="true">QPushButton:hover{
background-color:rgb(186, 189, 182);
border-bottom:2px solid rgb(67, 154, 246);
}
QPushButton:checked{
background-color:cyan;
border-bottom:2px solid white
}
QPushButton:pressed{
background-color:rgb(67, 154, 246)
}
QPushButton{
background-color:rgb(238, 238, 236);
border:none;
padding:0px 0px 0px 0px;
margin:0px 0px 0px 0px;
}</string>
</property>
<property name="text">
<string/>
<string>正向</string>
</property>
<property name="icon">
<iconset theme="://images/toolbar_other.png">
<normaloff>../../../../../catkin_ws/src/Ros_Qt5_Gui_App/ui</normaloff>../../../../../catkin_ws/src/Ros_Qt5_Gui_App/ui</iconset>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<spacer name="horizontalSpacer_14">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="iconSize">
<property name="sizeHint" stdset="0">
<size>
<width>32</width>
<height>32</height>
<width>40</width>
<height>20</height>
</size>
</property>
</widget>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</widget>
</item>
</layout>
</widget>

Loading…
Cancel
Save