Skip to content

Commit 25aac72

Browse files
author
SzabolcsGergely
committed
Merge remote-tracking branch 'origin/main' into develop
2 parents 54b82d8 + b689b07 commit 25aac72

File tree

59 files changed

+340
-259
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+340
-259
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ _builds/
2525

2626
#git
2727
*.orig
28+
*_REMOTE_*
29+
*_LOCAL_*
30+
*_BACKUP_*
31+
*_BASE_*
2832

2933
#ci
3034
wheelhouse/

depthai-core

docs/conf.py.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ html_static_path = ['_static']
8282
html_favicon = '_static/images/favicon.png'
8383
html_css_files = [
8484
'css/index.css',
85-
'https://docs.luxonis.com/en/gen2/_static/css/navbar.css',
85+
'https://docs.luxonis.com/en/latest/_static/css/navbar.css',
8686
]
8787
html_js_files = [
88-
'https://docs.luxonis.com/en/gen2/_static/js/navbar.js',
88+
'https://docs.luxonis.com/en/latest/_static/js/navbar.js',
8989
]
9090
html_title = 'DepthAI documentation | Luxonis'
9191

92-
intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}
92+
intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}

docs/docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
version: "3"
12
services:
23
docs:
34
build:

docs/source/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ Now, pick a tutorial or code sample and start utilizing Gen2 capabilities
9292
samples/16_device_queue_event.rst
9393
samples/17_video_mobilenet.rst
9494
samples/18_rgb_encoding_mobilenet.rst
95+
samples/19_mono_camera_control.rst
96+
samples/20_color_rotate_warp.rst
9597
samples/22_1_tiny_yolo_v3_decoding_on_device.rst
9698
samples/22_2_tiny_yolo_v4_decoding_on_device.rst
9799
samples/23_autoexposure_roi.rst

docs/source/install.rst

Lines changed: 71 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ Supported Platforms
1616

1717
We keep up-to-date, pre-compiled, libraries for the following platforms. Note that a new change is that for Ubuntu now also work unchanged for the Jetson/Xavier series:
1818

19-
======================== =========================================== ================================================= ================================================================================
20-
Platform Instructions Tutorial Support
21-
======================== =========================================== ================================================= ================================================================================
22-
Windows 10 :ref:`Platform dependencies <Windows>` `Video tutorial <https://youtu.be/ekopKJfcWiE>`__ `Discord <https://discord.com/channels/790680891252932659/798284448323731456>`__
23-
macOS :ref:`Platform dependencies <macOS>` `Video tutorial <https://youtu.be/0RGmmjed3Hc>`__ `Discord <https://discord.com/channels/790680891252932659/798283911989690368>`__
24-
Ubuntu & Jetson/Xavier :ref:`Platform dependencies <Ubuntu>` `Video tutorial <https://youtu.be/QXeXMaxj4cM>`__ `Discord <https://discord.com/channels/790680891252932659/798302162160451594>`__
25-
Raspberry Pi :ref:`Platform dependencies <Raspberry Pi>` `Video tutorial <https://youtu.be/BpUMT-xqwqE>`__ `Discord <https://discord.com/channels/790680891252932659/798302708070350859>`__
26-
======================== =========================================== ================================================= ================================================================================
19+
======================== ============================================== ================================================================================
20+
Platform Instructions Support
21+
======================== ============================================== ================================================================================
22+
Windows 10 :ref:`Platform dependencies <Windows>` `Discord <https://discord.com/channels/790680891252932659/798284448323731456>`__
23+
macOS :ref:`Platform dependencies <macOS>` `Discord <https://discord.com/channels/790680891252932659/798283911989690368>`__
24+
Ubuntu & Jetson/Xavier :ref:`Platform dependencies <Ubuntu>` `Discord <https://discord.com/channels/790680891252932659/798302162160451594>`__
25+
Raspberry Pi OS :ref:`Platform dependencies <Raspberry Pi OS>` `Discord <https://discord.com/channels/790680891252932659/798302708070350859>`__
26+
======================== ============================================== ================================================================================
2727

2828
And the following platforms are also supported by a combination of the community and Luxonis.
2929

@@ -34,6 +34,7 @@ Fedora `Di
3434
Robot Operating System `Discord <https://discord.com/channels/790680891252932659/795749142793420861>`__
3535
Windows 7 :ref:`WinUSB driver <Windows 7>` `Discord <https://discord.com/channels/790680891252932659/798284448323731456>`__
3636
Docker :ref:`Pull and run official images <Docker>` `Discord <https://discord.com/channels/790680891252932659/796794747275837520>`__
37+
Kernel Virtual Machine :ref:`Run on KVM <KVM>` `Discord <https://discord.com/channels/790680891252932659/819663531003346994>`__
3738
====================== ===================================================== ================================================================================
3839

3940
macOS
@@ -147,6 +148,68 @@ Run the :code:`01_rgb_preview.py` example inside a Docker container on a Linux h
147148
To allow the container to update X11 you may need to run :code:`xhost local:root` on
148149
the host.
149150

