Os-driver failing to launch

Running the following command results in the error below

ros2 launch ouster_ros driver.launch.py params_file:=/home/nikolas/ouster_ros2_ws/src/ouster-ros/ouster-ros/config/driver_params.yaml

[ERROR] [os_driver-2]: process has died [pid 27046, exit code -11, cmd ‘/home/nikolas/ouster_ros2_ws/install/ouster_ros/lib/ouster_ros/os_driver --ros-args -r __node:=os_driver -r __ns:=/ouster --params-file /home/nikolas/ouster_ros2_ws/src/ouster-ros/ouster-ros/config/driver_params.yaml’].

using ros2 humble with a OS0

based on read me for the ros2 branch seems like i only need to add the IP/hostname to the driver params file which ive done. Also tried with adding the default ports.

Hi @sniklo,

Yes, the only thing that is required to fill in driver_params.yaml is sensor_hostname. Few questions though:

  • Are you able to ping the sensor from machine you are running the driver on?
  • Are you able to: curl -X GET http://<sensor_hostname>/api/v1/sensor/cmd/get_sensor_info
  • Are you running with a docker? If so try using the IP address instead of hostname

Would you mind sharing the entire log?

Best

curl -X GET http://os-992037000169.local//api/v1/sensor/cmd/get_sensor_info
{“build_date”: “2024-01-11T06:02:47Z”, “prod_pn”: “840-102144-C”, “image_rev”: “ousteros-image-prod-aries-v2.5.3+20240111055903”, “prod_line”: “OS-0-128”, “prod_sn”: “992037000169”, “status”: “RUNNING”, “build_rev”: “v2.5.3”, “initialization_id”: 9599936}

ros2 launch ouster_ros driver.launch.py

[INFO] [launch]: All log files can be found below /home/nikolas/.ros/log/2025-03-17-19-33-10-284632-nikolas-OMEN-by-HP-Laptop-PC-10102
[INFO] [launch]: Default logging verbosity is set to INFO
/home/nikolas/ouster_ros2_ws/install/ouster_ros/share/ouster_ros
/home/nikolas/ouster_ros2_ws/install/ouster_ros/share/ouster_ros/config/viz.rviz
/home/nikolas/ouster_ros2_ws/install/ouster_ros/share/ouster_ros
/home/nikolas/ouster_ros2_ws/install/ouster_ros/share/ouster_ros/config/viz.rviz
[INFO] [rviz2-1]: process started with pid [10115]
[INFO] [os_driver-2]: process started with pid [10117]
[os_driver-2] [WARN] [1742236392.899996575] [ouster.os_driver]: lidar port set to zero, the client will assign a random port number!
[os_driver-2] [WARN] [1742236392.900070466] [ouster.os_driver]: imu port set to zero, the client will assign a random port number!
[os_driver-2] [INFO] [1742236393.159895052] [ouster.os_driver]: Will use automatic UDP destination
[os_driver-2] [INFO] [1742236393.159965749] [ouster.os_driver]: Contacting sensor 169.254.55.0 …
[os_driver-2] [INFO] [1742236393.296071935] [ouster.os_driver]: Sensor 169.254.55.0 configured successfully
[os_driver-2] [INFO] [1742236393.296121343] [ouster.os_driver]: Starting sensor 169.254.55.0 initialization… Using ports: 0/0
[os_driver-2] [2025-03-17 19:33:13.296] [ouster::sensor] [info] initializing sensor client: 169.254.55.0 expecting lidar port/imu port: 0/0
[os_driver-2] [2025-03-17 19:33:13.296] [ouster::sensor] [info] (0 means a random port will be chosen)
[rviz2-1] [INFO] [1742236394.421235626] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-1] [INFO] [1742236394.421297136] [rviz2]: OpenGl version: 4.6 (GLSL 4.6)
[rviz2-1] [INFO] [1742236394.607178703] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-1] [INFO] [1742236395.566216970] [rviz2]: Stereo is NOT SUPPORTED
[os_driver-2] [2025-03-17 19:33:30.147] [ouster::sensor] [info] parsing non-legacy metadata format
[os_driver-2] [INFO] [1742236410.149069156] [ouster.os_driver]: No metadata file was specified, using: 169.254.55-metadata.json
[os_driver-2] [INFO] [1742236410.149232721] [ouster.os_driver]: Wrote sensor metadata to 169.254.55-metadata.json
[os_driver-2] [INFO] [1742236410.149250766] [ouster.os_driver]: ouster client version: 0.11.1+483206f-release
[os_driver-2] product: OS-0-128, sn: 992037000169, firmware rev: v2.5.3
[os_driver-2] lidar mode: 1024x10, lidar udp profile: RNG19_RFL8_SIG16_NIR16
[os_driver-2] [INFO] [1742236410.326907938] [ouster.os_driver]: reset service created
[os_driver-2] [INFO] [1742236410.358539867] [ouster.os_driver]: get_metadata service created
[os_driver-2] [INFO] [1742236410.358867690] [ouster.os_driver]: get_config service created
[os_driver-2] [INFO] [1742236410.359105433] [ouster.os_driver]: set_config service created
[INFO] [launch.user]: os_driver activating…
[ERROR] [os_driver-2]: process has died [pid 10117, exit code -11, cmd ‘/home/nikolas/ouster_ros2_ws/install/ouster_ros/lib/ouster_ros/os_driver --ros-args -r __node:=os_driver -r __ns:=/ouster --params-file /home/nikolas/ouster_ros2_ws/install/ouster_ros/share/ouster_ros/config/driver_params.yaml’].

