Skip to content

louis-wiesmann/ouster-ros

 
 

Repository files navigation

Official ROS1/ROS2 drivers for Ouster sensors

ROS1 (melodic/noetic) | ROS2 (rolling/humble/iron) | ROS2 (foxy)

ROS Version Build Status (Linux)
ROS1 (melodic/noetic) melodic/noetic
ROS2 (rolling/humble/iron) rolling/humble/iron
ROS2 (foxy) foxy

Overview

This ROS package provide support for all Ouster sensors with FW v2.0 or later. Upon launch the driver will configure and connect to the selected sensor device, once connected the driver will handle incoming IMU and lidar packets, decode lidar frames and publish corresponding ROS messages on the topics of /ouster/imu and /ouster/points. In the case the used sensor supports dual return and it was configured to use this capability, then another topic will published named /ouster/points2 which corresponds to the second point cloud.

Requirements

This package only supports Melodic and Noetic ROS distros. Please refer to ROS online documentation on how to setup ros on your machine before proceeding with the remainder of this guide.

In addition to the base ROS installation, the following ROS packages are required:

sudo apt install -y                     \
    ros-$ROS_DISTRO-pcl-ros             \
    ros-$ROS_DISTRO-rviz

where $ROS-DISTRO is either melodic or noetic.

Note
Installing ros-$ROS_DISTRO-rviz package is optional in case you didn't need to visualize the point cloud using rviz but remember to always set viz launch arg to false.

Additional dependenices:

sudo apt install -y         \
    build-essential         \
    libeigen3-dev           \
    libjsoncpp-dev          \
    libspdlog-dev           \
    libcurl4-openssl-dev    \
    cmake

Note
You may choose a different ssl backend for the curl library such as libcurl4-gnutls-dev or libcurl4-nss-dev

Getting Started

To build the driver using ROS you need to clone the project into the src folder of a catkin workspace as shown below:

mkdir -p catkin_ws/src && cd catkin_ws/src
git clone --recurse-submodules https://github.com/ouster-lidar/ouster-ros.git

Next to compile the driver you need to source the ROS environemt into the active termainl:

source /opt/ros/<ros-distro>/setup.bash # replace ros-distro with 'melodic' or 'noetic'

Finally, invoke catkin_make command from within the catkin workspace as shown below:

cd catkin_ws
catkin_make --cmake-args -DCMAKE_BUILD_TYPE=Release

Specifying Release as the build type is important to have a reasonable performance of the driver.

Usage

Launching Nodes

The package supports three modes of interaction, you can connect to a live senosr, replay a recorded bag or record a new bag file using the corresponding launch files. Recently, we have added a new mode that supports multicast. The commands are listed below: