Commit 50a9eff3 authored by Paul Beuchat's avatar Paul Beuchat
Browse files

Fixed a few connections so that the picker GUI works with ROS. Still need to...

Fixed a few connections so that the picker GUI works with ROS. Still need to integrate with the PickerControllerService
parent 41f9058f
......@@ -59,7 +59,7 @@
</attribute>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
<widget class="PickerControllerTab" name="widget_4" native="true"/>
<widget class="PickerControllerTab" name="picker_controller_tab_widget" native="true"/>
</item>
</layout>
</widget>
......
......@@ -267,7 +267,7 @@
</widget>
</item>
<item row="0" column="3">
<widget class="QPushButton" name="enable_demo_button">
<widget class="QPushButton" name="enable_picker_button">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
......@@ -293,12 +293,12 @@
</font>
</property>
<property name="text">
<string>Demo</string>
<string>Picker</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="load_yaml_demo_button">
<widget class="QPushButton" name="load_yaml_picker_button">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
......@@ -318,7 +318,7 @@
</size>
</property>
<property name="text">
<string>Demo</string>
<string>Picker</string>
</property>
</widget>
</item>
......
......@@ -120,12 +120,12 @@
<widget class="QCheckBox" name="checkbox_goto_end">
<property name="maximumSize">
<size>
<width>40</width>
<width>30</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QCheckBox::indicator{ width:40px ; height:40px }</string>
<string notr="true">QCheckBox::indicator{ width:30px ; height:30px }</string>
</property>
<property name="text">
<string/>
......@@ -1027,12 +1027,12 @@
<widget class="QCheckBox" name="checkbox_attach">
<property name="maximumSize">
<size>
<width>40</width>
<width>30</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QCheckBox::indicator{ width:40px ; height:40px }</string>
<string notr="true">QCheckBox::indicator{ width:30px ; height:30px }</string>
</property>
<property name="text">
<string/>
......@@ -1832,12 +1832,12 @@
<widget class="QCheckBox" name="checkbox_goto_start">
<property name="maximumSize">
<size>
<width>40</width>
<width>30</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QCheckBox::indicator{ width:40px ; height:40px }</string>
<string notr="true">QCheckBox::indicator{ width:30px ; height:30px }</string>
</property>
<property name="text">
<string/>
......@@ -1852,12 +1852,12 @@
<widget class="QCheckBox" name="checkbox_jump">
<property name="maximumSize">
<size>
<width>40</width>
<width>30</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QCheckBox::indicator{ width:40px ; height:40px }</string>
<string notr="true">QCheckBox::indicator{ width:30px ; height:30px }</string>
</property>
<property name="text">
<string/>
......@@ -1879,12 +1879,12 @@
<widget class="QCheckBox" name="checkbox_put_down">
<property name="maximumSize">
<size>
<width>40</width>
<width>30</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QCheckBox::indicator{ width:40px ; height:40px }</string>
<string notr="true">QCheckBox::indicator{ width:30px ; height:30px }</string>
</property>
<property name="text">
<string/>
......@@ -1899,12 +1899,12 @@
<widget class="QCheckBox" name="checkbox_lift_up">
<property name="maximumSize">
<size>
<width>40</width>
<width>30</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QCheckBox::indicator{ width:40px ; height:40px }</string>
<string notr="true">QCheckBox::indicator{ width:30px ; height:30px }</string>
</property>
<property name="text">
<string/>
......@@ -1922,12 +1922,12 @@
</property>
<property name="maximumSize">
<size>
<width>40</width>
<width>30</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QCheckBox::indicator{ width:40px ; height:40px }</string>
<string notr="true">QCheckBox::indicator{ width:30px ; height:30px }</string>
</property>
<property name="text">
<string/>
......@@ -1948,12 +1948,12 @@
<widget class="QCheckBox" name="checkbox_squat">
<property name="maximumSize">
<size>
<width>40</width>
<width>30</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QCheckBox::indicator{ width:40px ; height:40px }</string>
<string notr="true">QCheckBox::indicator{ width:30px ; height:30px }</string>
</property>
<property name="text">
<string/>
......@@ -2254,12 +2254,12 @@
</property>
<property name="maximumSize">
<size>
<width>40</width>
<width>30</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QCheckBox::indicator{ width:40px ; height:40px }</string>
<string notr="true">QCheckBox::indicator{ width:30px ; height:30px }</string>
</property>
<property name="text">
<string/>
......@@ -2702,12 +2702,12 @@
<widget class="QCheckBox" name="checkbox_should_publish_value_changed">
<property name="maximumSize">
<size>
<width>40</width>
<width>30</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QCheckBox::indicator{ width:40px ; height:40px }</string>
<string notr="true">QCheckBox::indicator{ width:30px ; height:30px }</string>
</property>
<property name="text">
<string/>
......
......@@ -40,12 +40,12 @@
// operation state of this agent. These "commands"
// are sent from this GUI node to the "PPSClient"
// node where the command is enacted
#define CMD_USE_SAFE_CONTROLLER 1
#define CMD_USE_DEMO_CONTROLLER 2
#define CMD_USE_STUDENT_CONTROLLER 3
#define CMD_USE_MPC_CONTROLLER 4
#define CMD_USE_REMOTE_CONTROLLER 5
#define CMD_USE_TUNING_CONTROLLER 6
// #define CMD_USE_SAFE_CONTROLLER 1
// #define CMD_USE_DEMO_CONTROLLER 2
// #define CMD_USE_STUDENT_CONTROLLER 3
// #define CMD_USE_MPC_CONTROLLER 4
// #define CMD_USE_REMOTE_CONTROLLER 5
// #define CMD_USE_TUNING_CONTROLLER 6
namespace Ui {
......@@ -75,13 +75,13 @@ private slots:
// ENABLE CONTROLLER BUTTONS ON-CLICK CALLBACK
void on_enable_safe_button_clicked();
void on_enable_demo_button_clicked();
void on_enable_picker_button_clicked();
void on_enable_student_button_clicked();
void on_enable_default_button_clicked();
// LOAD YAML BUTTONS ON-CLICK CALLBACK
void on_load_yaml_safe_button_clicked();
void on_load_yaml_demo_button_clicked();
void on_load_yaml_picker_button_clicked();
void on_load_yaml_student_button_clicked();
void on_load_yaml_default_button_clicked();
......
......@@ -31,6 +31,12 @@ ControllerTabs::ControllerTabs(QWidget *parent) :
ui->student_controller_tab_widget , &StudentControllerTab::setMeasuredPose
);
QObject::connect(
this , &ControllerTabs::measuredPoseValueChanged ,
ui->picker_controller_tab_widget , &PickerControllerTab::setMeasuredPose
);
// CONNECT THE "MEASUREMENTS UNAVAILABLE" SIGNAL TO
// EACH OF THE TABS
......@@ -44,6 +50,11 @@ ControllerTabs::ControllerTabs(QWidget *parent) :
ui->student_controller_tab_widget , &StudentControllerTab::poseDataUnavailableSlot
);
QObject::connect(
this , &ControllerTabs::poseDataUnavailableSignal ,
ui->picker_controller_tab_widget , &PickerControllerTab::poseDataUnavailableSlot
);
// CONNECT TO THE COORDINATOR SIGNAL TO BE ALWAYS UPDATED
// WITH THE LIST OF AGENT IDs TO COORDINATE
......@@ -60,6 +71,11 @@ ControllerTabs::ControllerTabs(QWidget *parent) :
ui->student_controller_tab_widget , &StudentControllerTab::setAgentIDsToCoordinate
);
QObject::connect(
this , &ControllerTabs::agentIDsToCoordinateChanged ,
ui->picker_controller_tab_widget , &PickerControllerTab::setAgentIDsToCoordinate
);
......@@ -289,6 +305,11 @@ void ControllerTabs::setControllerEnabled(int new_controller)
//ui->controller_enabled_label->setText("Tuning");
break;
}
case PICKER_CONTROLLER:
{
setTextColourOfTabLabel( m_tab_text_colour_highlight , ui->picker_tab );
break;
}
default:
{
//ui->controller_enabled_label->setText("Unknown");
......
......@@ -61,8 +61,8 @@ void EnableControllerLoadYamlBar::showHideController_student_changed()
void EnableControllerLoadYamlBar::showHideController_picker_changed()
{
ui->enable_demo_button ->setHidden( !(ui->enable_demo_button->isHidden()) );
ui->load_yaml_demo_button->setHidden( !(ui->load_yaml_demo_button->isHidden()) );
ui->enable_picker_button ->setHidden( !(ui->enable_picker_button->isHidden()) );
ui->load_yaml_picker_button->setHidden( !(ui->load_yaml_picker_button->isHidden()) );
}
void EnableControllerLoadYamlBar::showHideController_safe_changed()
......@@ -89,14 +89,14 @@ void EnableControllerLoadYamlBar::on_enable_safe_button_clicked()
#endif
}
void EnableControllerLoadYamlBar::on_enable_demo_button_clicked()
void EnableControllerLoadYamlBar::on_enable_picker_button_clicked()
{
#ifdef CATKIN_MAKE
d_fall_pps::IntWithHeader msg;
fillIntMessageHeader(msg);
msg.data = CMD_USE_DEMO_CONTROLLER;
msg.data = CMD_USE_PICKER_CONTROLLER;
this->commandPublisher.publish(msg);
ROS_INFO("[ENABLE CONTROLLER LOAD YAML GUI BAR] Enable Demo Controller");
ROS_INFO("[ENABLE CONTROLLER LOAD YAML GUI BAR] Enable Picker Controller");
#endif
}
......@@ -132,7 +132,7 @@ void EnableControllerLoadYamlBar::on_load_yaml_safe_button_clicked()
#endif
}
void EnableControllerLoadYamlBar::on_load_yaml_demo_button_clicked()
void EnableControllerLoadYamlBar::on_load_yaml_picker_button_clicked()
{
#ifdef CATKIN_MAKE
// Create a local variable for the message
......@@ -140,11 +140,11 @@ void EnableControllerLoadYamlBar::on_load_yaml_demo_button_clicked()
// Set for whom this applies to
fillStringMessageHeader(yaml_filename_msg);
// Specify the data
yaml_filename_msg.data = "DemoController";
yaml_filename_msg.data = "PickerController";
// Send the message
m_requestLoadYamlFilenamePublisher.publish(yaml_filename_msg);
// Inform the user that the menu item was selected
ROS_INFO("[ENABLE CONTROLLER LOAD YAML GUI BAR] Load Demo Controller YAML was clicked.");
ROS_INFO("[ENABLE CONTROLLER LOAD YAML GUI BAR] Load Picker Controller YAML was clicked.");
#endif
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment