Skip to main content
Version: 2.0.0
warning

This page is describing the upcoming ROS2 version of the MRS UAV System (however, it may be still outdated). If you are looking for ROS1 version of the docs, follow to https://ctu-mrs.github.io/docs/1.5.0/introduction/.

Luxonis

Installation

The Luxonis driver on ROS2 Jazzy is supported by DepthAI v2, it can be installed by running

sudo apt install ros-jazzy-depthai-ros

Finding out the IP address of the sensor

If you're connecting to the camera with PoE, the default ip should be 169.254.1.222 but this can be verified by using the depthai CLI utility. you can install and run it as follows:

pipx install depthai
depthai -l

It should give a response similar to this:

[DeviceInfo(name=169.254.1.222, deviceId=14442C101146E6D200, X_LINK_BOOTLOADER, X_LINK_TCP_IP, X_LINK_MYRIAD_X, X_LINK_SUCCESS)]

For this to work, your devices need to be on the same network. You can create an Ethernet connection in the NetworkManager applet and set a static IP address in the 169.254.0.0/16 network like this:

image

Be sure to check the "Use this connection only for resources on its network" option under the "Routes..." menu, otherwise your computer may try to use this connection as an internet gateway.

Startup

You need to have the following udev rule for the camera to be detected and work properly, you can place it for example in /etc/udev/rules.d/60-luxonis.rules

SUBSYSTEM=="usb", ATTRS{idVendor}=="03e7", OWNER="mrs", MODE="0666"

After that refresh the udev daemon or reboot:

sudo udevadm control --reload
sudo udevadm trigger

Then the launch command will work

ros2 launch depthai_ros_driver camera.launch.py

In Docker

Place the following compose session snippet into the example session:

  # starts the HW API for connecting the MRS UAV System to PX4
luxonis:
image: ctumrs/mrs_uav_system:${MRS_UAV_SYSTEM_VERSION}
network_mode: host
volumes:
- /dev:/dev
privileged: true
env_file:
- ./stack.env
command: bash -c "ros2 launch depthai_ros_driver camera.launch.py namespace:=$UAV_NAME pointcloud.enable:=true"

Useful parameters

  • namespace prefix for the oak topics e.g namespace:=$UAV_NAME
  • pointcloud.enable should the node publish a pointcloud topic e.g pointcloud.enable:=true

More info

Check the following sources

Luxonis Documentation

GitHub Repository