diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-21 12:01:58 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-21 12:01:58 +0200 |
commit | ea0fe4748db634d4f45805c677572db6c3b09f79 (patch) | |
tree | 6fa3b55843625de5acc5193747e79d42b0715007 /tracker-rs | |
parent | 397aabbef822f7438a55600829cd4d5604a31ebf (diff) |
tracker/realsense: downgrade to r2
Issue: #1317
Installation instructions in the UI based on post by @JayMonkey
<https://github.com/opentrack/opentrack/issues/1317#issuecomment-908408101>.
Diffstat (limited to 'tracker-rs')
-rw-r--r-- | tracker-rs/ftnoir_tracker_rs.cpp | 23 | ||||
-rw-r--r-- | tracker-rs/ftnoir_tracker_rs.h | 3 | ||||
-rw-r--r-- | tracker-rs/ftnoir_tracker_rs_controls.cpp | 6 | ||||
-rw-r--r-- | tracker-rs/ftnoir_tracker_rs_controls.h | 3 | ||||
-rw-r--r-- | tracker-rs/ftnoir_tracker_rs_controls.ui | 42 | ||||
-rw-r--r-- | tracker-rs/lang/nl_NL.ts | 34 | ||||
-rw-r--r-- | tracker-rs/lang/ru_RU.ts | 34 | ||||
-rw-r--r-- | tracker-rs/lang/stub.ts | 34 | ||||
-rw-r--r-- | tracker-rs/lang/zh_CN.ts | 34 | ||||
-rw-r--r-- | tracker-rs/rs_impl/ftnoir_tracker_rs_impl.cpp | 15 |
10 files changed, 136 insertions, 92 deletions
diff --git a/tracker-rs/ftnoir_tracker_rs.cpp b/tracker-rs/ftnoir_tracker_rs.cpp index 0f458725..f48f58d1 100644 --- a/tracker-rs/ftnoir_tracker_rs.cpp +++ b/tracker-rs/ftnoir_tracker_rs.cpp @@ -84,27 +84,16 @@ void RSTracker::handleTrackingEnded(int exitCode){ showRealSenseErrorMessageBox(exitCode); } -bool RSTracker::startSdkInstallationProcess() -{ - bool pStarted = QDesktopServices::openUrl({"https://software.intel.com/en-us/realsense-sdk-windows-eol"}); - if(!pStarted){ - QMessageBox::warning(nullptr, - tr("Intel® RealSense™ Runtime Installation"), - tr("Installation process failed to start."), - QMessageBox::Ok); - } - return pStarted; -} - void RSTracker::showRealSenseErrorMessageBox(int exitCode) { QMessageBox msgBox; msgBox.setIcon(QMessageBox::Critical); msgBox.setText("RealSense Tracking Error"); - switch(exitCode){ + switch(exitCode) + { case -101: //The implementation got an invalid handle from the RealSense SDK session/modules - msgBox.setInformativeText(tr("Couldn't initialize RealSense tracking. Please make sure SDK Runtime 2016 R3 is installed.")); + msgBox.setInformativeText(tr("Couldn't initialize RealSense tracking. Open the tracker settings dialog for links to the camera driver and the SDK.")); break; case -301: //RealSense SDK runtime execution aborted. msgBox.setInformativeText(tr("Tracking stopped after the RealSense SDK Runtime execution has aborted.")); @@ -113,15 +102,11 @@ void RSTracker::showRealSenseErrorMessageBox(int exitCode) msgBox.setInformativeText(tr("Tracking stopped after another program changed camera streams configuration.")); break; default: - msgBox.setInformativeText("Status code: " + QString::number(exitCode) + ".\n\nNote that you need the latest camera drivers and the SDK runtime 2016 R3 to be installed."); + msgBox.setInformativeText("Status code: " + QString::number(exitCode) + ".\n\nNote that you need the latest camera drivers and the SDK runtime 2016 R2 to be installed."); } - QPushButton* triggerSdkInstallation = msgBox.addButton(tr("Install SDK 2016 R3 Runtime"), QMessageBox::ActionRole); msgBox.addButton(QMessageBox::Ok); msgBox.exec(); - - if(msgBox.clickedButton() == triggerSdkInstallation) - startSdkInstallationProcess(); } void RSTracker::data(double *data) diff --git a/tracker-rs/ftnoir_tracker_rs.h b/tracker-rs/ftnoir_tracker_rs.h index f322d0f6..8c540ff8 100644 --- a/tracker-rs/ftnoir_tracker_rs.h +++ b/tracker-rs/ftnoir_tracker_rs.h @@ -24,9 +24,6 @@ public: module_status start_tracker(QFrame *) override; void data(double *data) override; -public slots: - static bool startSdkInstallationProcess(); - protected: void configurePreviewFrame(); diff --git a/tracker-rs/ftnoir_tracker_rs_controls.cpp b/tracker-rs/ftnoir_tracker_rs_controls.cpp index a5018957..230fd9a4 100644 --- a/tracker-rs/ftnoir_tracker_rs_controls.cpp +++ b/tracker-rs/ftnoir_tracker_rs_controls.cpp @@ -14,11 +14,9 @@ RSdialog_realsense::RSdialog_realsense() connect(ui.buttonBox, &QDialogButtonBox::rejected, this, &QDialog::close); } -void RSdialog_realsense::doInstallRSRuntime() +void RSdialog_realsense::set_buttons_visible(bool x) { - bool pStarted = RSTracker::startSdkInstallationProcess(); - if(pStarted) - close(); + ui.buttonBox->setVisible(x); } void RSdialog_realsense::doOK() diff --git a/tracker-rs/ftnoir_tracker_rs_controls.h b/tracker-rs/ftnoir_tracker_rs_controls.h index eeb6ac29..b613518d 100644 --- a/tracker-rs/ftnoir_tracker_rs_controls.h +++ b/tracker-rs/ftnoir_tracker_rs_controls.h @@ -16,10 +16,11 @@ public: RSdialog_realsense(); void register_tracker(ITracker *) {} void unregister_tracker() {} + bool embeddable() noexcept override { return true; } + void set_buttons_visible(bool x) override; private: Ui::UIRSControls ui; private slots: void doOK(); void doCancel(); - void doInstallRSRuntime(); }; diff --git a/tracker-rs/ftnoir_tracker_rs_controls.ui b/tracker-rs/ftnoir_tracker_rs_controls.ui index af25f74d..7dce262f 100644 --- a/tracker-rs/ftnoir_tracker_rs_controls.ui +++ b/tracker-rs/ftnoir_tracker_rs_controls.ui @@ -6,10 +6,16 @@ <rect> <x>0</x> <y>0</y> - <width>339</width> - <height>155</height> + <width>596</width> + <height>182</height> </rect> </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <property name="minimumSize"> <size> <width>339</width> @@ -29,8 +35,32 @@ <layout class="QVBoxLayout" name="verticalLayout"> <item alignment="Qt::AlignTop"> <widget class="QLabel" name="label"> + <property name="minimumSize"> + <size> + <width>578</width> + <height>0</height> + </size> + </property> <property name="text"> - <string><html><head/><body><p>In order to use this tracker, you need a PC equipped with an Intel® RealSense™ F200 or SR300 camera and the RealSense™ <a href="https://software.intel.com/en-us/realsense-sdk-windows-eol"><span style=" text-decoration: underline; color:#0000ff;">SDK 2016 R3 runtime</span></a>.</p><p>Scroll down to the bottom of the page, choosing <span style=" font-weight:600;">2016 R3 Full SDK</span> on the right-hand side. Unfortunately it's necessary to create an account prior to downloading.</p></body></html></string> + <string><html><head/><body> +In order to use this tracker, you need: + +<ul> +<li> + A PC equipped with an Intel® RealSense™ F200 or SR300 camera +</li> +<li> + Depth Camera Manager <a href="https://www.intel.com/content/www/us/en/download/18309/intel-realsense-depth-camera-manager.html"><span>driver</span></a> + <blockquote> + To avoid problems with the DCM installer updating the camera's firmware it is recomended to run the DCM installer from the command line with the following flags:<br/> + <span style=" font-weight: bold; font-family:monospace, 'Courier New';">--ignore-fw-update --silent --no-progress --acceptlicense=yes</span> + </blockquote> +</li> +<li> + RealSense™ <a href="http://registrationcenter-download.intel.com/akdlm/irc_nas/vcp/9078/intel_rs_sdk_offline_package_10.0.26.0396.exe"><span>SDK 2016 R2 runtime</span></a> +</li> +</ul> +</body></html></string> </property> <property name="wordWrap"> <bool>true</bool> @@ -42,6 +72,12 @@ </item> <item> <widget class="QDialogButtonBox" name="buttonBox"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <property name="standardButtons"> <set>QDialogButtonBox::Ok</set> </property> diff --git a/tracker-rs/lang/nl_NL.ts b/tracker-rs/lang/nl_NL.ts index a4c28187..f129ea58 100644 --- a/tracker-rs/lang/nl_NL.ts +++ b/tracker-rs/lang/nl_NL.ts @@ -4,15 +4,7 @@ <context> <name>RSTracker</name> <message> - <source>Intel® RealSense™ Runtime Installation</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Installation process failed to start.</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Couldn't initialize RealSense tracking. Please make sure SDK Runtime 2016 R3 is installed.</source> + <source>Couldn't initialize RealSense tracking. Open the tracker settings dialog for links to the camera driver and the SDK.</source> <translation type="unfinished"></translation> </message> <message> @@ -23,10 +15,6 @@ <source>Tracking stopped after another program changed camera streams configuration.</source> <translation type="unfinished"></translation> </message> - <message> - <source>Install SDK 2016 R3 Runtime</source> - <translation type="unfinished"></translation> - </message> </context> <context> <name>RSTrackerMetaData</name> @@ -42,7 +30,25 @@ <translation type="unfinished"></translation> </message> <message> - <source><html><head/><body><p>In order to use this tracker, you need a PC equipped with an Intel® RealSense™ F200 or SR300 camera and the RealSense™ <a href="https://software.intel.com/en-us/realsense-sdk-windows-eol"><span style=" text-decoration: underline; color:#0000ff;">SDK 2016 R3 runtime</span></a>.</p><p>Scroll down to the bottom of the page, choosing <span style=" font-weight:600;">2016 R3 Full SDK</span> on the right-hand side. Unfortunately it's necessary to create an account prior to downloading.</p></body></html></source> + <source><html><head/><body> +In order to use this tracker, you need: + +<ul> +<li> + A PC equipped with an Intel® RealSense™ F200 or SR300 camera +</li> +<li> + Depth Camera Manager <a href="https://www.intel.com/content/www/us/en/download/18309/intel-realsense-depth-camera-manager.html"><span>driver</span></a> + <blockquote> + To avoid problems with the DCM installer updating the camera's firmware it is recomended to run the DCM installer from the command line with the following flags:<br/> + <span style=" font-weight: bold; font-family:monospace, 'Courier New';">--ignore-fw-update --silent --no-progress --acceptlicense=yes</span> + </blockquote> +</li> +<li> + RealSense™ <a href="http://registrationcenter-download.intel.com/akdlm/irc_nas/vcp/9078/intel_rs_sdk_offline_package_10.0.26.0396.exe"><span>SDK 2016 R2 runtime</span></a> +</li> +</ul> +</body></html></source> <translation type="unfinished"></translation> </message> </context> diff --git a/tracker-rs/lang/ru_RU.ts b/tracker-rs/lang/ru_RU.ts index 592c72a3..4836eb8f 100644 --- a/tracker-rs/lang/ru_RU.ts +++ b/tracker-rs/lang/ru_RU.ts @@ -4,15 +4,7 @@ <context> <name>RSTracker</name> <message> - <source>Intel® RealSense™ Runtime Installation</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Installation process failed to start.</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Couldn't initialize RealSense tracking. Please make sure SDK Runtime 2016 R3 is installed.</source> + <source>Couldn't initialize RealSense tracking. Open the tracker settings dialog for links to the camera driver and the SDK.</source> <translation type="unfinished"></translation> </message> <message> @@ -23,10 +15,6 @@ <source>Tracking stopped after another program changed camera streams configuration.</source> <translation type="unfinished"></translation> </message> - <message> - <source>Install SDK 2016 R3 Runtime</source> - <translation type="unfinished"></translation> - </message> </context> <context> <name>RSTrackerMetaData</name> @@ -42,7 +30,25 @@ <translation type="unfinished"></translation> </message> <message> - <source><html><head/><body><p>In order to use this tracker, you need a PC equipped with an Intel® RealSense™ F200 or SR300 camera and the RealSense™ <a href="https://software.intel.com/en-us/realsense-sdk-windows-eol"><span style=" text-decoration: underline; color:#0000ff;">SDK 2016 R3 runtime</span></a>.</p><p>Scroll down to the bottom of the page, choosing <span style=" font-weight:600;">2016 R3 Full SDK</span> on the right-hand side. Unfortunately it's necessary to create an account prior to downloading.</p></body></html></source> + <source><html><head/><body> +In order to use this tracker, you need: + +<ul> +<li> + A PC equipped with an Intel® RealSense™ F200 or SR300 camera +</li> +<li> + Depth Camera Manager <a href="https://www.intel.com/content/www/us/en/download/18309/intel-realsense-depth-camera-manager.html"><span>driver</span></a> + <blockquote> + To avoid problems with the DCM installer updating the camera's firmware it is recomended to run the DCM installer from the command line with the following flags:<br/> + <span style=" font-weight: bold; font-family:monospace, 'Courier New';">--ignore-fw-update --silent --no-progress --acceptlicense=yes</span> + </blockquote> +</li> +<li> + RealSense™ <a href="http://registrationcenter-download.intel.com/akdlm/irc_nas/vcp/9078/intel_rs_sdk_offline_package_10.0.26.0396.exe"><span>SDK 2016 R2 runtime</span></a> +</li> +</ul> +</body></html></source> <translation type="unfinished"></translation> </message> </context> diff --git a/tracker-rs/lang/stub.ts b/tracker-rs/lang/stub.ts index fe0faa6a..8ac8297f 100644 --- a/tracker-rs/lang/stub.ts +++ b/tracker-rs/lang/stub.ts @@ -4,15 +4,7 @@ <context> <name>RSTracker</name> <message> - <source>Intel® RealSense™ Runtime Installation</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Installation process failed to start.</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Couldn't initialize RealSense tracking. Please make sure SDK Runtime 2016 R3 is installed.</source> + <source>Couldn't initialize RealSense tracking. Open the tracker settings dialog for links to the camera driver and the SDK.</source> <translation type="unfinished"></translation> </message> <message> @@ -23,10 +15,6 @@ <source>Tracking stopped after another program changed camera streams configuration.</source> <translation type="unfinished"></translation> </message> - <message> - <source>Install SDK 2016 R3 Runtime</source> - <translation type="unfinished"></translation> - </message> </context> <context> <name>RSTrackerMetaData</name> @@ -42,7 +30,25 @@ <translation type="unfinished"></translation> </message> <message> - <source><html><head/><body><p>In order to use this tracker, you need a PC equipped with an Intel® RealSense™ F200 or SR300 camera and the RealSense™ <a href="https://software.intel.com/en-us/realsense-sdk-windows-eol"><span style=" text-decoration: underline; color:#0000ff;">SDK 2016 R3 runtime</span></a>.</p><p>Scroll down to the bottom of the page, choosing <span style=" font-weight:600;">2016 R3 Full SDK</span> on the right-hand side. Unfortunately it's necessary to create an account prior to downloading.</p></body></html></source> + <source><html><head/><body> +In order to use this tracker, you need: + +<ul> +<li> + A PC equipped with an Intel® RealSense™ F200 or SR300 camera +</li> +<li> + Depth Camera Manager <a href="https://www.intel.com/content/www/us/en/download/18309/intel-realsense-depth-camera-manager.html"><span>driver</span></a> + <blockquote> + To avoid problems with the DCM installer updating the camera's firmware it is recomended to run the DCM installer from the command line with the following flags:<br/> + <span style=" font-weight: bold; font-family:monospace, 'Courier New';">--ignore-fw-update --silent --no-progress --acceptlicense=yes</span> + </blockquote> +</li> +<li> + RealSense™ <a href="http://registrationcenter-download.intel.com/akdlm/irc_nas/vcp/9078/intel_rs_sdk_offline_package_10.0.26.0396.exe"><span>SDK 2016 R2 runtime</span></a> +</li> +</ul> +</body></html></source> <translation type="unfinished"></translation> </message> </context> diff --git a/tracker-rs/lang/zh_CN.ts b/tracker-rs/lang/zh_CN.ts index d843896e..dc9b34b5 100644 --- a/tracker-rs/lang/zh_CN.ts +++ b/tracker-rs/lang/zh_CN.ts @@ -4,15 +4,7 @@ <context> <name>RSTracker</name> <message> - <source>Intel® RealSense™ Runtime Installation</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Installation process failed to start.</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Couldn't initialize RealSense tracking. Please make sure SDK Runtime 2016 R3 is installed.</source> + <source>Couldn't initialize RealSense tracking. Open the tracker settings dialog for links to the camera driver and the SDK.</source> <translation type="unfinished"></translation> </message> <message> @@ -23,10 +15,6 @@ <source>Tracking stopped after another program changed camera streams configuration.</source> <translation type="unfinished"></translation> </message> - <message> - <source>Install SDK 2016 R3 Runtime</source> - <translation type="unfinished"></translation> - </message> </context> <context> <name>RSTrackerMetaData</name> @@ -42,7 +30,25 @@ <translation type="unfinished"></translation> </message> <message> - <source><html><head/><body><p>In order to use this tracker, you need a PC equipped with an Intel® RealSense™ F200 or SR300 camera and the RealSense™ <a href="https://software.intel.com/en-us/realsense-sdk-windows-eol"><span style=" text-decoration: underline; color:#0000ff;">SDK 2016 R3 runtime</span></a>.</p><p>Scroll down to the bottom of the page, choosing <span style=" font-weight:600;">2016 R3 Full SDK</span> on the right-hand side. Unfortunately it's necessary to create an account prior to downloading.</p></body></html></source> + <source><html><head/><body> +In order to use this tracker, you need: + +<ul> +<li> + A PC equipped with an Intel® RealSense™ F200 or SR300 camera +</li> +<li> + Depth Camera Manager <a href="https://www.intel.com/content/www/us/en/download/18309/intel-realsense-depth-camera-manager.html"><span>driver</span></a> + <blockquote> + To avoid problems with the DCM installer updating the camera's firmware it is recomended to run the DCM installer from the command line with the following flags:<br/> + <span style=" font-weight: bold; font-family:monospace, 'Courier New';">--ignore-fw-update --silent --no-progress --acceptlicense=yes</span> + </blockquote> +</li> +<li> + RealSense™ <a href="http://registrationcenter-download.intel.com/akdlm/irc_nas/vcp/9078/intel_rs_sdk_offline_package_10.0.26.0396.exe"><span>SDK 2016 R2 runtime</span></a> +</li> +</ul> +</body></html></source> <translation type="unfinished"></translation> </message> </context> diff --git a/tracker-rs/rs_impl/ftnoir_tracker_rs_impl.cpp b/tracker-rs/rs_impl/ftnoir_tracker_rs_impl.cpp index eb97380c..f54531a6 100644 --- a/tracker-rs/rs_impl/ftnoir_tracker_rs_impl.cpp +++ b/tracker-rs/rs_impl/ftnoir_tracker_rs_impl.cpp @@ -9,18 +9,21 @@ #ifdef _WIN32 # include <windows.h> #endif +#include <cstdlib> #include <pxcsensemanager.h> +#if 0 #include <RealSense/Face/FaceModule.h> #include <RealSense/Face/FaceConfiguration.h> - -#include <cstdlib> - -const size_t kPreviewStreamWidth = 640; -const size_t kPreviewStreamHeight = 480; - using PXCFaceData = Intel::RealSense::Face::FaceData; using PXCFaceConfiguration = Intel::RealSense::Face::FaceConfiguration; +#else +#include <pxcfacemodule.h> +#include <pxcfaceconfiguration.h> +#endif + +constexpr size_t kPreviewStreamWidth = 640; +constexpr size_t kPreviewStreamHeight = 480; PXCSenseManager* g_senseManager = NULL; PXCFaceData* g_faceData = NULL; |