×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

INDI LibCamera Driver

  • Posts: 124
  • Thank you received: 13

Replied by Outta on topic INDI LibCamera Driver

Just for your info it is very sluggish and freezing on 4b 1gb, while it works well on 8gb version.
1 year 4 months ago #88569

Please Log in or Create an account to join the conversation.

  • Posts: 115
  • Thank you received: 34

Replied by Simon on topic INDI LibCamera Driver

I run QT Creator on Raspberry Pi 4B 4GB and it works fine.

Finally I have managed to make some progress. Method detectCameras() no longer crashes. And driver starts in EKOS (see attached image).

More here: github.com/sajmons/indi-3rdparty/commit/...7f51c85f3f06789f2c4e.

OUTTA, Jasem, what would be next step? Probably fill in more information about camera capabilities, so that more buttons in EKOS gets enabled?
The following user(s) said Thank You: Jasem Mutlaq
Last edit: 1 year 4 months ago by Simon.
1 year 4 months ago #88636
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 4
  • Thank you received: 2

Replied by Tyler Pickett on topic INDI LibCamera Driver

I wonder if we'd be better off creating a static CameraManager instead of this create/destroy dance. We'd probably have to pull more bits of the libcamera-apps code in rather than linking to it, but that might not be such a bad thing sone those seem to be demos that might be unstable and/or depend on Raspberry Pi specific components. I'll start looking into what that would look like.
The following user(s) said Thank You: Jasem Mutlaq
1 year 4 months ago #88643

Please Log in or Create an account to join the conversation.

Replied by Jasem Mutlaq on topic INDI LibCamera Driver

Awesome progress Simon! Yes next step would be to make Image Info field editable unless we can query such information from libcamera itself. An alternative is like the V42L driver, we create a maintain a table of known cameras with their resolution and pixel information saved.
1 year 4 months ago #88647

Please Log in or Create an account to join the conversation.

  • Posts: 115
  • Thank you received: 34

Replied by Simon on topic INDI LibCamera Driver

Yeah, I totally agree with you Tyler. As it seams, cameraManager needs to be called everytime you want to access to camera object.

It would be a lot easier to find camera and create pointer to camera once. Probably in connect() method?

Then keep cameraManager opened until disconnect() is called. Inside disconect() we release camera and stop camera manager.

What do you think Tyler?

I'm still learning, C++ is not my expertise.
1 year 4 months ago #88650

Please Log in or Create an account to join the conversation.

  • Posts: 74
  • Thank you received: 11

Replied by Anjo on topic INDI LibCamera Driver

Even with this fix, it still crashes for me when Connecting calling
auto stillOptions = static_cast<StillOptions *>(m_StillApp->GetOptions());

Also, I get a ton of compile warnings:
/home/pi/astro/indi-3rdparty/indi-libcamera/indi_libcamera.cpp:527:19: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
In file included from /usr/include/libindi/indipropertyswitch.h:21,
                 from /home/pi/astro/indi-3rdparty/indi-libcamera/indi_libcamera.h:23,
                 from /home/pi/astro/indi-3rdparty/indi-libcamera/indi_libcamera.cpp:21:
/usr/include/libindi/indipropertybasic.h:116:24: note: candidate 1: ‘INDI::WidgetView<T>& INDI::PropertyBasic<T>::operator[](size_t) const [with T = _ISwitch; size_t = unsigned int]116 |         WidgetView<T> &operator[](size_t index) const;
      |                        ^~~~~~~~
/home/pi/astro/indi-3rdparty/indi-libcamera/indi_libcamera.cpp:527:19: note: candidate 2: ‘operator[](INDI::PropertyView<_IBLOB>*, int)(built-in)
  527 |         CameraSP[0].setState(ISS_ON);
      |                   ^
1 year 4 months ago #88654

Please Log in or Create an account to join the conversation.

  • Posts: 124
  • Thank you received: 13

Replied by Outta on topic INDI LibCamera Driver

Hello, Let me put my two cents as well here :)
First, I have solved stability issues with 1GB rpi, i added ssd and created SWAP partition on it.

Simon, you are now way ahead of me! I am still having trouble running anything, but due to your fix on startup, I have detected that my version of Kstars is faulty. Kstars was installed directly from raspberryPi repo, and it is missing some icons, that should give me some idea.

When I connect from remote Kstars located on Astroberry I can now connect to Libcamera driver, not able to take capture or stream but I do connect.

In regards with Tylers comment, I completely agree that we should extract stuff from libcamera-apps, if possible completely remove dependency to libcamera-apps (not libcamera it self, I believe that is not possible), but maybe we should focus on that after we enable basic stuff to work.

Jason, I would prefer not to keep table as that is harder to maintain, but it might be necessary, unless we can get all the stuff we need from libcamera. We can get a some details from libcamera: supported resolutions, supported binnings, supported max FPS, is frame packed or unpacked, and raw coding of frame. am not sure if we can get pixel size, and that could be a problem.

Anjo I had similar problems when compiling. I only solved it by manually changing file mentioned on end of this thread:
www.indilib.org/forum/development/12628-...ambiguous.html#88125
1 year 4 months ago #88655

Please Log in or Create an account to join the conversation.

  • Posts: 4
  • Thank you received: 2

Replied by Tyler Pickett on topic INDI LibCamera Driver


That's exactly what I was thinking, maybe with a wrapper to isolate the libcamera bits in a single place to keep it easy to make adjustments as they make API changes.
1 year 4 months ago #88656

Please Log in or Create an account to join the conversation.

  • Posts: 115
  • Thank you received: 34

Replied by Simon on topic INDI LibCamera Driver

If you experiance ERROR DeviceEnumerator device_enumerator.cpp:165 Removing media device /dev/media1 while still in use
It help if you just kill indiserver with this command:
sudo killall -9 indiserver

Yeeeeeej, rebooting isn't necessary any more! This is such a time saver!
1 year 4 months ago #88660

Please Log in or Create an account to join the conversation.

  • Posts: 115
  • Thank you received: 34

Replied by Simon on topic INDI LibCamera Driver

Yes ANJO indeed code inside Connect() method was causing EKOS troubles.
When I comented it completely out, EKOS starts and all buttons are active (see attached GIF).
Of course it crashes when I press image capture button, but that's OK ;)

See here for comented part of code: github.com/sajmons/indi-3rdparty/commit/...75e5c36cabf5fc9788ba

Next task is to figure out how to get that button to work! I have a feeling that it ain't gonna be easy! :)
Last edit: 1 year 4 months ago by Simon.
1 year 4 months ago #88661
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 74
  • Thank you received: 11

Replied by Anjo on topic INDI LibCamera Driver

You can actually enable that code in connect again and just comment out the m_StillApp->Parse() whicn is what causes the crash.
The following user(s) said Thank You: Simon
1 year 4 months ago #88663

Please Log in or Create an account to join the conversation.

  • Posts: 74
  • Thank you received: 11

Replied by Anjo on topic INDI LibCamera Driver

The bad new is that it still crashes in workerExposure when touching the m_StillApp object. a) it was never opened and b) if you try to open it, it says it' can't be opened... if you don't open if, you crash in ConfigureStill
1 year 4 months ago #88664

Please Log in or Create an account to join the conversation.

Time to create page: 1.358 seconds