and yes im able to ping it, ive tried running the command with the config containing the ip and the host name

also using the instructions from the ros2 branch which states that it is compatible with humbe which im running locally but would eventually like to run in a container on a pi 5

This is not sufficient to derive any use conclusions, my bad for not adding sufficient debug results.

Try enabling increasing the log level you can do so by including arguments=['--ros-args', '--log-level', 'debug'], into the os_driver node in driver.launch.py file.

This is unlikely to give much so you may want to rebuild the driver with Debug mode and then attach gdb to the driver by adding this line prefix=['xterm -fa "Monospace" -fs 14 -e gdb -ex run --args'], to os_driver.

It is likely you are facing a compatibility issue with one of the ROS packages (Eigen maybe). So if you don’t want to go with the above route you immediately skip ahead to use the supplied Dockerfile to build driver and then run within the container.

ok that probably makes more sense to do,

is there any set up that needs to be done for the docker file to work?

i tried just running docker build . and get the following error

Starting >>> ouster_ros
— stderr: ouster_ros
CMake Error at CMakeLists.txt:4 (include):
include could not find requested file:

DefaultBuildType

CMake Error at CMakeLists.txt:50 (find_package):
By not providing “FindOusterSDK.cmake” in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
“OusterSDK”, but CMake did not find one.

Could not find a package configuration file provided by “OusterSDK” with
any of the following names:

OusterSDKConfig.cmake
oustersdk-config.cmake

Add the installation prefix of “OusterSDK” to CMAKE_PREFIX_PATH or set
“OusterSDK_DIR” to a directory containing one of the above files. If
“OusterSDK” provides a separate development package or SDK, be sure it has
been installed.


Failed <<< ouster_ros [1.60s, exited with code 1]

Summary: 1 package finished [20.0s]
1 package failed: ouster_ros
1 package had stderr output: ouster_ros
The command ‘/bin/bash -c source /opt/ros/$ROS_DISTRO/setup.bash && colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=“-Wno-deprecated-declarations”’ returned a non-zero code: 1

tried the same in the master branch and get a similar error but this time it only complains about DefaultBuildType. seems like the ouster-sdk was added to the ouster-ros rep

Did you clone the repo with recursive? it seems ouster-sdk is missing.

There isn’t anything special about building the Dockerfile, you can find how the repo is built currently through GitHub Actions here: ouster-ros/.github/workflows/docker-image.yml at master · ouster-lidar/ouster-ros · GitHub

note the option → submodules: true which makes sure submodules are also cloned when building the image which I believe is why you are getting this problem.

git submodule update --init --recursive
yup used this to initiate them.

just gives me a cmake error everytime saying it couldnt find defaultBuildType

dont know how or why but deleting and re cloning the repo seems to have fixed that issue but getting a different cmake error now related to frame_ids

error is much longer so dont know the best way to show it, but its in the dropdown below. Im assuming other people have found success with building it on a raspi?

