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
Followed setup from: How to Run ROS Noetic on macOS Using Anaconda
Anaconda environment named noetic is activated
Install this extra dependencies
brew install libtins
Step-by-Step Instructions
brew install libtins1. Create and Initialize Your Workspace
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws2. 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
Getting an unknown option
--whole-archive
ld: unknown option: --whole-archive
clang-16: error: linker command failed with exit code 1if you got the above problem make sure that you are on the latest ouster-ros branch, specifically on the commit d151197a3025e25afbe4c55256a358b4b64d4922 or after
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=ReleaseRemember to source before run the Ouster ROS driver
source ~/catkin_ws/devel.setup.bashRun 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.jsonVideo File as attached (ROS noetic in MacOS):
https://drive.google.com/file/d/1fYeYEXTamZzuM3JHHihL4kyBiiKu2Wpa/view?usp=sharing