This package facilitates the integration of DepthAI and compatible hardware with ROS. List of compatible hardwares can be found here. This package is based on the Gen 1 API for DepthAI and provides an interface for ROS (not ROS2).
This meta-package contains the following packages:
- depthai_ros_driver
- depthai_ros_msgs
- node_interface
Though this metapackage might work on other systems, it has only been tested on:
- Ubuntu 18.04 LTS
- Ubuntu 20.04 LTS
A list of pre-requisites:
- C++ compiler (recommended:
g++
orclang
with at least C++17 support) - CMake (3.10.2 or higher)
- Boost (1.65.1 or higher)
- OpenCV (3.2 or higher)
- ROS (melodic or higher)
- ROS Packages (see
rospack deps depthai_ros_driver
)
To use depthai_ros
metapackage, clone this repo with submodules:
$ git clone --recursive https://github.com/rapyuta-robotics/depthai_ros.git
For older versions of git, one of the following processes might be needed:
- Use
--recurse-submodules
instead of--recursive
- Clone without any flags and then grab the submodules using
git submodule update --init --recursive
- Prepare MobileNetSSD compatible model (blob and json file). Once issue #5 is resolved, this will not be necessary for a default model. Due to limitations of Gen1 API used in the ROS driver, a model is required to run it.
Sample models are available here
- Compile using
catkin build depthai_ros
orcatkin_make_isolated --build depthai_ros
.catkin_make
will not build the package successfully. - Execute
./deploy_udev_rules.sh
present in~/depthai_ros/depthai_ros_driver/scripts
. - Launch the node or nodelet by appropriately choosing the correct launch file and parameters:
roslaunch depthai_ros_driver depthai_{node,nodelet}.launch
- Custom models can be provided using
blob_file
andblob_file_config
arguments to the launch file. If an argumentA
needs valueB
, the syntax isroslaunch <launch_file> A:=B
- Get the relevant details using:
$ rostopic list /depthai $ rosservice list /depthai $ rosparam list /depthai
If you see an error similar to this:
Stream not opened: config_d2h
Available streams: []
device is not initialized
Pipeline is not created.
No USB device [03e7:2485], still looking... 0.401s [FOUND]
Sending internal device firmware
Successfully connected to device.
Try forcing USB2 mode using <roslaunch as before> force_usb2:=true
This package contains all the custom messages and services used by the depthai_ros_driver
API. While we tried to use the standard messages where possible, due to the unique hardware, it wasn't possible to stick with the standard messages everywhere.
This package consists of a node and a nodelet version of the ROS driver. It also contains the launch files required for an easy use.
This package contains some utilities used to reduce code duplication between the node and the nodelet version in depthai_ros_driver
.