Building Ouster ROS Driver in catkin_ws on macOS Using Anaconda

Building Ouster ROS Driver in catkin_ws on macOS Using Anaconda

Overview

This guide explains how to build the Ouster ROS driver inside a catkin_ws workspace on macOS (Intel/M1/M2) using Anaconda, following the Anaconda-based ROS Noetic setup described in the confluence page: https://ouster.atlassian.net/wiki/spaces/SUPPORT/pages/73833873409

Prerequisites

Step-by-Step Instructions

brew install libtins

1. Create and Initialize Your Workspace

mkdir -p ~/catkin_ws/src cd ~/catkin_ws

2. Clone the Ouster ROS Driver

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

 


Build Issue on macOS after running catkin_make

  1. Getting an unknown option --whole-archive

ld: unknown option: --whole-archive clang-16: error: linker command failed with exit code 1

if you got the above problem make sure that you are on the latest ouster-ros branch, specifically on the commit d151197a3025e25afbe4c55256a358b4b64d4922 or after

  1. Getting an error about boost conversion

Simply suppress the error and the build should work

Rebuild the Workspace

Once the CMakeLists.txt is patched:

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

Remember to source before run the Ouster ROS driver

source ~/catkin_ws/devel.setup.bash

Run the Ouster ROS Driver

(using replay_pcap.launch as an example here)

roslaunch ouster_ros replay_pcap.launch pcap_file:=/Users/achua/Documents/cse_support/CASE-15189/OS-0-128_v3.0.1_2048x10_20230216_173241-000.pcap metadata:=/Users/achua/Documents/cse_support/CASE-15189/OS-0-128_v3.0.1_2048x10_20230216_173241.json
image-20250801-072814.png
image-20250801-072844.png
Rviz view

Video File as attached (ROS noetic in MacOS):

https://drive.google.com/file/d/1fYeYEXTamZzuM3JHHihL4kyBiiKu2Wpa/view?usp=sharing