Skip to content

Commit ef87cbc

Browse files
committed
initial commit
0 parents  commit ef87cbc

File tree

104 files changed

+12121
-0
lines changed

Some content is hidden

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

104 files changed

+12121
-0
lines changed

.clang-format

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
BasedOnStyle: Google
2+
NamespaceIndentation: None
3+
BreakBeforeBinaryOperators: NonAssignment
4+
SpaceBeforeParens: Never
5+
IndentPPDirectives: BeforeHash
6+
AlignOperands: true
7+
DerivePointerAlignment: false
8+
PointerAlignment: Left
9+
BinPackArguments: false
10+
BinPackParameters: false
11+
AllowShortFunctionsOnASingleLine: Empty
12+
IndentWidth: 4
13+
ColumnLimit: 160
14+
AllowShortIfStatementsOnASingleLine: WithoutElse

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Luxonis LLC
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
# depthai-ros
2+
main branch supports ROS Melodic, ROS Noetic, ROS2 Foxy & Galactic. Might also work on kinetic too.
3+
4+
5+
6+
### Install from ros binaries
7+
8+
Add USB rules to your system
9+
```
10+
echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="03e7", MODE="0666"' | sudo tee /etc/udev/rules.d/80-movidius.rules
11+
sudo udevadm control --reload-rules && sudo udevadm trigger
12+
```
13+
Install depthai-ros. (Available for Noetic, foxy, galactic and humble)
14+
`sudo apt install ros-<distro>-depthai-ros`
15+
16+
## Install from source
17+
18+
### Install dependencies
19+
20+
The following script will install depthai-core and update usb rules and install depthai devices
21+
22+
```
23+
sudo wget -qO- https://raw.githubusercontent.com/luxonis/depthai-ros/main/install_dependencies.sh | sudo bash
24+
```
25+
if you don't have opencv installed then try `sudo apt install libopencv-dev`
26+
27+
28+
if you don't have rosdep installed and not initialized please execute the following steps:
29+
1. `sudo apt install python-rosdep`(melodic) or `sudo apt install python3-rosdep`
30+
2. `sudo rosdep init`
31+
3. `rosdep update`
32+
33+
### Setting up procedure
34+
The following setup procedure assumes you have cmake version >= 3.10.2 and OpenCV version >= 4.0.0. We selected `dai_ws` as the name for a new folder, as it will be our depthai ros workspace.
35+
36+
1. `mkdir -p dai_ws/src`
37+
2. `cd dai_ws/src`
38+
3. `git clone https://github.com/luxonis/depthai-ros.git`
39+
4. `cd ../..`
40+
5. `rosdep install --from-paths src --ignore-src -r -y`
41+
6. `source /opt/ros/<ros-distro>/setup.bash`
42+
7. `catkin_make` (For ROS1) `colcon build` (for ROS2)
43+
8. `source devel/setup.bash` (For ROS1) & `source install/setup.bash` (for ROS2)
44+
45+
46+
<!--
47+
7. `cd ~`
48+
8. `git clone https://github.com/luxonis/depthai-core.git --branch develop`
49+
9. `cd ~/depthai-core`
50+
10. `mkdir build`
51+
11. `cmake .. -D BUILD_SHARED_LIBS=ON`
52+
12. `cmake --build . --parallel --config Release --target install`
53+
13. `cd ~`
54+
14. `mkdir -p dai_ws/src`
55+
15. `cd dai_ws/src`
56+
16. `git clone https://github.com/luxonis/depthai-ros.git --branch noetic-devel`
57+
17. `git clone https://github.com/luxonis/depthai-ros-examples.git --branch noetic-devel`
58+
18. `git clone https://github.com/ros-perception/vision_msgs.git --branch noetic-devel`
59+
19. `cd ~/dai_ws`
60+
20. `source /opt/ros/<ros-distro>/setup.zsh`
61+
21. `catkin_make_isolated --cmake-args -D depthai_DIR=${depthai-core insall directory}/lib/cmake/depthai` -->
62+
63+
<!-- 1. `cd ~`
64+
2. `git clone --recursive https://github.com/luxonis/depthai-core.git --branch develop`
65+
3. `cd ~/depthai-core`
66+
4. `mkdir build`
67+
5. `cd build`
68+
6. `cmake .. -DBUILD_SHARED_LIBS=ON`
69+
7. `cmake --build . --config Release --target install`
70+
8. `cd ~`
71+
9. `mkdir -p dai_ws/src`
72+
10. `cd dai_ws/src`
73+
11. `git clone https://github.com/luxonis/depthai-ros.git --branch noetic-devel`
74+
12. `git clone https://github.com/luxonis/depthai-ros-examples.git --branch noetic-devel`
75+
13. `git clone https://github.com/ros-perception/vision_msgs.git --branch noetic-devel`
76+
14. `cd ~/dai_ws`
77+
15. `source /opt/ros/<ros-distro>/setup.bash` or `source /opt/ros/<ros-distro>/setup.zsh` if using zsh instead of bash
78+
16. `catkin_make_isolated --cmake-args -Ddepthai_DIR=~/depthai-core/build/install/lib/cmake/depthai` (Melodic)
79+
17. `catkin_make_isolated --cmake-args -D depthai_DIR=~/depthai-core/build/install/lib/cmake/depthai` (Noetic) -->
80+
81+
## Executing an example
82+
83+
### ROS1
84+
1. `cd dai_ws` (Our workspace)
85+
2. `source devel/setup.bash`
86+
3. `roslaunch depthai_examples stereo_inertial_node.launch` - example node
87+
For more examples please check the launch files.
88+
89+
### ROS2
90+
1. `cd dai_ws` (Our workspace)
91+
2. `source install/setup.bash`
92+
3. `ros2 launch depthai_examples stereo_inertial_node.launch.py` - example node
93+
For more examples please check the launch files.
94+
95+
96+
97+
## Running Examples
98+
99+
### Mobilenet Publisher:
100+
#### ROS1:
101+
##### OAK-D
102+
```
103+
roslaunch depthai_examples mobile_publisher.launch camera_model:=OAK-D
104+
```
105+
##### OAK-D-LITE
106+
```
107+
roslaunch depthai_examples mobile_publisher.launch camera_model:=OAK-D-LITE
108+
```
109+
##### With visualizer
110+
```
111+
roslaunch depthai_examples mobile_publisher.launch | rqt_image_view -t /mobilenet_publisher/color/image
112+
```
113+
114+
#### ROS2:
115+
116+
##### OAK-D
117+
```
118+
ros2 launch depthai_examples mobile_publisher.launch.py camera_model:=OAK-D
119+
```
120+
121+
##### OAK-D-LITE
122+
```
123+
ros2 launch depthai_examples mobile_publisher.launch.py camera_model:=OAK-D-LITE
124+
```
125+
126+
127+
### Testing results
128+
- ImageConverter - Tested using `roslaunch depthai_examples stereo_inertial_node.launch` && `roslaunch depthai_examples rgb_publisher.launch`'
129+
- ImgDetectionCnverter - tested using `roslaunch depthai_examples mobile_publisher.launch`
130+
- SpatialImgDetectionConverter - Ntested using `roslaunch depthai_examples stereo_inertial_node.launch`
131+
132+
133+
### Users can write Custom converters and plug them in for bridge Publisher.
134+
If there a standard Message or usecase for which we have not provided a ros msg or
135+
converter feel free to create a issue or reach out to us on our discord community. We would be happy to add more.

