diff options
Diffstat (limited to 'ftnoir_tracker_aruco')
-rw-r--r-- | ftnoir_tracker_aruco/aruco-trackercontrols.ui | 449 | ||||
-rw-r--r-- | ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp | 24 | ||||
-rw-r--r-- | ftnoir_tracker_aruco/ftnoir_tracker_aruco.h | 7 |
3 files changed, 190 insertions, 290 deletions
diff --git a/ftnoir_tracker_aruco/aruco-trackercontrols.ui b/ftnoir_tracker_aruco/aruco-trackercontrols.ui index be237e3c..e5654bd5 100644 --- a/ftnoir_tracker_aruco/aruco-trackercontrols.ui +++ b/ftnoir_tracker_aruco/aruco-trackercontrols.ui @@ -10,7 +10,7 @@ <x>0</x> <y>0</y> <width>636</width> - <height>346</height> + <height>368</height> </rect> </property> <property name="sizePolicy"> @@ -19,243 +19,239 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> - <size> - <width>6666</width> - <height>6666</height> - </size> - </property> <property name="windowTitle"> - <string>HT tracker settings</string> + <string>Tracker settings</string> </property> - <layout class="QGridLayout" name="gridLayout"> - <property name="spacing"> - <number>7</number> - </property> - <item row="9" column="1" rowspan="3"> - <widget class="QGroupBox" name="groupBox_2"> + <layout class="QGridLayout" name="gridLayout_3"> + <item row="0" column="0" rowspan="2" colspan="2"> + <widget class="QGroupBox" name="groupBox"> <property name="title"> - <string>Head position</string> + <string/> </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> + <property name="flat"> + <bool>true</bool> </property> - <layout class="QGridLayout" name="gridLayout_2"> - <item row="2" column="0"> - <widget class="QLabel" name="label_7"> - <property name="text"> - <string>TY</string> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QLabel" name="label_5"> + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="0"> + <widget class="QLabel" name="label"> <property name="text"> - <string>TX</string> + <string>Horizontal FOV</string> </property> </widget> </item> - <item row="1" column="1"> - <widget class="QDoubleSpinBox" name="cx"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> + <item row="0" column="1"> + <widget class="QDoubleSpinBox" name="cameraFOV"> + <property name="locale"> + <locale language="English" country="UnitedStates"/> </property> <property name="minimum"> - <double>-10000.000000000000000</double> + <double>35.000000000000000</double> </property> <property name="maximum"> - <double>10000.000000000000000</double> + <double>180.000000000000000</double> + </property> + <property name="value"> + <double>52.000000000000000</double> </property> </widget> </item> - <item row="3" column="0"> - <widget class="QLabel" name="label_8"> + <item row="1" column="0"> + <widget class="QLabel" name="label_2"> <property name="text"> - <string>TZ</string> + <string>Frames per second</string> </property> </widget> </item> - <item row="3" column="1"> - <widget class="QDoubleSpinBox" name="cz"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimum"> - <double>-10000.000000000000000</double> - </property> - <property name="maximum"> - <double>10000.000000000000000</double> - </property> + <item row="1" column="1"> + <widget class="QComboBox" name="cameraFPS"> + <item> + <property name="text"> + <string notr="true">Default</string> + </property> + </item> + <item> + <property name="text"> + <string>30</string> + </property> + </item> + <item> + <property name="text"> + <string>60</string> + </property> + </item> + <item> + <property name="text"> + <string>120</string> + </property> + </item> + <item> + <property name="text"> + <string>180</string> + </property> + </item> </widget> </item> - <item row="2" column="1"> - <widget class="QDoubleSpinBox" name="cy"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimum"> - <double>-10000.000000000000000</double> - </property> - <property name="maximum"> - <double>10000.000000000000000</double> + <item row="2" column="0"> + <widget class="QLabel" name="label_3"> + <property name="text"> + <string>Camera name</string> </property> </widget> </item> - <item row="4" column="1"> - <widget class="QPushButton" name="btn_calibrate"> + <item row="2" column="1"> + <widget class="QComboBox" name="cameraName"/> + </item> + <item row="3" column="0"> + <widget class="QLabel" name="label_4"> <property name="text"> - <string>Calibrate</string> + <string>Resolution</string> </property> </widget> </item> - </layout> - </widget> - </item> - <item row="0" column="3" rowspan="3" colspan="2"> - <widget class="QGroupBox" name="groupBox"> - <property name="title"> - <string>Enable axes</string> - </property> - <layout class="QFormLayout" name="formLayout"> - <property name="horizontalSpacing"> - <number>7</number> - </property> - <property name="leftMargin"> - <number>6</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>6</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item row="0" column="0"> - <widget class="QCheckBox" name="rx"> - <property name="text"> - <string>RX</string> - </property> + <item row="3" column="1"> + <widget class="QComboBox" name="resolution"> + <item> + <property name="text"> + <string>640x480</string> + </property> + </item> + <item> + <property name="text"> + <string>320x240</string> + </property> + </item> + <item> + <property name="text"> + <string>320x200</string> + </property> + </item> + <item> + <property name="text"> + <string>Default (not recommended!)</string> + </property> + </item> </widget> </item> - <item row="0" column="1"> - <widget class="QCheckBox" name="tx"> + <item row="4" column="0"> + <widget class="QLabel" name="label_10"> <property name="text"> - <string>TX</string> + <string>Red channel only</string> </property> </widget> </item> - <item row="1" column="0"> - <widget class="QCheckBox" name="ry"> + <item row="4" column="1"> + <widget class="QCheckBox" name="red_only"> <property name="text"> - <string>RY</string> + <string>Mileage may vary</string> </property> </widget> </item> - <item row="1" column="1"> - <widget class="QCheckBox" name="ty"> + <item row="5" column="0"> + <widget class="QLabel" name="label_9"> <property name="text"> - <string>TY</string> + <string>Marker pitch</string> </property> </widget> </item> - <item row="2" column="0"> - <widget class="QCheckBox" name="rz"> - <property name="text"> - <string>RZ</string> + <item row="5" column="1"> + <widget class="QDoubleSpinBox" name="marker_pitch"> + <property name="minimum"> + <double>-180.000000000000000</double> + </property> + <property name="maximum"> + <double>180.000000000000000</double> </property> </widget> </item> - <item row="2" column="1"> - <widget class="QCheckBox" name="tz"> - <property name="text"> - <string>TZ</string> + <item row="6" column="1"> + <widget class="QGroupBox" name="groupBox_2"> + <property name="title"> + <string>Head center</string> </property> + <layout class="QGridLayout" name="gridLayout_2"> + <item row="4" column="1"> + <widget class="QPushButton" name="btn_calibrate"> + <property name="text"> + <string>Calibrate</string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_5"> + <property name="text"> + <string>TX</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QDoubleSpinBox" name="cy"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimum"> + <double>-10000.000000000000000</double> + </property> + <property name="maximum"> + <double>10000.000000000000000</double> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QDoubleSpinBox" name="cx"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimum"> + <double>-10000.000000000000000</double> + </property> + <property name="maximum"> + <double>10000.000000000000000</double> + </property> + </widget> + </item> + <item row="3" column="1"> + <widget class="QDoubleSpinBox" name="cz"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimum"> + <double>-10000.000000000000000</double> + </property> + <property name="maximum"> + <double>10000.000000000000000</double> + </property> + </widget> + </item> + <item row="3" column="0"> + <widget class="QLabel" name="label_8"> + <property name="text"> + <string>TZ</string> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_7"> + <property name="text"> + <string>TY</string> + </property> + </widget> + </item> + </layout> </widget> </item> </layout> </widget> </item> - <item row="1" column="0"> - <widget class="QLabel" name="label_2"> - <property name="text"> - <string>Frames per second</string> - </property> - </widget> - </item> - <item row="2" column="1" colspan="2"> - <widget class="QComboBox" name="cameraName"/> - </item> - <item row="1" column="1" colspan="2"> - <widget class="QComboBox" name="cameraFPS"> - <item> - <property name="text"> - <string notr="true">Default</string> - </property> - </item> - <item> - <property name="text"> - <string>30</string> - </property> - </item> - <item> - <property name="text"> - <string>60</string> - </property> - </item> - <item> - <property name="text"> - <string>120</string> - </property> - </item> - <item> - <property name="text"> - <string>180</string> - </property> - </item> - </widget> - </item> - <item row="7" column="1"> - <widget class="QCheckBox" name="red_only"> - <property name="text"> - <string>Recommended!</string> - </property> - </widget> - </item> - <item row="2" column="0"> - <widget class="QLabel" name="label_3"> - <property name="text"> - <string>Camera name</string> - </property> - </widget> - </item> - <item row="0" column="1" colspan="2"> - <widget class="QDoubleSpinBox" name="cameraFOV"> - <property name="locale"> - <locale language="English" country="UnitedStates"/> - </property> - <property name="minimum"> - <double>35.000000000000000</double> - </property> - <property name="maximum"> - <double>180.000000000000000</double> - </property> - <property name="value"> - <double>52.000000000000000</double> - </property> - </widget> - </item> - <item row="6" column="2" rowspan="5" colspan="3"> + <item row="0" column="2"> <widget class="QLabel" name="label_6"> <property name="sizePolicy"> <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> @@ -270,7 +266,7 @@ <enum>Qt::RichText</enum> </property> <property name="alignment"> - <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> </property> <property name="wordWrap"> <bool>true</bool> @@ -286,93 +282,16 @@ </property> </widget> </item> - <item row="7" column="0"> - <widget class="QLabel" name="label_10"> - <property name="text"> - <string>Red channel only</string> - </property> - </widget> - </item> - <item row="6" column="1"> - <widget class="QComboBox" name="resolution"> - <item> - <property name="text"> - <string>640x480</string> - </property> - </item> - <item> - <property name="text"> - <string>320x240</string> - </property> - </item> - <item> - <property name="text"> - <string>320x200</string> - </property> - </item> - <item> - <property name="text"> - <string>Default (not recommended!)</string> - </property> - </item> - </widget> - </item> - <item row="0" column="0"> - <widget class="QLabel" name="label"> - <property name="text"> - <string>Horizontal FOV</string> - </property> - </widget> - </item> - <item row="11" column="4"> + <item row="1" column="2"> <widget class="QDialogButtonBox" name="buttonBox"> <property name="standardButtons"> <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> </property> </widget> </item> - <item row="8" column="1"> - <widget class="QDoubleSpinBox" name="marker_pitch"> - <property name="minimum"> - <double>-180.000000000000000</double> - </property> - <property name="maximum"> - <double>180.000000000000000</double> - </property> - </widget> - </item> - <item row="6" column="0"> - <widget class="QLabel" name="label_4"> - <property name="text"> - <string>Resolution</string> - </property> - </widget> - </item> - <item row="8" column="0"> - <widget class="QLabel" name="label_9"> - <property name="text"> - <string>Marker pitch</string> - </property> - </widget> - </item> </layout> </widget> <tabstops> - <tabstop>cameraFOV</tabstop> - <tabstop>cameraFPS</tabstop> - <tabstop>cameraName</tabstop> - <tabstop>resolution</tabstop> - <tabstop>red_only</tabstop> - <tabstop>marker_pitch</tabstop> - <tabstop>cx</tabstop> - <tabstop>cy</tabstop> - <tabstop>cz</tabstop> - <tabstop>rx</tabstop> - <tabstop>ry</tabstop> - <tabstop>rz</tabstop> - <tabstop>tx</tabstop> - <tabstop>ty</tabstop> - <tabstop>tz</tabstop> <tabstop>buttonBox</tabstop> </tabstops> <resources/> diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp index b70bef09..f469c7a4 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp @@ -380,18 +380,12 @@ void Tracker::GetHeadPoseData(double *data) { QMutexLocker lck(&mtx); - if (s.eyaw) - data[Yaw] = pose[Yaw]; - if (s.epitch) - data[Pitch] = pose[Pitch]; - if (s.eroll) - data[Roll] = pose[Roll]; - if (s.ex) - data[TX] = pose[TX] * .1; - if (s.ey) - data[TY] = pose[TY] * .1; - if (s.ez) - data[TZ] = pose[TZ] * .1; + data[Yaw] = pose[Yaw]; + data[Pitch] = pose[Pitch]; + data[Roll] = pose[Roll]; + data[TX] = pose[TX] * .1; + data[TY] = pose[TY] * .1; + data[TZ] = pose[TZ] * .1; } class TrackerDll : public Metadata @@ -456,12 +450,6 @@ TrackerControls::TrackerControls() tie_setting(s.resolution, ui.resolution); tie_setting(s.force_fps, ui.cameraFPS); tie_setting(s.fov, ui.cameraFOV); - tie_setting(s.eyaw, ui.rx); - tie_setting(s.epitch, ui.ry); - tie_setting(s.eroll, ui.rz); - tie_setting(s.ex, ui.tx); - tie_setting(s.ey, ui.ty); - tie_setting(s.ez, ui.tz); tie_setting(s.headpos_x, ui.cx); tie_setting(s.headpos_y, ui.cy); tie_setting(s.headpos_z, ui.cz); diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h index f2207aef..c431d27a 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h @@ -28,7 +28,6 @@ struct settings { value<double> fov, headpos_x, headpos_y, headpos_z; value<int> camera_index, force_fps, resolution; value<bool> red_only; - value<bool> eyaw, epitch, eroll, ex, ey, ez; value<double> marker_pitch; settings() : b(bundle("aruco-tracker")), @@ -40,12 +39,6 @@ struct settings { force_fps(b, "force-fps", 0), resolution(b, "force-resolution", 0), red_only(b, "red-only", false), - eyaw(b, "enable-y", true), - epitch(b, "enable-p", true), - eroll(b, "enable-r", true), - ex(b, "enable-x", true), - ey(b, "enable-y", true), - ez(b, "enable-z", true), marker_pitch(b, "marker-pitch", 0) {} }; |