Improves/updates/fixes indi-gige driver#1338
Merged
Merged
Conversation
This patch retains the camera device id (and model name) only as persistent, even while the camera is disconnected. The device id is used to open a handle to the camera and the model name is used with the device id to create a unique INDI device name to present to the user.
This patch makes several improvments preparing to handle multiple cameras
and multiple models:
1. Much better error handling/logging for all calls to aravis library.
2. Uses device ID to idenfity cameras (includes vendor, model, serial)
3. Changes GigECCD class functions signatures:
- adds virtual specifier to those functions that we override that are
virtual--proper virtual specification is necessary to ensure the
correct functions are called in all cases
- adds "override" modifier to overridden functions for cleaner code.
In general, GiGE cameras often have sensors onboard to measure sensor the temperature of the CCD/CMOS chip. This patch gathers this data if the camera claims that it has this information (using "DeviceTemperature" property). The temperature is added to the INDI panel display and also to the image metadata.
…from arv_get_device_id()
At least for FLIR GiGE cameras, changing binning changes the apparent size of the chip, such that the region of interest is configured using a smaller number of pixels. This appears to be contrary to how INDI expects binning to be configured. Following the CCD Simulator (hopefully it is a decent example of implementing a INDI::CCD device), it rather appears that the region of interest is still expected to be set using the entire available Width/Height. It therefore appears necessary to mitigate this mismatch since (at least for ekos) the client appears to mess up the apparent image if binning is configured but a smaller region is selected, but in reality the entire avaialble sensor was binned. So, for now, even when binning is used, this patch makes the driver use the full WidthMax and HeightMax manually divided by the binning to select the region of interest. This means that any use of get_x_offset().val(), get_y_offset().val(), get_width().val(), or get_height().val() from the GigECCD::camera object must be manually multiplied or divided by the values from get_bin_x().val() and get_bin_y().val() as appropriate. Similarly, camera->set_geometry(...) must be given values that are divided by the appropriate binning. It remains to verify this behavior on GiGE cameras from other vendors, or at least to check what the standard says, if anything useful on the matter.
Collaborator
|
Thank you! Can you please submit driver documentation to INDI Documentation Repo? |
Contributor
Author
|
Yes, I think I can add something here. First question is, looking through the INDI Driver Docs Repo, it seems that GiGE and USB3-Vision cameras will best be suited in directory for the "generic" cameras. Any contention with this? |
Collaborator
|
No issues at all. |
This patch changes GigECCD to handle the pointer to the underlying ArvCamera with a unqiue_ptr rather than a raw pointer. Prior to this patch, the GigECCD destructor did not delete the ArvCamera pointer. Using a smart pointer interface, this is handled much more carefully and memory leaks are avoided entirely.
This patch implements an iterator in the ArvFactory and creates device instances for all cameras found.
Contributor
Author
|
I just submitted a pull request for the driver documentation in the INDI Driver Docs Repo. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Most of the code in the indi-gige driver was written specifically for at least one older version of a point-grey BlackFly camera using an older version of the Aravis library. These patches update the indi-gige driver to use the more recent and common 0.8 version of the Aravis library. These patches also greatly improve the driver to be more generically applicable to other cameras. These patches also allow for streaming from an Aravis-supported camera (either GigE-Vision or USB-vision). These patches provide the necessary changes that will also allow for multiple cameras to be used simultaneously. Nevertheless, these patches do not implement the iterative enumeration that will be necessary to instantiate all available cameras (only the first is still instantiated)--it is left as a task for a future patch to implement this extended instantiation.