depthai-ros/CHANGELOG.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2+
Changelog for package depthai-ros
3+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4+
5+
2.5.3 (2022-08-21)
6+
-----------
7+
* Updated release version
8+
* Contributors: Sachin
9+
10+
2.5.2 (2022-06-01)
11+
-------------------
12+
* Upgraded examples
13+
* Fixed bugs for Noetic
14+
15+
2.5.1 (2022-05-20)
16+
-------------------
17+
* Fix Build farm issues
18+
19+
2.5.0 (2022-05-20)
20+
-------------------
21+
* Release 2.5.0
22+
* add ament package:
23+
* created Bridge and Coverters to handle images, IMU and camera Info
24+
25+

depthai-ros/CMakeLists.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
cmake_minimum_required (VERSION 3.10.2) # CMake version in Ubuntu 18.04 LTS
2+
3+
project(depthai-ros VERSION 2.5.3 LANGUAGES CXX C)
4+
5+
set(CMAKE_CXX_STANDARD 14)
6+
7+
find_package(ament_cmake QUIET)
8+
9+
if ( ament_cmake_FOUND )
10+
ament_package()
11+
elseif( CATKIN_DEVEL_PREFIX OR CATKIN_BUILD_BINARY_PACKAGE )
12+
find_package(catkin REQUIRED)
13+
catkin_metapackage()
14+
endif()

