SDK installation (v1.80 or later)
Table of contents
Introduction
Here we will explain the steps to build a development environment for the iPRO Camera SDK application using a Docker image. Also, in this tutorial, the SDK installation directory is described as ${SDK_DIR}
.
This tutorial only supports SDK ver.1.80 or later. Please note that it cannot be used with versions earlier than SDK ver.1.80.
Advance preparation
First, select the OS for development. Choose between Linux OS and Windows OS.
Development with SDK ver.1.80 or later is only supported in the GUI environment of Linux OS. We cannot support development in Windows OS or CUI environments even if problems occur. Please use it for trial purposes until you install Linux OS.
Preparing the Docker environment on Linux OS
The steps here are performed in the following environment.
OS: Ubuntu 22.04.2 LTS (Jammy Jellyfish)
Docker Engine version: 23.0.1
If your environment is connected to the Internet via a proxy, please configure the proxy server settings.
Before installing Docker, uninstall the old version.
sudo apt-get remove docker docker-engine docker.io containerd runc
Install an app that allows you to install Docker.
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg lsb-release
Add Docker's official GPG key.
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
Set up a stable Docker repository.
Install Docker Engine.
The docker command requires root privileges by default, so add the user to the docker group so that it can be executed with user privileges.
Restart docker daemon or if that doesn't work, restart your PC.
Grant group write permission to docker.sock.
Test whether Docker can be used.
If the following is displayed, the installation is successful.
If not, please check if it succeeds below.
Now restart your PC. (Be sure to reboot.)
Next, copy the SDK zip file inside Ubuntu. Get the SDK here.
Copy the [SDK ZIP file] to any location such as home/[username]. Install unzip on Ubuntu.
The preparation of the Docker environment on Linux OS is now complete. Proceed to "Prepare the build environment".
Preparing the Docker environment on Windows OS(Windows + Docker Desktop)
When using Docker Desktop, there may be a fee depending on the number of employees and annual income of the company using it. Please see here(Japanese) for accurate information.
If you wish to use it, please refer to the following.
Reference official document(Japanese)
Preparing the Docker environment on Windows OS(Windows + WSL + Docker Engine)
Install WSL. WSL requires Windows 10 version 2004 or higher (build 19041 or higher) or Windows 11. Please see here(Japanese) for details.
Start Powershell and install WSL.
Install Ubuntu 20.04LTS.
Once the installation is complete, an Ubuntu window will appear, allowing you to set your username and password. Here the username is “ipro” and the password is “iPRO12345”.
Install Docker Engine according to the instructions on the site(Japanese) below. At this time, please perform the steps up to the 「Docker Engineのインストール」 chapter. (will not work after that)
Docker Engine インストール(Ubuntu 向け) | Docker ドキュメント (matsuand.github.io)
The docker command requires root privileges by default, so add the user to the docker group so that it can be executed with user privileges.
Start docker with the following command.
Execute the following command to check the operation. The PC you are running it on must be able to connect to the internet.
It is OK if the result is displayed as shown below.
To automatically start docker when Ubuntu boots, configure the following settings. You can use the editor of your choice.
Add the following line at the end:
When booting Ubuntu via WSL, we have confirmed a phenomenon where the qemu association disappears when the image is rebooted. The two lines below are provisional responses. If you configure this setting, you will be asked to enter your password when you start Ubuntu with WSL.
Copy the SDK zip file inside Ubuntu. Get the SDK here.
Open Windows Explorer and click Linux → Ubuntu-20.04 from the tree on the left.
Copy the [SDK ZIP file] to any location such as home/[username].
Install unzip on Ubuntu.
The preparation of the Docker environment on Windows OS is now complete. Proceed to "Prepare the build environment."
Prepare the build environment
After installing Docker, prepare the environment for building the app. For a GUI environment, use Visual Studio Code.
For Windows, please download from the link below.
Visual Studio Code - Code Editing. Redefined
For Linux, download using the command below.
You can downgrade the .devcontainer extension from below.
Next, install the Visual Studio Code Dev Containers extension. First, start Visual Studio Code. On Linux, you can start it by typing code in the terminal. Select extensions from the left menu and enter "Dev Containers" in the search window.
Select Dev Containers displayed in the list and press the Install button.
Reference information: Please refer to Developing inside a Container using Visual Studio Code Remote Development “Getting started”.
How to build the app
Extract the SDK file.
Since the SDK zip file has already been placed in any folder, extract it to any folder.
Please place your developer license (development.key) in the SDK/conf folder.
Change to the extracted directory.
Using Visual Studio Code in a GUI environment
Start Visual Studio Code in ${SDK_DIR}
.
Click the >< mark at the bottom left of the screen to open the command palette, then select "Reopen in Container".
Building the Docker image will begin according to .devcontainer/Dockerfile.
You can check the progress by clicking "Starting Dev container (Show logs)" at the bottom right.
Preparation is complete when "Dev Container: iPRO Camera SDK" is displayed to the right of the >< mark at the bottom left of the screen.
Open the Terminal tab at the bottom right. Make sure that "bash" is displayed on the right side.
If bash is not displayed, press the "+" to the right of the section that says "Dev Containers" and select bash.
Configure the environment before making.
If you want to build an extension app for ambaCV2X
If you want to build an extension app for ambaCV5X
Now you can build the app. As an example, if you want to build C/C++ skeleton_sample_app, move to the target directory and run make as shown below.
Build the ambaCV2X and ambaCV5X extension apps into one file
Please see here for details.
Operation check
Install the app in the .ext file you created on the camera and check that it works. Here, access the camera from a web browser as shown below and try installing it.