当前位置:网站首页>ROS2 Foxy depthai_ ROS tutorial
ROS2 Foxy depthai_ ROS tutorial
2022-07-01 12:46:00 【Oak China_ official】
edit :OAK China
First episode :oakchina.cn
Like it , Please do more ️
▌ Preface
Hello, Hello everyone , Here is OAK China , I'm your assistant .
I found out that will OAK Use in ROS There are more and more friends on , Last week, a user mentioned in our group ROS2 Problems in the use of , Now we depthai-ros The tutorial for has ros1 and ros2 The use of has been updated .

We have been out before ROS1 The tutorial on (ROS Use precompiled on depthai C++ library ), In this issue, let's talk about ROS2 How to compile on depthai.
OAK The camera in ROS2 Foxy compile depthai Environmental tutorials
Link to this tutorial video :B standing -OAK China
PS: It's all from OAK China official website Use the tutorial , May be updated from time to time , Please check the official website for the latest content .
▌1. Related information
platform :Ubuntu20.04(PC)
depthai edition :2.16.0
ROS edition :ROS2 Foxy
▌2. install ROS2
Set up the language environment
Make sure you have a support UTF-8, If you are in the smallest environment ( for example docker Containers ), Then the language environment may be the smallest , for example POSIX. We use the following settings to test . however , If you use different UTF-8 Supported language environment , There should be no problem. .
locale # check for UTF-8
sudo apt update && sudo apt install locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF--ro8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
locale # verify settings
Set download source
You need to ROS 2 apt Add a repository to your system . First , Check the output of this command to ensure that Ubuntu Universe The repository .
apt-cache policy | grep universe
This should output the following line :
500 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
release v=20.04,o=Ubuntu,a=focal,n=focal,l=Ubuntu,c=universe,b=amd64
If you don't see an output line like the one above , Please use these instructions to enable Universe The repository .
sudo apt install software-properties-common
sudo add-apt-repository universe
You will now ROS 2 apt Add a repository to your system .
sudo apt update && sudo apt install curl gnupg2 lsb-release
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
Then add the repository to your source list .
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http:/
Update your... After setting up the repository apt Repository cache .
sudo apt update
ROS 2 Software packages are built on frequently updated Ubuntu On the system . It is always recommended that you make sure your system is up to date before installing new packages .
sudo apt upgrade
install ROS2 foxy
Desktop installation ( recommend ):ROS、RViz、 demonstration 、 course .
sudo apt install ros-foxy-desktop
If you have not installed rosdep And not initialized , Please perform the following steps :
sudo apt install python3-rosdep
sudo rosdep init
rosdep update
▌3. Set up depthai_ros
Installation dependency
The following script will install depthai-core And update the USB Rule and install depthai
sudo wget -qO- https://raw.githubusercontent.com/luxonis/depthai-docs-website/master/source/_static/install_dependencies.sh | bash
sudo apt install ./depthai_2.16.0_amd64.deb
install vcstool
sudo apt install python3-vcstool
install opencv
sudo apt install libopencv-dev
install colcon
sudo apt install python3-colcon-common-extensions
Set up the program
The following setup procedure assumes that your cmake edition ≥3.10.2 and OpenCV edition ≥ 4.0.0. We choose dai_ws As the name of the new folder , Because it will be ours depthai ros work area .
mkdir -p dai_ws/src
cd dai_ws
wget https://raw.githubusercontent.com/luxonis/depthai-ros/main/underlay.repos
vcs import src < underlay.repos
source /opt/ros/foxy/setup.bash
rosdep install --from-paths src --ignore-src -r -y
colcon build
source install/setup.bash
Execute the sample
cd dai_ws
source install/setup.bash
ros2 launch depthai_examples stereo_inertial_node.launch.py
▌ Reference material
https://docs.oakchina.cn/en/latest/
https://www.oakchina.cn/selection-guide/
OAK China
| OpenCV AI Kit Official agents and technical service providers in China
| track AI New developments in technology and products
stamp 「+ Focus on 」 Get the latest information
边栏推荐
- Understanding of NAND flash deblocking
- leetcode:329. The longest incremental path in the matrix [DFS + cache + no backtracking + elegance]
- Ansible Playbook
- 79. 单词搜索【dfs + 回溯visit + 遍历起点】
- Good luck brought by years of persistence
- be based on. NETCORE development blog project starblog - (13) add friendship link function
- 腾讯黎巍:深耕“监管科技”,护航数字经济行稳致远
- redis探索之缓存击穿、缓存雪崩、缓存穿透
- 腾讯总考epoll, 很烦
- Which securities company has a low, safe and reliable account opening commission
猜你喜欢

Wang Xing's infinite game ushers in the "ultimate" battle
![[20220605] Literature Translation -- visualization in virtual reality: a systematic review](/img/11/6c42957186bf530e8f9d4025a40197.png)
[20220605] Literature Translation -- visualization in virtual reality: a systematic review

Ansible相关内容梳理

Logstash error: cannot reload pipeline, because the existing pipeline is not reloadable

Shell script imports stored procedures into the database

79. 单词搜索【dfs + 回溯visit + 遍历起点】

王兴的无限游戏迎来“终极”一战

redis探索之缓存击穿、缓存雪崩、缓存穿透

【历史上的今天】7 月 1 日:分时系统之父诞生;支付宝推出条码支付;世界上第一支电视广告

"Analysis of 43 cases of MATLAB neural network": Chapter 40 research on prediction of dynamic neural network time series -- implementation of NARX based on MATLAB
随机推荐
使用nvm管理nodejs(把高版本降级为低版本)
系统测试UI测试总结与问题(面试)
Good luck brought by years of persistence
我选的热门专业,四年后成了“天坑”
Using burpsuite to capture app packages
题目 2612: 蓝桥杯2021年第十二届省赛真题-最少砝码(枚举找规律+递推)
Tencent Li Wei: deeply cultivate "regulatory technology" to escort the steady and long-term development of the digital economy
R language builds a binary classification model based on H2O package: using H2O GBM build gradient hoist model GBM, use H2O AUC value of AUC calculation model
数论基础及其代码实现
Chapter 14 signals (IV) - examples of multi process tasks
买卖其实也有风险
晓看天色暮看云,美图欣赏
華為面試題: 招聘
Quickly understand what the compressed list in redis is
Simple Fibonacci (recursive)
【历史上的今天】7 月 1 日:分时系统之父诞生;支付宝推出条码支付;世界上第一支电视广告
I spent tens of thousands of dollars to learn and bring goods: I earned 3 yuan in three days, and the transaction depends on the bill
天青色等烟雨
下半年还有很多事要做
Queue operation---