Commit fde16c01 authored by tiagos's avatar tiagos
Browse files

Added offset logic

parent 5a641c5f
...@@ -137,6 +137,8 @@ private slots: ...@@ -137,6 +137,8 @@ private slots:
void on_reloadAnchors_button_pressed(); void on_reloadAnchors_button_pressed();
void on_set_offset_button_pressed();
#ifdef CATKIN_MAKE #ifdef CATKIN_MAKE
void updateNewViconData(const ptrToMessage& p_msg); void updateNewViconData(const ptrToMessage& p_msg);
......
...@@ -998,6 +998,10 @@ bool MainGUIWindow::updateUWBSettings(bool enableChecked) ...@@ -998,6 +998,10 @@ bool MainGUIWindow::updateUWBSettings(bool enableChecked)
// Receive the updated information // Receive the updated information
Anchors a; Anchors a;
a.request.x = 1;
a.request.y = 2;
a.request.z = 3;
if(UWBServiceClient.call(a)) if(UWBServiceClient.call(a))
{ {
if(!a.response.calSuccess) if(!a.response.calSuccess)
...@@ -1111,6 +1115,11 @@ void MainGUIWindow::on_calibrateAnchors_button_pressed() ...@@ -1111,6 +1115,11 @@ void MainGUIWindow::on_calibrateAnchors_button_pressed()
ui->reloadAnchors_button->setEnabled(true); ui->reloadAnchors_button->setEnabled(true);
} }
void MainGUIWindow::on_set_offset_button_pressed()
{
ROS_WARN("Calib done");
}
void MainGUIWindow::on_comboBoxCFs_currentTextChanged(const QString &arg1) void MainGUIWindow::on_comboBoxCFs_currentTextChanged(const QString &arg1)
{ {
std::string key = arg1.toStdString(); std::string key = arg1.toStdString();
......
...@@ -519,7 +519,91 @@ ...@@ -519,7 +519,91 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="3" column="1">
<layout class="QGridLayout">
<item row="1" column="1">
<widget class="QLabel">
<property name="text">
<string>x-offset:</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QDoubleSpinBox" name="uwbxoffset">
<property name="decimals">
<number>3</number>
</property>
<property name="minimum">
<number>-20</number>
</property>
<property name="maximum">
<number>20</number>
</property>
<property name="singleStep">
<double>0.001</double>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel">
<property name="text">
<string>y-offset:</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QDoubleSpinBox" name="uwbyoffset">
<property name="decimals">
<number>3</number>
</property>
<property name="minimum">
<number>-20</number>
</property>
<property name="maximum">
<number>20</number>
</property>
<property name="singleStep">
<double>0.001</double>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel">
<property name="text">
<string>z-offset:</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QDoubleSpinBox" name="uwbzoffset">
<property name="decimals">
<number>3</number>
</property>
<property name="minimum">
<number>-20</number>
</property>
<property name="maximum">
<number>20</number>
</property>
<property name="singleStep">
<double>0.001</double>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="7">
<widget class="QPushButton" name="set_offset_button">
<property name="text">
<string>Set Offset</string>
</property>
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="checkBox_enable_UWB"> <widget class="QCheckBox" name="checkBox_enable_UWB">
<property name="text"> <property name="text">
<string>Enable UWB Positioning</string> <string>Enable UWB Positioning</string>
...@@ -532,7 +616,10 @@ ...@@ -532,7 +616,10 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="10" column="1">
<item row="12" column="1">
<widget class="QLabel" name="label_anchors123"> <widget class="QLabel" name="label_anchors123">
<property name="text"> <property name="text">
<string></string> <string></string>
......
...@@ -96,6 +96,8 @@ void d_fall_pps::readYaml() ...@@ -96,6 +96,8 @@ void d_fall_pps::readYaml()
bool d_fall_pps::getAnchorPositions(Anchors::Request& request, Anchors::Response& response) bool d_fall_pps::getAnchorPositions(Anchors::Request& request, Anchors::Response& response)
{ {
ROS_WARN("x %f, y %f, z %f", request.x, request.y, request.z);
response.enableUWB = enableUWB; response.enableUWB = enableUWB;
response.anchorArray = anchors; response.anchorArray = anchors;
response.calSuccess = calSuccess; response.calSuccess = calSuccess;
......
Float32 x float32 x
Float32 y float32 y
Float32 z float32 z
--- ---
bool enableUWB bool enableUWB
bool calSuccess bool calSuccess
......
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