-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add pre-commit * Add oak-d-lite * Rename * Rviz config * Jakub suggestions Co-authored-by: Jakub Delicat <109142865+delihus@users.noreply.github.com> --------- Co-authored-by: Jakub Delicat <109142865+delihus@users.noreply.github.com>
- Loading branch information
1 parent
8e58798
commit d3fe1f7
Showing
19 changed files
with
489 additions
and
79 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-merge-conflict | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-xml | ||
- id: check-added-large-files | ||
- id: check-ast | ||
- id: check-json | ||
- id: name-tests-test | ||
files: ^.*\/test\/.*$ | ||
args: [--pytest-test-first] | ||
|
||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.6 | ||
hooks: | ||
- id: codespell | ||
entry: codespell * | ||
|
||
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt | ||
rev: 0.2.3 | ||
hooks: | ||
- id: yamlfmt | ||
files: ^(?!.*compose).*$ | ||
args: [--mapping, '2', --sequence, '4', --offset, '2', --width, '100'] | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 23.12.0 | ||
hooks: | ||
- id: black | ||
args: [--line-length=99] | ||
|
||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 6.1.0 | ||
hooks: | ||
- id: flake8 | ||
args: ['--ignore=E501,W503'] # ignore too long line and line break before binary operator, | ||
# black checks it | ||
|
||
- repo: https://github.com/PyCQA/doc8 | ||
rev: v1.1.1 | ||
hooks: | ||
- id: doc8 | ||
args: [--max-line-length=100, --ignore=D001] | ||
exclude: ^.*\/CHANGELOG\.rst/.*$ | ||
|
||
- repo: https://github.com/pre-commit/mirrors-clang-format | ||
rev: v17.0.6 | ||
hooks: | ||
- id: clang-format |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,36 @@ | ||
# depthai-docker | ||
# Docker Images for Luxonis OAK Series cameras | ||
|
||
Dockerized `depthai-ros` ROS package ([GitHub repo here](https://github.com/luxonis/depthai-ros)) | ||
The repository includes a GitHub Actions workflow that automatically deploys built Docker images to the [husarion/depthai-docker](https://hub.docker.com/r/husarion/depthai) Docker Hub repository. This process is based on [depthai-ros](https://github.com/luxonis/depthai-ros) repository. | ||
|
||
## Quick start | ||
[![ROS Docker Image](https://github.com/husarion/depthai-docker/actions/workflows/ros-docker-image.yaml/badge.svg)](https://github.com/husarion/depthai-docker/actions/workflows/ros-docker-image.yaml) | ||
|
||
1. Connect the camera with the USB cable. | ||
## Prepare Environment | ||
|
||
2. Clone this repository: | ||
``` | ||
git clone https://github.com/husarion/depthai-docker.git | ||
cd depthai-docker/demo/oak-1 | ||
``` | ||
1. Plug in the Device | ||
|
||
3. Pull necessary docker images: | ||
``` | ||
docker compose pull | ||
``` | ||
You can use `lsusb` command to check if the device is visible. | ||
|
||
4. Launch it with the RViz: | ||
``` | ||
xhost +local:docker | ||
docker compose up | ||
``` | ||
## Demo | ||
|
||
1. Clone the repository | ||
|
||
```bash | ||
git clone https://github.com/husarion/depthai-docker.git | ||
cd depthai-docker/demo/oak-1 | ||
``` | ||
|
||
2. Activate the device | ||
|
||
```bash | ||
docker compose up luxonis | ||
``` | ||
|
||
3. Launch visualization | ||
|
||
```bash | ||
xhost local:root | ||
docker compose up rviz | ||
``` | ||
|
||
> [!NOTE] | ||
> To use the latest version of the image, run the `docker compose pull` command. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
DISPLAY=${DISPLAY:?err} | ||
NVIDIA_VISIBLE_DEVICES=all | ||
NVIDIA_DRIVER_CAPABILITIES=all | ||
NVIDIA_DRIVER_CAPABILITIES=all |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
run: | ||
#!/bin/bash | ||
xhost +local:docker | ||
docker compose up | ||
docker compose up |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,30 @@ | ||
from launch import LaunchDescription | ||
from launch_ros.actions import Node | ||
|
||
|
||
def generate_launch_description(): | ||
return LaunchDescription([ | ||
# Launch RViz2 with a default configuration | ||
Node( | ||
package='rviz2', | ||
executable='rviz2', | ||
name='rviz2', | ||
arguments=['-d', '/default.rviz'], | ||
output='screen' | ||
), | ||
# Launch image_transport to republish images | ||
Node( | ||
package='image_transport', | ||
executable='republish', | ||
name='republish', | ||
arguments=['ffmpeg', 'in/ffmpeg:=/oak/rgb/image_raw/ffmpeg', 'raw', 'out:=/image_raw/uncompressed'], | ||
output='screen' | ||
), | ||
]) | ||
return LaunchDescription( | ||
[ | ||
# Launch RViz2 with a default configuration | ||
Node( | ||
package="rviz2", | ||
executable="rviz2", | ||
name="rviz2", | ||
arguments=["-d", "/default.rviz"], | ||
output="screen", | ||
), | ||
# Launch image_transport to republish images | ||
Node( | ||
package="image_transport", | ||
executable="republish", | ||
name="republish", | ||
arguments=[ | ||
"ffmpeg", | ||
"in/ffmpeg:=/oak/rgb/image_raw/ffmpeg", | ||
"raw", | ||
"out:=/image_raw/uncompressed", | ||
], | ||
output="screen", | ||
), | ||
] | ||
) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,4 @@ | |
<useBuiltinTransports>false</useBuiltinTransports> | ||
</rtps> | ||
</participant> | ||
</profiles> | ||
</profiles> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM ros:iron-ros-core | ||
|
||
RUN apt update && apt install -y \ | ||
ros-${ROS_DISTRO}-rqt* | ||
ros-${ROS_DISTRO}-rqt-image-view |
This file contains 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
Oops, something went wrong.