Add content regarding Image Compressor, Fake Camera, and OpenCL#235
Open
LachlanCourt wants to merge 7 commits intomainfrom
Open
Add content regarding Image Compressor, Fake Camera, and OpenCL#235LachlanCourt wants to merge 7 commits intomainfrom
LachlanCourt wants to merge 7 commits intomainfrom
Conversation
LachlanCourt
commented
Jul 19, 2022
| #### Running OpenCL not on the robot | ||
|
|
||
| The Visual Mesh works best running the OpenCL framework, however most operating systems are not set up to run this by default. Whilst running the Visual Mesh on CPU is possible, sometimes it is best to replicate an environment as close to what is running on the robot as possible. Follow the steps below to set up OpenCL on a device other than a robot. | ||
|
|
Contributor
Author
There was a problem hiding this comment.
I need to confirm that these steps are correct with a fresh install so general review is fine but these steps may change
src/book/03-guides/01-main-codebase/02-maintaining-subsystems.mdx
Outdated
Show resolved
Hide resolved
ysims
reviewed
Jul 20, 2022
src/book/03-guides/01-main-codebase/02-maintaining-subsystems.mdx
Outdated
Show resolved
Hide resolved
JosephusPaye
approved these changes
Aug 6, 2022
Comment on lines
+77
to
+78
| ./b run --mount type=bind,source="/dev/dri",target="/dev/dri" <role_name> | ||
| ``` |
Member
There was a problem hiding this comment.
Probably mention what <role_name> should be replaced with
|
|
||
| To run the fake camera module, an images directory needs to exist inside the `data` directory of the module. | ||
|
|
||
| 1. Create an `images` directory and add several images with filenames matching `imageXXXXXX.jpg` where "XXXXXX" refers to any numerical digits |
Member
There was a problem hiding this comment.
Does it have to be 6 digits? If so this would help clarify:
Suggested change
| 1. Create an `images` directory and add several images with filenames matching `imageXXXXXX.jpg` where "XXXXXX" refers to any numerical digits | |
| 1. Create an `images` directory and add several images with filenames matching `imageXXXXXX.jpg`, where "XXXXXX" is any 6-digit number, e.g. `000001`, `000002`, etc. |
Contributor
Author
There was a problem hiding this comment.
Doesn't have to be 6 digits, I believe it just needs to be enumerated somehow
| @@ -85,9 +124,37 @@ After updating the Visual Mesh in the NUbots repository, it should be tested bef | |||
| If you would like to see the Visual Mesh output in NUsight, you will need to log the data and run it back in NUsight using DataPlayback, since the data is too large to send over a network. Use the steps in the [DataLogging and DataPlayback guide](/guides/main/data-recording-playback) to record and playback data. Adjust the instructions for our purpose using the following hints: | |||
|
|
|||
| - In step 1 of Recording Data, use the [`visualmesh`](https://github.com/NUbots/NUbots/blob/main/roles/visualmesh.role) role to record the data. | |||
Member
There was a problem hiding this comment.
Suggested change
| - In step 1 of Recording Data, use the [`visualmesh`](https://github.com/NUbots/NUbots/blob/main/roles/visualmesh.role) role to record the data. | |
| - In step 1 of [Recording Data](/guides/main/data-recording-playback#recording-data), use the [`visualmesh`](https://github.com/NUbots/NUbots/blob/main/roles/visualmesh.role) role to record the data. |
Contributor
Author
There was a problem hiding this comment.
I will add this to this PR 👍
|
|
||
| - In step 1 of Recording Data, use the [`visualmesh`](https://github.com/NUbots/NUbots/blob/main/roles/visualmesh.role) role to record the data. | ||
| - In step 2 of Recording Data and step 4 of Playing Back Data, set `message.output.CompressedImage` to `true` and add `message.vision.VisualMesh: true` in both [`DataLogging.yaml](https://github.com/NUbots/NUbots/blob/main/module/support/logging/DataLogging/data/config/DataLogging.yaml) and [`DataPlayback.yaml](https://github.com/NUbots/NUbots/blob/main/module/support/logging/DataPlayback/data/config/DataPlayback.yaml). | ||
| - In step 2 of Recording Data and step 4 of Playing Back Data, set `message.output.CompressedImage` to `true` and add `message.vision.VisualMesh: true` in both [`DataLogging.yaml`](https://github.com/NUbots/NUbots/blob/main/module/support/logging/DataLogging/data/config/DataLogging.yaml) and [`DataPlayback.yaml`](https://github.com/NUbots/NUbots/blob/main/module/support/logging/DataPlayback/data/config/DataPlayback.yaml). |
Member
There was a problem hiding this comment.
Suggested change
| - In step 2 of Recording Data and step 4 of Playing Back Data, set `message.output.CompressedImage` to `true` and add `message.vision.VisualMesh: true` in both [`DataLogging.yaml`](https://github.com/NUbots/NUbots/blob/main/module/support/logging/DataLogging/data/config/DataLogging.yaml) and [`DataPlayback.yaml`](https://github.com/NUbots/NUbots/blob/main/module/support/logging/DataPlayback/data/config/DataPlayback.yaml). | |
| - In step 2 of [Recording Data](/guides/main/data-recording-playback#recording-data) and step 4 of [Playing Back Data](/guides/main/data-recording-playback#playing-back-data), set `message.output.CompressedImage` to `true` and add `message.vision.VisualMesh: true` in both [`DataLogging.yaml`](https://github.com/NUbots/NUbots/blob/main/module/support/logging/DataLogging/data/config/DataLogging.yaml) and [`DataPlayback.yaml`](https://github.com/NUbots/NUbots/blob/main/module/support/logging/DataPlayback/data/config/DataPlayback.yaml). |
|
|
||
| ### Image Compressors | ||
|
|
||
| In order to send data to NUsight via the network, images need to be compressed. Depending on the environment different compressors can be used. [TurboJPEG](https://github.com/libjpeg-turbo/libjpeg-turbo) is the compressor that can be used on all platforms and is used primarily when submitting docker images for virtual competitions as the processor type cannot be guaranteed. [VAAPI](https://01.org/linuxmedia/vaapi) is the preferred compressor for devices running on Intel CPUs, which support the framework. |
Member
There was a problem hiding this comment.
Suggested change
| In order to send data to NUsight via the network, images need to be compressed. Depending on the environment different compressors can be used. [TurboJPEG](https://github.com/libjpeg-turbo/libjpeg-turbo) is the compressor that can be used on all platforms and is used primarily when submitting docker images for virtual competitions as the processor type cannot be guaranteed. [VAAPI](https://01.org/linuxmedia/vaapi) is the preferred compressor for devices running on Intel CPUs, which support the framework. | |
| In order to send data to NUsight via the network, images need to be compressed. Depending on the environment different compressors can be used. [TurboJPEG](https://github.com/libjpeg-turbo/libjpeg-turbo) is the compressor that can be used on all platforms and is used primarily when submitting docker images for virtual competitions as the processor type cannot be guaranteed. [VAAPI](https://01.org/linuxmedia/vaapi) is the preferred compressor for devices running on Intel CPUs which support the framework, like the [CPUs in the robots](/system/hardware/overview#computing). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Preview