Click to expand error response

[ 9%] Building CXX object ouster-ros/ouster_example/ouster_client/CMakeFiles/ouster_client.dir/src/lidar_scan.cpp.o /var/lib/build/src/ouster-ros/ouster-sdk/ouster_client/src/lidar_scan.cpp: In member function ‘bool ouster::ScanBatcher::operator()(const uint8_t*, uint64_t, ouster::LidarScan&)’: /var/lib/build/src/ouster-ros/ouster-sdk/ouster_client/src/lidar_scan.cpp:781:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] } else if (ls.frame_id == ((f_id + 1) % (pf.max_frame_id + 1))) { ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /var/lib/build/src/ouster-ros/ouster-sdk/ouster_client/src/lidar_scan.cpp:784:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] } else if (ls.frame_id != f_id) { ~~~~~~~~~~~~^~~~~~~ [ 11%] Building CXX object ouster-ros/ouster_example/ouster_client/CMakeFiles/ouster_client.dir/src/image_processing.cpp.o [ 13%] Building CXX object ouster-ros/ouster_example/ouster_client/CMakeFiles/ouster_client.dir/src/udp_packet_source.cpp.o [ 15%] Building CXX object ouster-ros/ouster_example/ouster_client/CMakeFiles/ouster_client.dir/src/parsing.cpp.o [ 17%] Building CXX object ouster-ros/ouster_example/ouster_client/CMakeFiles/ouster_client.dir/src/sensor_http.cpp.o In file included from /var/lib/build/src/ouster-ros/ouster-sdk/ouster_client/src/sensor_http.cpp:3:0: /var/lib/build/src/ouster-ros/ouster-sdk/ouster_client/src/curl_client.h: In member function ‘std::__cxx11::string CurlClient::execute_get(const string&, int, int) const’: /var/lib/build/src/ouster-ros/ouster-sdk/ouster_client/src/curl_client.h:95:43: error: no matching function for call to ‘spdlog::logger::warn(std::__cxx11::basic_string, const string&, long int&, std::__cxx11::string&)’ url, http_code, buffer); ^ In file included from /var/lib/build/src/ouster-ros/ouster-sdk/ouster_client/src/logging.h:3:0, from /var/lib/build/src/ouster-ros/ouster-sdk/ouster_client/src/curl_client.h:8, from /var/lib/build/src/ouster-ros/ouster-sdk/ouster_client/src/sensor_http.cpp:3: /usr/include/spdlog/logger.h:43:53: note: candidate: template void spdlog::logger::warn(const char*, const Arg1&, const Args& ...) template void warn(const char* fmt, const Arg1&, const Args&... args); ^~~~ /usr/include/spdlog/logger.h:43:53: note: template argument deduction/substitution failed: In file included from /var/lib/build/src/ouster-ros/ouster-sdk/ouster_client/src/sensor_http.cpp:3:0: /var/lib/build/src/ouster-ros/ouster-sdk/ouster_client/src/curl_client.h:93:54: note: cannot convert ‘std::operator+(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const _CharT*) [with _CharT = char; _Traits = std::char_traits; _Alloc = std::allocator](((const char*)"[{}] with the code: [{}] - and return: {}"))’ (type ‘std::__cxx11::basic_string’) to type ‘const char*’ std::string("Re-attempting CurlClient::execute_get after " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "failure for url: ") + ~~~~~~~~~~~~~~~~~~~~~^ "[{}] with the code: [{}] - and return: {}", ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /var/lib/build/src/ouster-ros/ouster-sdk/ouster_client/src/logging.h:3:0, from /var/lib/build/src/ouster-ros/ouster-sdk/ouster_client/src/curl_client.h:8, from /var/lib/build/src/ouster-ros/ouster-sdk/ouster_client/src/sensor_http.cpp:3: /usr/include/spdlog/logger.h:63:32: note: candidate: template void spdlog::logger::warn(const T&) template void warn(const T&); ^~~~ /usr/include/spdlog/logger.h:63:32: note: template argument deduction/substitution failed: In file included from /var/lib/build/src/ouster-ros/ouster-sdk/ouster_client/src/sensor_http.cpp:3:0: /var/lib/build/src/ouster-ros/ouster-sdk/ouster_client/src/curl_client.h:95:43: note: candidate expects 1 argument, 4 provided url, http_code, buffer); ^ make[2]: *** [ouster-ros/ouster_example/ouster_client/CMakeFiles/ouster_client.dir/src/sensor_http.cpp.o] Error 1 ouster-ros/ouster_example/ouster_client/CMakeFiles/ouster_client.dir/build.make:254: recipe for target 'ouster-ros/ouster_example/ouster_client/CMakeFiles/ouster_client.dir/src/sensor_http.cpp.o' failed make[1]: *** [ouster-ros/ouster_example/ouster_client/CMakeFiles/ouster_client.dir/all] Error 2 CMakeFiles/Makefile2:3303: recipe for target 'ouster-ros/ouster_example/ouster_client/CMakeFiles/ouster_client.dir/all' failed make: *** [all] Error 2 Makefile:162: recipe for target 'all' failed Base path: /var/lib/build Source space: /var/lib/build/src Build space: /var/lib/build/build Devel space: /var/lib/build/devel Install space: /var/lib/build/install Creating symlink "/var/lib/build/src/CMakeLists.txt" pointing to "/opt/ros/melodic/share/catkin/cmake/toplevel.cmake" #### #### Running command: "cmake /var/lib/build/src -DCMAKE_BUILD_TYPE=Release -DCATKIN_DEVEL_PREFIX=/var/lib/build/devel -DCMAKE_INSTALL_PREFIX=/var/lib/build/install -G Unix Makefiles" in "/var/lib/build/build" #### #### #### Running command: "make -j4 -l4" in "/var/lib/build/build" #### Invoking "make -j4 -l4" failed The command '/bin/bash -c /opt/ros/$ROS_DISTRO/env.sh catkin_make -DCMAKE_BUILD_TYPE=Release && /opt/ros/$ROS_DISTRO/env.sh catkin_make install' returned a non-zero code: 1