depthai-ros/package.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0"?>
2+
<package format="3">
3+
<name>depthai-ros</name>
4+
<version>2.5.3</version>
5+
<description>The depthai-ros package</description>
6+
7+
<!-- One maintainer tag required, multiple allowed, one person per tag -->
8+
<!-- Example: -->
9+
<!-- <maintainer email="[email protected]">Jane Doe</maintainer> -->
10+
<maintainer email="[email protected]">sachin</maintainer>
11+
<author>Sachin Guruswamy</author>
12+
13+
<license>MIT</license>
14+
15+
16+
<buildtool_depend condition="$ROS_VERSION == 1">catkin</buildtool_depend>
17+
<buildtool_depend condition="$ROS_VERSION == 2">ament_cmake</buildtool_depend>
18+
19+
<exec_depend>depthai</exec_depend>
20+
<exec_depend>depthai_ros_msgs</exec_depend>
21+
<exec_depend>depthai_bridge</exec_depend>
22+
<exec_depend>depthai_examples</exec_depend>
23+
24+
<export>
25+
<build_type condition="$ROS_VERSION == 1">catkin</build_type>
26+
<build_type condition="$ROS_VERSION == 2">ament_cmake</build_type>
27+
</export>
28+
29+
</package>

depthai_bridge/CHANGELOG.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2+
Changelog for package depthai_bridge
3+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4+
5+
2.5.3 (2022-08-21)
6+
-----------
7+
* Updated release version
8+
* Merge remote-tracking branch 'origin/main' into ros-release
9+
* Timestamp update (`#129 <https://github.com/luxonis/depthai-ros/issues/129>`_)
10+
* Updated timestamp style
11+
* Changed Loglevel Namesapce
12+
* Fixed seg fault in yolo detections
13+
* Updated mobilenet center position
14+
* Fix for spatial detection for noetic (`#120 <https://github.com/luxonis/depthai-ros/issues/120>`_)
15+
* moved the depthai bridge position of find package
16+
* Updated condition for spatial detection for ros1
17+
"
18+
* moved the depthai bridge position of find package (`#115 <https://github.com/luxonis/depthai-ros/issues/115>`_)
19+
* Contributors: Sachin, Sachin Guruswamy
20+
21+
2.5.2 (2022-06-01)
22+
-------------------
23+
* Upgraded examples
24+
* Fixed bugs for Noetic
25+
26+
2.5.1 (2022-05-20)
27+
-------------------
28+
* Fix Build farm issues
29+
30+
2.5.0 (2022-05-20)
31+
-------------------
32+
* Release 2.5.0
33+
* add ament package:
34+
* created Bridge and Coverters to handle images, IMU and camera Info
35+

0 commit comments

Comments
 (0)