AbelCam Forum
Download AbelCam buy Pro
 
 
 
Welcome Anonymous User
11/22/2024 - 10:09 PM
Quick Search:
Quick Jump:
 
Announcements
Latest Topics
 
Programatically Reading Abs Position??
By: MelvinG
Rank: Magna Cum Laude
Topics: 661
From: Los Angeles, USA
Added: 01/07/2006 - 08:26 AM

Grettings from a LogiSphere noob!

I see that the included Java applet "logiabs" has the ability to query the absolute pan/tilt position and use it to drive the rectangle display. However, since the included applets are compiled I can not see how it's done. Tongue

My question is this: Is there a "magic" http request I can send to the LogiSphere web server to get it to report back absolute position? Something similar to the "/javascript/pos-5,5" (for example) requests that move the camera, but in my case I want to *query" the position, not set it.

In case I have not explained this clearly, here is what I am trying to do:

LogiSphere will work as a "back-end" to an Apache server. The camera and LogiSphere server is in a different city than the Apache server. Every time a user loads a certain page on the Apache server, LogiSphere will serve up a still shot that becomes part of the page. From that page the user is able to pan/tilt the cam. I need to wait until the pan/tilt motion is finished before grabbing a new still shot and serving up the assembled page. So, I think I need to read actual position to compare it to requested position. Unless there is a way to ask LogiSphere to tell if the pan/tilt is stationary or in motion. (All the interfacing between LogiSphere is done with a Perl CGI script that I have more-or-less working).

- MG

By: sse
Rank: Forum Addict
Topics: 73
From: n/a
Added: 01/07/2006 - 01:25 PM

Hi Melvin

the query is http://localhost:8080/getpos

the answer is

pan=X
tilt=Y
busy|idle

hope this helps

Will you post your perl code here for others to use?

Stefan
By: MelvinG
Rank: Magna Cum Laude
Topics: 661
From: Los Angeles, USA
Added: 01/07/2006 - 01:42 PM

Stefan,

Thank You!!!

When I get my Perl code all worked out, debugged and cleaned up enough for it not to embarass me I will definitely post it here. Right now it functions OK but it is not even fit for "beta" just yet! Since this kind of coding is my hobby (not my "real" job) this may take a while to finish. But when it is good I will be happy to share it.

Also I will post a link to my web site when I get it a little nicer looking. Web server is interfaced to some light dimmers (through Perl interface to OPC server and a PLC), dimmers are hooked up to Christmas lights, Orbit Camera provides visual feedback to users as they adjust my lights. It is cool but not good enough to show people yet!

Also I have to go back to the store and exchange my Orbit for one that works right. I got one with a Pan mechanism that gets mechanically stuck/jammed quite often Roll Eyes

- MG
By: MelvinG
Rank: Magna Cum Laude
Topics: 661
From: Los Angeles, USA
Added: 01/08/2006 - 12:19 PM

For anybody followong this thread and/or interested in playing with the system I described in my previous post...

It is now at least somewhat functional. I have it listed on Stefan's Cameras page now. I'm on the second page, title is "Light Controls!".

The site is on an Apache server in my house. It serves up the page and handles all the interfacing to the light dimmers and such. That's all done with Perl scripts on the Apache box.

The LogiSphere is (for now) plugged in to a laptop in the livingroom. Perl code on the Apache box "forwards" pan/tilt motion commands to the laptop, reads back status info, and "grabs" stills from the camera (sorta).

It is all very crude right now but it works. Development is ongoing.

Comments, ideas, criticisms, etc.? Please post to this thread.

- MG
By: MelvinG
Rank: Magna Cum Laude
Topics: 661
From: Los Angeles, USA
Added: 01/26/2006 - 01:23 PM

Taking it a step further... I am wondering if there is "API documentation" (perhaps not the right term?) for LogiSphere. What I mean is a complete list of all the different HTTP requests that LogiSphere will service, description of what is returned, and so on. If such a thing exists is it proprietary? Or could it be made available to us users??

- MG
By: sse
Rank: Forum Addict
Topics: 73
From: n/a
Added: 01/26/2006 - 02:51 PM

I would not call it a API, as there are just simple URLs.
Most of it is covered in the help file.

The rest you can figure out using tcpdump or ethereal.

I did not want to document more than needed to use the software, as script kiddies could easily abuse
the information and wear out peoples camera sending move commands non stop....

Stefan