</p>

also tried to build on my laptop and i get the same error

deleted irrelevant post

The frame_id is merely a warning, so you can ignore that,

To address the actual compile error please refer to this this comment.

so if im understanding this correctly i should just change the first line of the dockerfile to be

ARG ROS_DISTRO=noetic

and if thats the case am is master not the branch I should be in?

docker build . --build-arg ROS_DISTRO=NOETIC --file Dockerfile --tag ouster-ros-noetic

ah very cool that seems to have worked or at least the container builds, are there any instructions on how to interact with the container? or does it just create and publish the ros topics automatically on start up?

Edit
I got it up and running and it seems like it has created the topics correctly.
Id like to use the ros2 branch however, is there any aspects to that branch that i need to change in order to get the image to build? like tht ros distro change for the master branch

It is about the same steps, just make sure you use the Dockerfile from the ros2 branch and then set the ROS_DISTRO=humble or later.

just to update anyone that reads this later, humble didnt build but jazzy did, also had to set viz default value to false and now im able to build the image and run the container.

Im assuming theres a way to pass in sensor launch args when running the container?

You should be able to build on Humble → last build status.

Im assuming theres a way to pass in sensor launch args when running the container?

Yes, here is an example

docker run \
    -v custom_params.yml:/var/lib/build/src/ouster-ros/ouster-ros/config/driver_params.yaml  \
    ouster_ros_jazzy_docker_image \
    ros2 launch ouster_ros driver.launch.py viz:=false

Note, when working with docker usually the hostname doesn’t work and instead you can use the sensor ip address.

was able to get it to build in humble,

noticed that the scan topic requires a me to change the QoS type when adding it to rviz. Is there any other setup required to utilize the topics?

im attempting to use the sensor with the slam_toolbox package

You rviz should match the topic reliability mode (BEST EFFORT vs RELIABLE) for it to render within RVIZ.

I am not sure, I remember few customer had few issues with the timestamps when working with slam_toolbox but this is might have been with older versions of slam_toolbox.

is there a way to decrease the publish frequency? seems like the issue im having right now is that the que fills up to fast

I think im also seeing a similar time stamp issue now, do you know how these other customers were able to solve it?

was most definitely a time stamp issue, ended up just writing a script to alter the scan message to match the current clock reading.

was also curious, when looking at the /ouster/scan topic i see the scan is multi colored. What does the color of the scan indicate?