-
Notifications
You must be signed in to change notification settings - Fork 114
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
[RSDK-9928] - Add preloaded images to image_file camera #4830
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.
Extra tests:
- fake camera with rtp passthrough true still shows the world data.
- image_file camera can reconfigure from preloaded data to image file and back.
components/camera/fake/image_file.go
Outdated
"errors" | ||
"fmt" | ||
"image" | ||
"image/png" |
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.
Does fake camera use png or jpeg for the worlddata image?
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.
fake camera uses jpg
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.
should we use that here? It should lead to a smaller file I think.
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.
fake camera with rtp passthrough true still shows the world data. ✅
image_file camera can reconfigure from preloaded data to image file and back. ✅
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.
To test ae1d862, I ran my feature branch viam-server and re-tested that the pizza, crowd, and dog render properly on app
verifying the new jpeg decoding works
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.
New file is 165kb down from 477kb with png
RSDK-9928
This PR makes a new additive non-breaking attribute
preloaded_image
that is"pizza" | "dog" | "crowd"
. If specified, it will use the base64 representation of said images in the modified fileworlddata.go
->fakedata.go
which used to only contain the world asset for thefake
camera rtp passthrough stream, but now also includes these preloaded images.There is validation in
Validate
to make sure that only"pizza" | "dog" | "crowd"
is specified whenpreloaded_image
is given.Images
will also return the specified preloaded image along with other configured filenames.I also added tests to make sure the camera initializes properly with the field specified and checked outputs of
Image
andImages
The additional images increases our fake assets from 11kb to 477kb.
Manual testing
pizza dog crowd
