RealRobotics / pi-rugby-ball

6 RPi Zero 2 Ws mounted on a rugby ball shaped device for exploring shafts. Contains setup notes and scripts to run the code.
MIT License
0 stars 0 forks source link

Get Rugby Ball working #1

Open AndyBlightLeeds opened 9 months ago

AndyBlightLeeds commented 9 months ago
AndyBlightLeeds commented 9 months ago

Looks like we have to use Ubuntu 22.04LTS for ROS Humble and Iron. Seems a shame that Iron does not use 23.04. Ho hum...

To test cameras, installing Ubuntu 22.04LTS and then install the libcamera stuff. Will test and fix my scripts. 0h30

AndyBlightLeeds commented 9 months ago

Installed Ubuntu 22.04LTS. Now for the pain. Can't get the keyboard map for a UK keyboard. So annoying. Added scripts to setup workspace and install necessary packages. Waiting for them to complete... 2h30 3h00

AndyBlightLeeds commented 9 months ago

Built and installed libcamera and rpicam tools from source. 3h00 6h00 Needed to install later kernel and related modules. Used Lunar kernel (6.2). See <Install kernel image, headers, tools and modules for Lunar. https://askubuntu.com/questions/1483486/can-i-run-a-kernel-newer-than-5-15-on-ubuntu-22-04-on-a-raspberry-pi-4b Need to install image, modules, headers, tools. history sudo apt install linux-image-6.2.0-1017-raspi linux-raspi-headers-6.2.0-1017 linux-modules-6.2.0-1017-raspi linux-raspi-tools-6.2.0-1017 DMA Heap problem: Add udev rules file and add user to video group. https://raspberrypi.stackexchange.com/questions/141106/how-to-fix-the-libcamera-error-could-not-open-any-dmaheap-device 3h00 9h00

AndyBlightLeeds commented 9 months ago

Works with RPi v3 camera. Now to document it properly.

AndyBlightLeeds commented 9 months ago

Tested with both cameras. Works with rpicam-hello. 0h30 9h30

AndyBlightLeeds commented 9 months ago

Documenting process. Getting rpicam tools to build. 5h30 15h00

AndyBlightLeeds commented 9 months ago

Completed documentation and changes pushed. fdfc7ae7c22da43f655448dc3dbc27354164512c 2h30 17h30

AndyBlightLeeds commented 9 months ago

Testing build on server version. Going to take a while. Lots of updates etc. Next step is to prove the camera works from the command line after the install. This looks promising... From https://raspberrypi-guide.github.io/electronics/image-and-video-recording

import picamera

camera = picamera.PiCamera()
camera.resolution = (640, 480)
camera.start_recording('my_video.h264')
camera.wait_recording(60)
camera.stop_recording()
AndyBlightLeeds commented 9 months ago

Test camera on server. Need to do a command line record of video. Also need to setup SSH.

AndyBlightLeeds commented 9 months ago

Auto boot example here: https://discourse.ros.org/t/automatic-launch-on-os-startup/23462/5

AndyBlightLeeds commented 9 months ago

Made a recording using the command rpicam-vid -o test.h264 --width 1920 --height 1080, copied the result to a USB stick and it played back. Server image ready for testing on the Zero. 5h20 22h50

AndyBlightLeeds commented 9 months ago

Flow sensor builds OK. 0h30 23h20

AndyBlightLeeds commented 9 months ago

Wrote and tested IMU driver on https://github.com/RealRobotics/icm20948-ros2/issues/1 Hours on that issue.

AndyBlightLeeds commented 9 months ago

Started on flow sensor. See #2