Giter Club home page Giter Club logo

depthai-ros's Introduction

depthai-ros

main branch supports ROS Melodic, ROS Noetic, ROS2 Foxy & Galactic. Might also work on kinetic too.

Install from ros binaries

Add USB rules to your system

echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="03e7", MODE="0666"' | sudo tee /etc/udev/rules.d/80-movidius.rules
sudo udevadm control --reload-rules && sudo udevadm trigger

Install depthai-ros. (Available for Noetic, foxy, galactic and humble) sudo apt install ros-<distro>-depthai-ros

Install from source

Install dependencies

The following script will install depthai-core and update usb rules and install depthai devices

sudo wget -qO- https://raw.githubusercontent.com/luxonis/depthai-ros/main/install_dependencies.sh | sudo bash

if you don't have opencv installed then try sudo apt install libopencv-dev

if you don't have rosdep installed and not initialized please execute the following steps:

  1. sudo apt install python-rosdep(melodic) or sudo apt install python3-rosdep
  2. sudo rosdep init
  3. rosdep update

Setting up procedure

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.

  1. mkdir -p dai_ws/src
  2. cd dai_ws/src
  3. git clone https://github.com/luxonis/depthai-ros.git
  4. cd ../..
  5. rosdep install --from-paths src --ignore-src -r -y
  6. source /opt/ros/<ros-distro>/setup.bash
  7. catkin_make (For ROS1) colcon build (for ROS2)
  8. source devel/setup.bash (For ROS1) & source install/setup.bash (for ROS2)

Executing an example

ROS1

  1. cd dai_ws (Our workspace)
  2. source devel/setup.bash
  3. roslaunch depthai_examples stereo_inertial_node.launch - example node For more examples please check the launch files.

ROS2

  1. cd dai_ws (Our workspace)
  2. source install/setup.bash
  3. ros2 launch depthai_examples stereo_inertial_node.launch.py - example node For more examples please check the launch files.

Running Examples

Mobilenet Publisher:

ROS1:

OAK-D
roslaunch depthai_examples mobile_publisher.launch camera_model:=OAK-D
OAK-D-LITE
roslaunch depthai_examples mobile_publisher.launch camera_model:=OAK-D-LITE
With visualizer
roslaunch depthai_examples mobile_publisher.launch | rqt_image_view -t /mobilenet_publisher/color/image

ROS2:

OAK-D
ros2 launch depthai_examples mobile_publisher.launch.py camera_model:=OAK-D
OAK-D-LITE
ros2 launch depthai_examples mobile_publisher.launch.py camera_model:=OAK-D-LITE

Testing results

  • ImageConverter - Tested using roslaunch depthai_examples stereo_inertial_node.launch && roslaunch depthai_examples rgb_publisher.launch'
  • ImgDetectionCnverter - tested using roslaunch depthai_examples mobile_publisher.launch
  • SpatialImgDetectionConverter - Ntested using roslaunch depthai_examples stereo_inertial_node.launch

Users can write Custom converters and plug them in for bridge Publisher.

If there a standard Message or usecase for which we have not provided a ros msg or 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's People

Contributors

cristinaluna avatar daxoft avatar erol444 avatar hardesh-peppermint avatar hwgat avatar jdavidberger avatar jonngai avatar luxonis-brandon avatar mdtoom avatar mikaelarguedas avatar nindanaoto avatar saching13 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.