-
Notifications
You must be signed in to change notification settings - Fork 7
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
Ente raspberry pi 5 camera test #133
base: ente
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Launch the image using the command
dts devel run -L sensor-camera -H endeavour -- --device /dev:/dev -v /run/udev:/run/udev
# libcamera | ||
RUN git clone https://github.com/raspberrypi/libcamera.git | ||
WORKDIR ${PROJECT_PATH}/libcamera | ||
RUN meson setup build -Dpipelines=rpi/vc4,rpi/pisp -Dipas=rpi/vc4,rpi/pisp -Dv4l2=true -Dgstreamer=enabled -Dtest=false -Dlc-compliance=disabled -Dcam=disabled -Dqcam=disabled -Ddocumentation=disabled -Dpycamera=enabled | ||
RUN ninja -C build install | ||
WORKDIR ${PROJECT_PATH} | ||
# kmsxx | ||
RUN git clone https://github.com/tomba/kmsxx.git | ||
WORKDIR ${PROJECT_PATH}/kmsxx | ||
RUN meson setup build -Dpykms=enabled | ||
RUN ninja -C build install | ||
WORKDIR ${PROJECT_PATH} | ||
RUN ldconfig | ||
RUN python3 -m pip install picamera2 | ||
ENV PYTHONPATH=$PYTHONPATH:/usr/local/lib/aarch64-linux-gnu/python3.12/site-packages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These steps are very time consuming, increasing build time from 2 to 6 minutes, are these packages available as precompiled binaries?
numpy_array = self._camera.capture_array() if self._camera else None | ||
if self.configuration.rotation: | ||
numpy_array = numpy.rot90(numpy_array) | ||
success, jpeg_encoded_numpy_array = cv2.imencode('.jpeg', numpy_array) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add measurements of CPU usage on the Pi 5
"video_bitrate": 25000000, | ||
self._camera = Picamera2() | ||
main = { | ||
"size": (self.configuration.res_w, self.configuration.res_h), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a breaking change with the configuration format, where we specified width and height after performing the rotation of the image.
I have investigated the issue further. ROS driver imageThe node loaded the following configuration file:
Then I swapped
and we can see that the image is cropped raspistill-imageI have confirmed with |
Description
Type of change
Please mark the relevant options with X:
Tests
Please describe all tests ran and their outcome. It is highly recommended that you at least do the tests listed by default, even if you only changed the documentation.
Style compliance
Please make sure that all your changes conform to the Duckietown (code style)[link] and code (documentation style)[link] guidelines:
Next steps
Please describe if you have any questions, comments, or doubts towards the Duckietown software guardians regarding implementation, code style, running tests, documentation, etc.
FOR THE REVIEWERS
IMPORTANT: DO NOT CHANGE THIS SECTION!
To the reviewers: If you deem necessary, request code edits, more tests, documentation update, or additional reviewing. Do not review your own code!
PR Template, last edit 23 Aug 2019