Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera fails to connect #18

Closed
gradybooch opened this issue Jul 28, 2017 · 2 comments
Closed

Camera fails to connect #18

gradybooch opened this issue Jul 28, 2017 · 2 comments

Comments

@gradybooch
Copy link

Running Intu on a Mac; I recall this working in a previous release, but for some reason my camera is no longer connecting (and there are three cameras on this mac).
monitor

@takaomoriyama
Copy link
Contributor

Grady,

I have no problem in using Intu on my Mac running macOS Sierra (v10.12.5).
Can you show me the result of the command "grep -i camera SelfInstance.log" ?
In my case,

$ cd <self-build-dir>/bin/mac
$ grep -i camera SelfInstance.log
[07/31/17 17:00:53.951][STAT][SensorManager] Added sensor Camera, Id: 0531a074-4620-edf8-9224-04fc56987442
[07/31/17 17:00:53.951][STAT][SensorManager] Added sensor DepthCamera, Id: b1020d32-7225-4d04-4f22-3dd123bceaae
[07/31/17 17:00:54.731][STAT][OpenCVCamera] Camera has started
[07/31/17 17:00:57.803][STAT][TopicManager] Added remote subscriber to topic sensor-Camera
[07/31/17 17:00:57.965][STAT][TopicManager] Added remote subscriber to topic sensor-%7B%7B%20cameraName%20%7D%7D
[07/31/17 17:00:57.965][WARN][TopicManager] Topic sensor-%7B%7B%20cameraName%20%7D%7D not found.

I've also noticed that the behavoir of Intu dashboard depends on what web browser you are using.

Web browser Video Spectrum graph Conversation log
Safari OK OK OK
Firefox NG NG OK
Google Chrome OK OK NG

If you want to switch you web browser in run time, the following patch might be helpful.

diff --git a/platform/mac/services/MacBrowser.cpp b/platform/mac/services/MacBrowser.cpp
index 0736504..32c6172 100644
--- a/platform/mac/services/MacBrowser.cpp
+++ b/platform/mac/services/MacBrowser.cpp
@@ -52,6 +52,11 @@ bool MacBrowser::Stop()
 void MacBrowser::ShowURL(const Url::SP & a_spUrlAgent, UrlCallback a_Callback)
 {
     Log::Debug("MacBrowser", "Opening the following URL: %s", a_spUrlAgent->GetURL().c_str());
-    std::string command = "open " + a_spUrlAgent->GetURL();
+	std::string command;
+	const char *pBROWSER = getenv( "INTU_WEB_BROWSER" );
+	if ( pBROWSER != NULL )
+		command = StringUtil::Format( "open -a \"%s\" %s", pBROWSER, a_spUrlAgent->GetURL().c_str() );
+	else
+		command = "open " + a_spUrlAgent->GetURL();
     system(command.c_str());
 }

Then you can start Intu with specified web browser as follows,

$ INTU_WEB_BROWSER="Safari" ./run_self.sh
$ INTU_WEB_BROWSER="Firefox" ./run_self.sh
$ INTU_WEB_BROWSER="Google Chrome" ./run_self.sh

@gradybooch
Copy link
Author

woohoo! just brought in the latest commits, and my camera now displays!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants