nikivanov / watney

Watney is a low-cost 3D-printable FPV rover
GNU General Public License v3.0
378 stars 39 forks source link

Raspberry Pi Camera 3 incompatibility #34

Closed camrichmond closed 11 months ago

camrichmond commented 11 months ago

I recently started building a Watney, and I've run into an issue with the new official Raspberry Pi camera module V3. Unfortunately these new modules aren't compatible with Buster and raspivid - instead they require the new drivers from Bullseye and libcamera or Picamera2.

I've made some progress by upgrading the installed Watney image to Buster. I can now see my camera module with a vcgencmd get_camera, but there are some broken dependencies when trying to install libcamera-apps that I still need to resolve. Someone more savvy than me could probably make this change easily, but I might just make it easier on myself and buy an older wide-angle camera module. FWIW my old 1st generation camera module works perfectly right out of the box with the stock Watney image.

I just wanted to let anyone who might be running into the same issue know that the newer V3 cameras won't work with the current Watney image. Keep up the great work - this is a really fun project!

camrichmond commented 11 months ago

Update - after resolving some dependencies and modifying the video.sh file to use libcamera-vid instead of raspivid, it works! Because libcamera was built to eschew the proprietary Broadcom GPU-reliant legacy apps, most of the options remain the same, but here are the updated contents of video.sh that work on Bullseye:

libcamera-vid -n --width 1280 --height 720 --bitrate 2500000 --framerate 25 -t 0 --profile baseline --intra 25 --flush -o -| gst-launch-1.0 fdsrc do-timestamp=true ! h264parse ! rtph264pay config-interval=1 pt=96 ! udpsink host=127.0.0.1 port=8004

Hopefully that's helpful to someone!

nikivanov commented 11 months ago

Thanks @camrichmond! I'll make a note on the main page regarding this. How is the new camera module working for you? I found the non-fisheye cameras a bit too tough to drive with, since you're not seeing the environment right next to the rover.

camrichmond commented 11 months ago

You're welcome! I'm revising the camera housing for the rpi camera module 3, so I'll get you a .step for that once I'm done. I bought the wide angle version, which I'm hoping has a large enough FOV. I haven't received all my parts from aliexpress yet, so I let you know how it looks when I've got it all assembled.

camrichmond commented 11 months ago

Here's my camera module V3 compatible housing. It should fit just like the original; I only moved the pins slightly and changed the hole location.

nikivanov commented 11 months ago

Thank you! I've updated the main README to include links to this thread as well as the v3 housing. Please post a picture of your Watney once it's up and running.