-
Notifications
You must be signed in to change notification settings - Fork 0
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
Issues with running the code #2
Comments
I've not personally ever seen that issue. what os version are you running? are you running the 64 bit version, mmal isn't supported in the 64 bit version! running Bullseye looks to be a potential iss as well if you are using it. the best way to check if it's a hardware or underlying os issue, is to see if raspistill and raspivid work! |
Thank you for your help @dans98 ! Raspberry Pi OS with desktop It should work, or can you link what you use? Before this timelapse code I tried duetlapse and ustreamer and they both could access the camera, and raspistill worked fine. That was on an another istall, here I used a brand new SD card. I am not sure what Bullseye is, but in that case I guess I dont need to worry about… What can I do if my hardware seems ok? |
That's most likely the issue! 5.10 on 10/30/2021 is the first release of bullseye, and as i linked to previously it has issues. You can see the releases here. Try one of the buster release and see if that fixes things! |
I will check it, thank you! Is this a Pi camera hardware/software limitation, or a current limitation with this code? Can you update this code (in the future, not asap :) ) or I will need to avoid updating the os after I vot this setup working? Sorry, I am not that familiar with these different releases, I just like to understand the root of this problem. |
It's an issue with with pi os itself. The dev team changed something significant and didn't tell anyone. have a look at this. |
@xPew it looks like a fix has been implemented so that picamera will work in the future, but it will take some time for it to make it into an official release. https://forums.raspberrypi.com/viewtopic.php?t=323390&start=25#p1942967 |
@dans98 I see. Until that I will try to set up and get familiar with gLapse on an older version. Thank you! :) |
@dans98 Still getting some error… Any clue? :/ |
what does your setting.py look like? |
I only modified the IP and password of my printer. The rest is default. |
The stock settings.py is set up for an hq camera module. Your are running the v2 camera module, so you probabbly need to change the below
to something like this.
You were asking for a resolution greater than what your sensor module can capture, so it was most likely try to scale the image after the fact and running the gpu out of ram. on this page search for "sensor mode" and you will see the different modes available for the different sensors! you could allocate more memory to the gpu, but you won't gain anything. In general you never want to upscale the image. |
Oh… Will try with the proper settings in the moorning! Thank you for your patience! |
@dans98 Well half success. So I switched to fullHD res and mode 1. With this config the script seems fine. I just get bad photos with the stock settings, see below: |
Also did some further testing with Bullseye. The script still dont work, as expected. Raspistill is gone, but libcamera is working properly, and produces a really nice image out of the box without any parameters given. |
That's for sure the gpu running out of memory
If you are just using what's currently in settings.py That probably won't work for you environment, as its locking stuff down to ensure consistent results over time. Try this out. swap what you have in settings currently with this. This will put the camera in full auto mode!
and add this to the bottom of your /boot/config.txt to give the gpu more memory!
I just took this with a raspberry pi zero W and a V2 camera module in my office, with the settings above! and manually triggered it in the DWC by sending
and then
Thas to be expected as libcamera uses all the new underlying architecture that they just released. |
Meanwhile I was able to find the latest stable Buster release. I will use this until the mmal problems are resolved with Bullseye. |
Hopefully a last question... How can I set up this to work after startup? by manually execute it: sudo /etc/rc.local it works |
You have a ton of settings at your disposal, more like a fully fledged DSLR camera, than a phone!
That's correct!
Yea, a Zero W is more than capable of running indefinitely. The Zero 2 W is even more capable. Taking and saving the photos isn't very hard on the pi, what makes the pi work hard is connecting to the duet api several times a second!
also what do you have for this setting? raspi-config > System Options > Network at Boot |
@dans98 I think it was turned off, but now I ticked the box to wait for network. But I get the same behavior, except the Pi boots up slower |
@xPew Is the printer powering on at the same time? an http 599 response code is pretty rare, and is usually related to not being able to connect to the requested machine. One thing you can do quickly is up the wait time in settings.py
|
@dans98 For now while I test it the pi isn't connected to the printers power. |
It might help. also, can you post a copy of your rc.local? |
@dans98 I commented out the IP display, not to cause any trouble, also I dont really need it. The wierd thing that it should work. If I execute this exact code when its booted gLapse works well. But somehow its not executing or I dont really know... |
Oh. It seems that the wait time really did the trick... The Pi's connection before startup wasnt enough but an additional 15 sec wait time was so with gLapse. If you be aware of the Bullseye fix, and happen to have time to adapt this code, let us know, until that I wont mess with the updates :) |
I'll for sure update it once the fix they already have makes it to an official release! |
@xPew check out the video in the bottom of this blog post, it looks like you might be able to run bullseye now. |
@dans98 I tried to set up gLapse, but without success. I can only follow instructions as a non coder, I need some help with troubleshooting…
So I followed the installation points precisely as described here in order. Even tried with a completely fresh raspbian image on a new SD card, but I het the following error
:
What am I doing wrong? I modified the setting according to my IP and pw, otherwise I ran it with the stock settings. I have an updated RPi 4B with a cloned V2 Pi camera from this vendor: https://www.aliexpress.com/item/33053692639.html?spm=a2g0o.productlist.0.0.46ed659f9ySinD&algo_pvid=0ccf4d8e-71ba-461f-b951-ba3b7d8abbfe&algo_exp_id=0ccf4d8e-71ba-461f-b951-ba3b7d8abbfe-15&pdp_ext_f=%7B%22sku_id%22%3A%2267439351246%22%7D
Thank you for your help!
The text was updated successfully, but these errors were encountered: