What are INDIGO agents?

Questions & Answers
Post Reply
User avatar
Peter Polakovic
Posts: 2115
Joined: Thu Apr 21, 2016 9:38 am

What are INDIGO agents?

Post by Peter Polakovic »

Even if INDIGO was always well prepared for a distributed computing, for many situations is the traditional client/server not the best approach. The most important driver for the change was implementation of webGUI in INDIGO server. The thin client running in a browser needs much smarter backend than INDIGO server itself, it needs a server side application logic. For this code, acting on the server side and controlling the local devices on behalf of the client, we use term INDIGO agent.

Such agent is independent on the connection to the client. The client can configure it, disconnect and keep it running, doing its job and connect later to monitor the status or to take the results. The communication between the driver and the agent is also not limited by network bandwidth as far as they both live in the same INDIGO server and can communicate to each other over the software bus on a procedure call speed.

And last but not least, as far as agent code contains the waste majority of application logic for a typical operations supported by the applications for amateur astronomy. Implementation of the client is in this case  just implementation of native GUI for a given operating system. It is faster, easier and possible bugs can be fixed on one place.

There are four basic agents - Imager Agent, Mount Agent, Guider Agent and Auxiliary Agent.

Imager Agent controls main imaging cameras, filter wheels and focusers. It can capture a given number of images in a single batch or in a more complicated sequence, focus automatically, generate stretched JPEG previews or upload captured images to the client.

Mount Agent controls mounts, domes, GPS units and joysticks. It provides a common source of information about observatory position and source of the local time, creates links between the joysticks and the mounts and also acts as a gateway between INDIGO protocol and LX200 protocol for 3rd party applications like SkySafari.

Guider Agent controls guiding cameras and guiding devices. It can calibrate and guide with a different drift detection algorithms, it generates stats and data for different kinds of graphs. In future it will also control active optic devices.

Auxiliary Agent controls auxiliary devices like power boxes, flat boxes, weather stations, sky quality meters, etc.
Among controlled devices, agents can also talk to each other. E.g. Imager Agent can initiate dithering in Guider Agent or to sync coordinates in Mount Agent to the center of a plate solved image. Mount Agent can set FITS metadata in Imager Agent or to stop guiding upon slew or parking request. Such agents we refer as related agents.

Since version 4.0 AstroImager and AstroDSLR are clients for Imager Agent, AstroTelescope is a client for Mount Agent and AstroGuider is a client for Guider Agent. Most of the applications are also clients for Auxiliary Agent. These agents are referred as primary agents.

Each application contains its own embedded INDIGO server with a set of relevant drivers and agents on a shared software bus. When a remote INDIGO server instance is detected, e.g. INDIGO Sky running on Raspberry Pi, its software bus is connected to the embedded one and you can see not just the local devices, but also devices connected to a remote server.

Client application, which is just a GUI of the agent, shows the device names as seen by the agent. So if e.g. AstroTelescope is connected to its embedded Imager Agent it shows SynScan mount connected directly to your Mac as "Mount SynScan", while the same mount connected to INDIGO Sky will be named "Mount SynScan @ indigosky". On the other hand, if AstroTelescope is connected to the Imager Agent running inside INDIGO Sky, it will not show mount connected to your Mac (because INDIGO Sky is not configured to connect remote devices) and the mount connected to Raspberry Pi will be called just "Mount SynScan". Always keep in mind, that names shown by GUI are relative to the selected primary agent.

Technically the same is true for related agents. So Imager Agent running in INDIGO Sky as seen from Mount Agent running in the same Raspberry Pi is named "Imager Agent", while as seen from Mount Agent embedded into AstroTelescope is named "Imager Agent @ indigosky". This is what you will see in any control panel or a similar tool. But to make it less confusing, the recent builds of client applications will show just user friendly service names for well known agents, so e.g. "INDIGO Sky" for "AstroTelescope @ indigosky" as a primary agent and "INDIGO Sky" for "Imager Agent @ indigosky" or "AstroImager" for "Imager Agent @ AstroImager" as a related agent.
suvowner
Posts: 127
Joined: Sun Sep 24, 2017 10:46 pm

Re: What are "agents"

Post by suvowner »

what does the alignment model calibration agent do ?
cas
Posts: 100
Joined: Fri May 17, 2019 4:05 am

Re: What are "agents"

Post by cas »

Hi Peter,

thanks for writing this up.

I'm surprised more people haven't read it - I guess they don't need to if they're running everything on localhost.

I should have said thank you earlier.

c
User avatar
Peter Polakovic
Posts: 2115
Joined: Thu Apr 21, 2016 9:38 am

Re: What are "agents"

Post by Peter Polakovic »

suvowner wrote: Wed Nov 27, 2019 12:18 am what does the alignment model calibration agent do ?
It is an agent providing access to saved calibration data. The are normally not exposed as standard property. Peter
Post Reply