151+
KVM
152+
***
153+
154+
To access the OAK-D camera in the `Kernel Virtual Machine <https://www.linux-kvm.org/page/Main_Page>`__, there is a need to attach and detach USB
155+
devices on the fly when the host machine detects changes in the USB bus.
156+
157+
OAK-D camera changes the USB device type when it is used by DepthAI API. This happens in backgound when the camera is used natively.
158+
But when the camera is used in a virtual environment the situation is different.
159+
160+
On your host machine, use the following code:
161+
162+
.. code-block:: bash
163+
164+
SUBSYSTEM=="usb", ACTION=="bind", ENV{ID_VENDOR_ID}=="03e7", MODE="0666", RUN+="/usr/local/bin/movidius_usb_hotplug.sh depthai-vm"
165+
SUBSYSTEM=="usb", ACTION=="remove", ENV{PRODUCT}=="3e7/2485/1", ENV{DEVTYPE}=="usb_device", MODE="0666", RUN+="/usr/local/bin/movidius_usb_hotplug.sh depthai-vm"
166+
SUBSYSTEM=="usb", ACTION=="remove", ENV{PRODUCT}=="3e7/f63b/100", ENV{DEVTYPE}=="usb_device", MODE="0666", RUN+="/usr/local/bin/movidius_usb_hotplug.sh depthai-vm"
167+
168+
The script that the udev rule is calling (movidius_usb_hotplug.sh) should then attach/detach the USB device to the virtual machine.
169+
In this case we need to call :code:`virsh` command. For example, the script could do the following:
170+
171+
.. code-block:: bash
172+
173+
#!/bin/bash
174+
# Abort script execution on errors
175+
set -e
176+
if [ "${ACTION}" == 'bind' ]; then
177+
COMMAND='attach-device'
178+
elif [ "${ACTION}" == 'remove' ]; then
179+
COMMAND='detach-device'
180+
if [ "${PRODUCT}" == '3e7/2485/1' ]; then
181+
ID_VENDOR_ID=03e7
182+
ID_MODEL_ID=2485
183+
fi
184+
if [ "${PRODUCT}" == '3e7/f63b/100' ]; then
185+
ID_VENDOR_ID=03e7
186+
ID_MODEL_ID=f63b
187+
fi
188+
else
189+
echo "Invalid udev ACTION: ${ACTION}" >&2
190+
exit 1
191+
fi
192+
echo "Running virsh ${COMMAND} ${DOMAIN} for ${ID_VENDOR}." >&2
193+
virsh "${COMMAND}" "${DOMAIN}" /dev/stdin <<END
194+
<hostdev mode='subsystem' type='usb'>
195+
<source>
196+
<vendor id='0x${ID_VENDOR_ID}'/>
197+
<product id='0x${ID_MODEL_ID}'/>
198+
</source>
199+
</hostdev>
200+
END
201+
exit 0
202+
203+
204+
Note that when the device is disconnected from the USB bus, some udev environmental variables are not available (:code:`ID_VENDOR_ID` or :code:`ID_MODEL_ID`),
205+
that is why you need to use :code:`PRODUCT` environmental variable to identify which device has been disconnected.
206+
207+
The virtual machine where DepthAI API application is running should have defined a udev rules that identify the OAK-D camera.
208+
The udev rule is decribed `here <https://docs.luxonis.com/en/latest/pages/faq/#does-depthai-work-on-the-nvidia-jetson-series>`__
209+
210+
Solution provided by `Manuel Segarra-Abad <https://github.com/maseabunikie>`__
211+
212+
150213
Install from PyPI
151214
#################
152215

docs/source/samples/04_rgb_encoding.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ encoded video over XLINK to the host, saving it to disk as a video file.
99
Pressing Ctrl+C will stop the recording and then convert it using ffmpeg into an mp4 to make it
1010
playable. Note that ffmpeg will need to be installed and runnable for the conversion to mp4 to succeed.
1111

12-
Be careful, this example saves encoded video to your host storage. So if you leave them running,
12+
Be careful, this example saves encoded video to your host storage. So if you leave it running,
1313
you could fill up your storage on your host.
1414

1515

docs/source/samples/05_rgb_mono_encoding.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ each, all at 30FPS. Each encoded video stream is transferred over XLINK and save
88
Pressing Ctrl+C will stop the recording and then convert it using ffmpeg into an mp4 to make it
99
playable. Note that ffmpeg will need to be installed and runnable for the conversion to mp4 to succeed.
1010

11-
Be careful, this example saves encoded video to your host storage. So if you leave them running,
11+
Be careful, this example saves encoded video to your host storage. So if you leave it running,
1212
you could fill up your storage on your host.
1313

1414
Demo

docs/source/samples/06_rgb_full_resolution_saver.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ uncompressed frames, processed by ISP, and raw - BayerRG (R_Gr_Gb_B), as read fr
88
10-bit packed. See here for the pull request on this capability.
99

1010
Be careful, this example saves full resolution .png pictures to your host storage. So if you leave
11-
them running, you could fill up your storage on your host.
11+
it running, you could fill up your storage on your host.
1212

1313
Demo
1414
####

docs/source/samples/09_mono_mobilenet.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Setup
1919

2020
.. include:: /includes/install_from_pypi.rst
2121

22-
This example also requires MobilenetSDD blob (:code:`mobilenet.blob` file) to work - you can download it from
22+
This example also requires MobilenetSDD blob (:code:`mobilenet-ssd_openvino_2021.2_6shave.blob` file) to work - you can download it from
2323
`here <https://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/network/mobilenet-ssd_openvino_2021.2_6shave.blob>`__
2424

2525

0 commit comments

Comments
 (0)