ouster-lidar / ouster-ros Goto Github PK
View Code? Open in Web Editor NEWOfficial ROS drivers for Ouster sensors (OS0, OS1, OS2, OSDome)
Home Page: https://ouster.com
License: Other
Official ROS drivers for Ouster sensors (OS0, OS1, OS2, OSDome)
Home Page: https://ouster.com
License: Other
I want the Ouster to have a destaggered (organized) Point Cloud published. As per the documentation located at https://static.ouster.dev/sdk-docs/reference/lidar-scan.html#staggering-and-destaggering, there is a function available for destaggering.
I know that the destagger function must be used in os_ros.cpp before line 230.
But it still doesn't work. I destaggered the range before line 230 in ouster-ros/src/os_ros.cpp.
Eigen::Ref<const ouster::img_t<uint32_t>> refrange = range;
range = ouster::destagger(refrange,pixel_shift_by_row);
But the published point cloud is still staggered. Is it because a staggered range is a timestep X scanline matrix and a destaggered range is an azimuth angle X scanline matrix. However, in the function destagger(const Eigen::Ref<const img_t>& img, const std::vector& pixel_shift_by_row, bool inverse) the size of the return matrix is set to the size of img.
As I understand it the return matrix is a matrix with the size timestep X scanline and not a destaggerd matrix with the size of azimuth angle X scanline matrix .
Or is the Ouster azimuth angle number equal to the number of timesteps per scan?
And what is the reason that only the range must be destaggerd and not also the reflectivity?
Hi,
I am trying to run the driver with a OS1-16 (FW 2.4) lidar (Part number 840-101855-02):
roslaunch ouster_ros sensor.launch sensor_hostname:=os1-99XXXX.local
Unfortunately the driver crashes:
/opt/ros/noetic/lib/nodelet/nodelet: line 1: 44277 Segmentation fault (core dumped) $0 $@
I tried with another OS1-16 (FW 2.0), same problem.
When I use the OusterStudio, I can see the data and everything seems to work well.
If I remove the cloud nodelet from common.launch
(removing line 9 to 17), I can see the topics /ouster/lidar_packets
and /ouster/imu_packets
at 640Hz and 100Hz, respectively.
Putting back the nodelet in the launch file, and inserting prints in the code, it seems that the error is coming from the call to scan_to_cloud
in os_cloud_nodelet.cpp
(see below for the code modifications and the whole print)
Do you know what could cause this and how to solve it ?
Thanks
Cedric
Code modification for prints
os_cloud_nodelet.cpp
from line 107
void convert_scan_to_pointcloud_publish(std::chrono::nanoseconds scan_ts, const ros::Time& msg_ts) {
for (int i = 0; i < n_returns; ++i) {
NODELET_INFO("BEFORE SCAN TO CLOUD");
scan_to_cloud(xyz_lut, scan_ts, ls, cloud, i);
NODELET_INFO("AFTER SCAN TO CLOUD");
sensor_msgs::PointCloud2 pc =
ouster_ros::cloud_to_cloud_msg(cloud, msg_ts, sensor_frame);
os_ros.cpp
from line 127
void scan_to_cloud(const ouster::XYZLut& xyz_lut,
ouster::LidarScan::ts_t scan_ts, const ouster::LidarScan& ls,
ouster_ros::Cloud& cloud, int return_index) {
std::cout << "START SCAN TO CLOUD" << std::endl;
bool second = (return_index == 1);
cloud.resize(ls.w * ls.h);
ouster::img_t<uint16_t> near_ir = get_or_fill_zero<uint16_t>(
suitable_return(sensor::ChanField::NEAR_IR, second), ls);
ouster::img_t<uint32_t> range = get_or_fill_zero<uint32_t>(
suitable_return(sensor::ChanField::RANGE, second), ls);
ouster::img_t<uint32_t> signal = get_or_fill_zero<uint32_t>(
suitable_return(sensor::ChanField::SIGNAL, second), ls);
ouster::img_t<uint16_t> reflectivity = get_or_fill_zero<uint16_t>(
suitable_return(sensor::ChanField::REFLECTIVITY, second), ls);
auto points = ouster::cartesian(range, xyz_lut);
auto timestamp = ls.timestamp();
for (auto u = 0; u < ls.h; u++) {
for (auto v = 0; v < ls.w; v++) {
const auto xyz = points.row(u * ls.w + v);
const auto ts =
(std::chrono::nanoseconds(timestamp[v]) - scan_ts).count();
cloud(v, u) = ouster_ros::Point{
{{static_cast<float>(xyz(0)), static_cast<float>(xyz(1)),
static_cast<float>(xyz(2)), 1.0f}},
static_cast<float>(signal(u, v)),
static_cast<uint32_t>(ts),
static_cast<uint16_t>(reflectivity(u, v)),
static_cast<uint8_t>(u),
static_cast<uint16_t>(near_ir(u, v)),
static_cast<uint32_t>(range(u, v))};
}
}
std::cout << "END SCAN TO CLOUD" << std::endl;
}
ced@ced-notebook:~/catkin_ws$ roslaunch ouster_ros sensor.launch sensor_hostname:=os1-991924000182.local
... logging to /home/ced/.ros/log/da7c9372-7b47-11ed-81e5-af45f6f59e16/roslaunch-ced-notebook-46887.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://ced-notebook:36061/
SUMMARY
========
PARAMETERS
* /ouster/os_cloud_node/tf_prefix:
* /ouster/os_cloud_node/timestamp_mode:
* /ouster/os_node/imu_port: 0
* /ouster/os_node/lidar_mode:
* /ouster/os_node/lidar_port: 0
* /ouster/os_node/metadata:
* /ouster/os_node/sensor_hostname: os1-991924000182....
* /ouster/os_node/timestamp_mode:
* /ouster/os_node/udp_dest:
* /ouster/os_node/udp_profile_lidar:
* /rosdistro: noetic
* /rosversion: 1.15.15
NODES
/
relay_imu (topic_tools/relay)
relay_lidar (topic_tools/relay)
rviz (rviz/rviz)
/ouster/
img_node (nodelet/nodelet)
os_cloud_node (nodelet/nodelet)
os_node (nodelet/nodelet)
os_nodelet_mgr (nodelet/nodelet)
ROS_MASTER_URI=http://localhost:11311
process[ouster/os_nodelet_mgr-1]: started with pid [46901]
process[ouster/os_node-2]: started with pid [46903]
process[ouster/os_cloud_node-3]: started with pid [46905]
process[ouster/img_node-4]: started with pid [46907]
process[rviz-5]: started with pid [46909]
process[relay_lidar-6]: started with pid [46911]
process[relay_imu-7]: started with pid [46912]
[ INFO] [1671004161.300918715]: Initializing nodelet with 16 worker threads.
[ INFO] [1671004162.292009813]: Loading nodelet /ouster/os_node of type nodelets_os/OusterSensor to manager os_nodelet_mgr with the following remappings:
[ WARN] [1671004162.322284296]: lidar port set to zero, the client will assign a random port number!
[ WARN] [1671004162.322318282]: imu port set to zero, the client will assign a random port number!
[ INFO] [1671004162.322330235]: Will use automatic UDP destination
[ WARN] [1671004162.523428897]: Sensor os1-991924000182.local configured successfully
[ INFO] [1671004162.523496398]: Starting sensor os1-991924000182.local initialization...
[2022-12-14 18:49:22.523] [ouster::sensor] [info] initializing sensor: os1-991924000182.local with ports: 0/0
[ INFO] [1671004163.304245202]: Loading nodelet /ouster/os_cloud_node of type nodelets_os/OusterCloud to manager os_nodelet_mgr with the following remappings:
[ INFO] [1671004163.315182665]: Loading nodelet /ouster/img_node of type nodelets_os/OusterImage to manager os_nodelet_mgr with the following remappings:
[ INFO] [1671004164.462140984]: rviz version 1.14.19
[ INFO] [1671004164.462257601]: compiled against Qt version 5.12.8
[ INFO] [1671004164.462290375]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1671004164.487389621]: Forcing OpenGl version 0.
[ INFO] [1671004164.834589265]: Stereo is NOT SUPPORTED
[ INFO] [1671004164.834710320]: OpenGL device: AMD RENOIR (DRM 3.42.0, 5.15.0-56-generic, LLVM 12.0.0)
[ INFO] [1671004164.834747552]: OpenGl version: 4.6 (GLSL 4.6) limited to GLSL 1.4 on Mesa system.
[ WARN] [1671004174.663111320]: Client version: 0.7.1b1+279c9fb-release
[ WARN] [1671004174.663188780]: Using lidar_mode: 1024x10
[ WARN] [1671004174.663212827]: OS-1-16-B13 sn: 991924000182 firmware rev: v2.4.0
[ WARN] [1671004174.664660523]: No metadata file was specified, using: os1-991924000182-metadata.json
[ INFO] [1671004174.671251261]: Wrote metadata to os1-991924000182-metadata.json
[ INFO] [1671004174.672399154]: get_metadata service created
[ INFO] [1671004174.673270749]: get_config service created
[ INFO] [1671004174.674070484]: set_config service created
[ INFO] [1671004174.686210956]: OusterCloud: retrieved sensor metadata!
[ INFO] [1671004174.686743341]: Profile has 1 return(s)
[ INFO] [1671004174.703401891]: OusterImage: retrieved sensor metadata!
[ INFO] [1671004174.779948376]: BEFORE SCAN TO CLOUD
START SCAN TO CLOUD
END SCAN TO CLOUD
/opt/ros/noetic/lib/nodelet/nodelet: line 1: 46927 Segmentation fault (core dumped) $0 $@
================================================================================REQUIRED process [ouster/os_nodelet_mgr-1] has died!
process has died [pid 46901, exit code 139, cmd bash -c sleep 2; $0 $@ /opt/ros/noetic/lib/nodelet/nodelet manager __name:=os_nodelet_mgr __log:=/home/ced/.ros/log/da7c9372-7b47-11ed-81e5-af45f6f59e16/ouster-os_nodelet_mgr-1.log].
log file: /home/ced/.ros/log/da7c9372-7b47-11ed-81e5-af45f6f59e16/ouster-os_nodelet_mgr-1*.log
Initiating shutdown!
================================================================================
[relay_imu-7] killing on exit
[relay_lidar-6] killing on exit
[rviz-5] killing on exit
[ouster/img_node-4] killing on exit
[ouster/os_cloud_node-3] killing on exit
[ouster/os_node-2] killing on exit
[ouster/os_nodelet_mgr-1] killing on exit
[ INFO] [1671004176.145572739]: Unloading nodelet /ouster/img_node from manager os_nodelet_mgr
[ INFO] [1671004176.145744433]: Unloading nodelet /ouster/os_cloud_node from manager os_nodelet_mgr
[ INFO] [1671004176.145951796]: Unloading nodelet /ouster/os_node from manager os_nodelet_mgr
[ INFO] [1671004176.146997671]: waitForService: Service [/ouster/os_nodelet_mgr/unload_nodelet] could not connect to host [ced-notebook:43405], waiting...
[ WARN] [1671004176.147052026]: Couldn't find service os_nodelet_mgr/unload_nodelet, perhaps the manager is already shut down
[ INFO] [1671004176.147513684]: waitForService: Service [/ouster/os_nodelet_mgr/unload_nodelet] could not connect to host [ced-notebook:43405], waiting...
[ WARN] [1671004176.147569322]: Couldn't find service os_nodelet_mgr/unload_nodelet, perhaps the manager is already shut down
[ INFO] [1671004176.147890167]: waitForService: Service [/ouster/os_nodelet_mgr/unload_nodelet] could not connect to host [ced-notebook:43405], waiting...
[ WARN] [1671004176.147934222]: Couldn't find service os_nodelet_mgr/unload_nodelet, perhaps the manager is already shut down
shutting down processing monitor...
... shutting down processing monitor complete
done
I'm trying to connect to an Ouster OS1-128 (firmware v2.4.0) with the ouster_ros node.
With the Ouster Studio I can connect correctly to the sensor and visualize the point clouds correctly.
The Ouster-OS1-128 is configured with an fixed IP.
When I rune the following command on the same machine, the communication fails.
Any idea?
Ouster-Ros Node
roslaunch ouster_ros sensor.launch sensor_hostname:=192.0.2.100 udp_dest:=192.0.2.10 lidar_port:=7502 imu_port:=7503 viz:=false
Log
SUMMARY
========
PARAMETERS
* /ouster/os_cloud_node/tf_prefix:
* /ouster/os_cloud_node/timestamp_mode:
* /ouster/os_node/imu_port: 7503
* /ouster/os_node/lidar_mode:
* /ouster/os_node/lidar_port: 7502
* /ouster/os_node/metadata:
* /ouster/os_node/sensor_hostname: 192.0.2.100
* /ouster/os_node/timestamp_mode:
* /ouster/os_node/udp_dest: 192.0.2.10
* /ouster/os_node/udp_profile_lidar:
* /rosdistro: noetic
* /rosversion: 1.15.15
NODES
/
relay_imu (topic_tools/relay)
relay_lidar (topic_tools/relay)
/ouster/
img_node (nodelet/nodelet)
os_cloud_node (nodelet/nodelet)
os_node (nodelet/nodelet)
os_nodelet_mgr (nodelet/nodelet)
ROS_MASTER_URI=http://localhost:11311
process[ouster/os_nodelet_mgr-1]: started with pid [5789]
process[ouster/os_node-2]: started with pid [5791]
process[ouster/os_cloud_node-3]: started with pid [5793]
process[ouster/img_node-4]: started with pid [5795]
process[relay_lidar-5]: started with pid [5797]
process[relay_imu-6]: started with pid [5798]
[ INFO] [1674827893.786712145]: Initializing nodelet with 8 worker threads.
[ INFO] [1674827894.766520780]: Loading nodelet /ouster/os_node of type nodelets_os/OusterSensor to manager os_nodelet_mgr with the following remappings:
[ INFO] [1674827894.797790246]: Will send UDP data to 192.0.2.10
[ERROR] [1674827894.799617669]: Error setting config: CurlClient::execute_get failed for the url: [http://192.0.2.100/api/v1/system/firmware] with the error message: Couldn't connect to server
[FATAL] [1674827894.799853300]: Failed to load nodelet '/ouster/os_node` of type `nodelets_os/OusterSensor` to manager `os_nodelet_mgr'
================================================================================REQUIRED process [ouster/os_node-2] has died!
process has died [pid 5791, exit code 255, cmd bash -c sleep 3; $0 $@ /opt/ros/noetic/lib/nodelet/nodelet load nodelets_os/OusterSensor os_nodelet_mgr __name:=os_node __log:=/home/ae/.ros/log/3344174c-9e42-11ed-84fd-553d1d5567c9/ouster-os_node-2.log].
log file: /home/ae/.ros/log/3344174c-9e42-11ed-84fd-553d1d5567c9/ouster-os_node-2*.log
Initiating shutdown!
================================================================================
[relay_imu-6] killing on exit
[relay_lidar-5] killing on exit
[ouster/img_node-4] killing on exit
[ouster/os_cloud_node-3] killing on exit
[ouster/os_node-2] killing on exit
[ouster/os_nodelet_mgr-1] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done
Hi, I wonder if it really good practice to have separate msg and srv pkgs in project. As I see, the messages and services are only used within ouster-driver. That makes me think, that msg and srv can be defined in the ouster-driver pkg. That way we can reduce count of pkgs from three to two (lets not taking into account sdk submodule). If current structure of projects was not made for purpose, I can help to combine msg and srv into ouster-ros pkg
Hello,
We are currently syncing our sensor with the default-relaxed profile.
We would like to switch to the automotive-slave profile, but we can't get it to sync properly.
/api/v1/time/ptp shows the profile is correctly set to automotive-slave , but gm_present is false.
Our ptp master client is ptp4l version 3.1.1 and we added the following config to the default ptp config file (inspired from https://github.com/richardcochran/linuxptp/blob/v3.1.1/configs/automotive-master.cfg)
BMCA noop
masterOnly 1
inhibit_announce 1
asCapable true
inhibit_delay_req 1
Does anyone have a working ptp4l config file with the automotive profile? Thanks!
Is there any way to read ouster .pcap files from the ros node ?
I tried to build the ouster ros docker container using the following command.
docker build -t ouster_test .
There were two error messages, ultimately leading to it to fail to build.
`CMake Error at ouster-ros/CMakeLists.txt:4 (include):
include could not find load file:
DefaultBuildType`
CMake Error at /opt/ros/melodic/share/catkin/cmake/catkin_package.cmake:305 (message): catkin_package() include dir 'ouster-sdk/ouster_client/include' does not exist relative to '/var/lib/build/src/ouster-ros' Call Stack (most recent call first): /opt/ros/melodic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package) ouster-ros/CMakeLists.txt:42 (catkin_package)
How can this be fixed?
Here was the full output.
`Sending build context to Docker daemon 351.7kB
Step 1/18 : ARG ROS_DISTRO=melodic
Step 2/18 : FROM ros:${ROS_DISTRO}-ros-core AS build-env
---> 367edf3bdb41
Step 3/18 : ENV DEBIAN_FRONTEND=noninteractive BUILD_HOME=/var/lib/build OUSTER_ROS_PATH=/opt/catkin_ws/src/ouster-ros
---> Using cache
---> a064e66a0432
Step 4/18 : RUN set -xue && [ $ROS_DISTRO = "noetic" ] && PY=python3 || PY=python && echo 'APT::Install-Recommends "0";' > /etc/apt/apt.conf.d/01norecommend && apt-get update && apt-get install -y build-essential cmake fakeroot dpkg-dev debhelper $PY-rosdep $PY-rospkg $PY-bloom
---> Using cache
---> 93917e1ba8ae
Step 5/18 : RUN apt-get install -y curl libcurl4-openssl-dev
---> Using cache
---> 7388d042f63f
Step 6/18 : ARG BUILD_UID=1000
---> Using cache
---> 66b3c9eed365
Step 7/18 : ARG BUILD_GID=${BUILD_UID}
---> Using cache
---> 8ae466e24401
Step 8/18 : RUN set -xe && groupadd -o -g ${BUILD_GID} build && useradd -o -u ${BUILD_UID} -d ${BUILD_HOME} -rm -s /bin/bash -g build build
---> Using cache
---> ca256220f449
Step 9/18 : COPY --chown=build:build package.xml $OUSTER_ROS_PATH/package.xml
---> Using cache
---> f9dc3963396e
Step 10/18 : RUN set -xe && apt-get update && rosdep init && rosdep update --rosdistro=$ROS_DISTRO && rosdep install -y --from-paths $OUSTER_ROS_PATH
---> Using cache
---> 92ca52eef11f
Step 11/18 : COPY --chown=build:build . $OUSTER_ROS_PATH
---> Using cache
---> b6bba3f906fd
Step 12/18 : USER build:build
---> Using cache
---> e77161345da7
Step 13/18 : WORKDIR ${BUILD_HOME}
---> Using cache
---> 61b9b8928e86
Step 14/18 : RUN set -xe && mkdir src && cp -R $OUSTER_ROS_PATH ./src
---> Using cache
---> 4270a35a5bd4
Step 15/18 : FROM build-env
---> 4270a35a5bd4
Step 16/18 : ENV CXXFLAGS="-Werror -Wno-deprecated-declarations"
---> Using cache
---> afef28b2e069
Step 17/18 : RUN /opt/ros/$ROS_DISTRO/env.sh catkin_make -DCMAKE_BUILD_TYPE=Release && /opt/ros/$ROS_DISTRO/env.sh catkin_make install
---> Running in 92f3ef7b90a7
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using CATKIN_DEVEL_PREFIX: /var/lib/build/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/melodic
-- This workspace overlays: /opt/ros/melodic
-- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.17", minimum required is "2")
-- Using PYTHON_EXECUTABLE: /usr/bin/python2
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /var/lib/build/build/test_results
-- Found gtest sources under '/usr/src/googletest': gtests will be built
-- Found gmock sources under '/usr/src/googletest': gmock will be built
-- Found PythonInterp: /usr/bin/python2 (found version "2.7.17")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.29
-- BUILD_SHARED_LIBS is on
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~ traversing 1 packages in topological order:
-- ~~ - ouster_ros
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'ouster_ros'
-- ==> add_subdirectory(ouster-ros)
CMake Error at ouster-ros/CMakeLists.txt:4 (include):
include could not find load file:
DefaultBuildType
-- Checking for module 'eigen3'
-- Found eigen3, version 3.3.4
-- Found eigen: /usr/include/eigen3
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- system
-- filesystem
-- thread
-- date_time
-- iostreams
-- serialization
-- chrono
-- atomic
-- regex
-- looking for PCL_COMMON
-- Found PCL_COMMON: /usr/lib/x86_64-linux-gnu/libpcl_common.so
-- Found PCL: /usr/lib/x86_64-linux-gnu/libboost_system.so;/usr/lib/x86_64-linux-gnu/libboost_filesystem.so;/usr/lib/x86_64-linux-gnu/libboost_thread.so;/usr/lib/x86_64-linux-gnu/libboost_date_time.so;/usr/lib/x86_64-linux-gnu/libboost_iostreams.so;/usr/lib/x86_64-linux-gnu/libboost_serialization.so;/usr/lib/x86_64-linux-gnu/libboost_chrono.so;/usr/lib/x86_64-linux-gnu/libboost_atomic.so;/usr/lib/x86_64-linux-gnu/libboost_regex.so;/usr/lib/x86_64-linux-gnu/libpthread.so;optimized;/usr/lib/x86_64-linux-gnu/libpcl_common.so;debug;/usr/lib/x86_64-linux-gnu/libpcl_common.so;/usr/lib/x86_64-linux-gnu/libboost_system.so;/usr/lib/x86_64-linux-gnu/libboost_filesystem.so;/usr/lib/x86_64-linux-gnu/libboost_thread.so;/usr/lib/x86_64-linux-gnu/libboost_date_time.so;/usr/lib/x86_64-linux-gnu/libboost_iostreams.so;/usr/lib/x86_64-linux-gnu/libboost_serialization.so;/usr/lib/x86_64-linux-gnu/libboost_chrono.so;/usr/lib/x86_64-linux-gnu/libboost_atomic.so;/usr/lib/x86_64-linux-gnu/libboost_regex.so;/usr/lib/x86_64-linux-gnu/libpthread.so
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.58.0")
-- Boost version: 1.65.1
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- ouster_ros: 1 messages, 3 services
CMake Error at /opt/ros/melodic/share/catkin/cmake/catkin_package.cmake:305 (message):
catkin_package() include dir 'ouster-sdk/ouster_client/include' does not
exist relative to '/var/lib/build/src/ouster-ros'
Call Stack (most recent call first):
/opt/ros/melodic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
ouster-ros/CMakeLists.txt:42 (catkin_package)
-- Configuring incomplete, errors occurred!
See also "/var/lib/build/build/CMakeFiles/CMakeOutput.log".
See also "/var/lib/build/build/CMakeFiles/CMakeError.log".
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"
Invoking "cmake" failed
The command '/bin/sh -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`
Hello,
I'm trying to record data provided by a lidar OS1-64 and by a basler insdustrial camera on a Jetson Xavier board. For that, I use the two ros packages ouster_ros and pylon_camera. These two sensors are connected via Ethernet and each camera uses a specific IP address (the thoughput on the GiE is not saturated ~ 50%).
When I use OS1-64 alone, I get :
But when I use the two sensors together, all is ok for the camera but the messages falling down to 366 for the /os_node/lidar_packet... There are clairly a conflict between this two packages and ethernet configuration but I don't understand why ? Especially since with another lidar and package (hesai), I don't have this problem.
I seen similary issue in the history github "Messages get dropped [ros melodic + industrial camera] ouster-lidar/ouster_example#225" but there is no solution.
Thanks for your help.
How can we combine the changes that we've made in ROS2 to enable different time sources into the ouster_client so that we can make migration between firmware version easier
Hi everyone,
I would like to revisit this issue ouster-lidar/ouster_example#205 from two years ago to get some information on you plans about ROS2.
More and more applications and drivers are shifting to ROS2 which makes it increasingly frustrating to work with ROS1 packages.
I am aware that there is a ROS2 driver by the community (https://github.com/ros-drivers/ros2_ouster_drivers), but it still lacks some key features such as the Dual Return mode.
From Ouster distribution we got the information, that a official ROS2 driver is in the works and could potentially be released in the first half of 2023. Here on github it more seems like you try to cooperate with the community driver.
Could elaborate a bit on what to expect from the upcoming months as a user. It is very time consuming to implement things like ROS bridge or switching Distros, so this could help us a lot with planing on where to put resources.
Thanks in advance!
I have an OS1-Rev7 sensor. We plan to use time sync via NMEA messaging the ouster guide mentions that we can check the sync status on the sensor via TCP command "get_time_info". https://static.ouster.dev/sensor-docs/gps_guide/gps_guide.html
I was wondering how it can be achieved through ros interface. Is there any ROS service which can give this info?
Hi everyone:
I am sorry that I am fresh and I would like to ask that how can I change the format of ouster into Velodyne like format. I found the code here:
void ouster_driver::OS1::convert2XYZIR | ( | const CloudOS1 & | in,
| | CloudOS1XYZIR & | out
| )
but I did not know which code and which part of the code should I change, thx!
As i mentioned in this comment we use some other features for our work with ouster ros driver.
The main feature is os_cloud_merger_nodelet
. This nodelet can merge clouds from several os_cloud_nodelets with standart ROS ApproximatePolicy Synchronizer. Also we can transform this cloud to preferred frame and use box filter on it. We use it on our robot with 2 ouster sensors on it, may be other users with multi-lidars setup need something like this
I can make a PR if you interested in this functionality.
I would like to pass an Ouster LiDAR Sample Data file in pcap file format to the driver and receive a bag file or a pcl file. How can I do that?
Hello,
I have an ouster (OS0) in a fixed position, I would like to rotate the orientation, so the X-axis is pointing 90 degrees to the left (like below)
I am a bit confused by the manual on how to do so.
Do I just edit the data_test.json file from
{ "lidar_to_sensor_transform": [-1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1, 36.180, 0, 0, 0, 1] }
to
{ "lidar_to_sensor_transform": [0, -1, 0, 0, 1, 0 , 0, 0, 0, 0, 1, 36.180, 0, 0, 0, 1] }
The above would set the rotation around the z-axis to 90 deg ccw.
Would this be correct?
Hi,
I'm using a RPi 4B 8Gb to receive data from an OS1-32. For the first few seconds I receive the whole pointcloud but then there is some black strips and I only receive the closest points on the pointcloud.
I've noticed that this depends of the lidar mode. It seems to depend of the number of points received. In 512x10 everything is fine but this problem happens when using 1024x10, 1024x20, 2048x10.
May be this is coming from the processing power, this is the %CPU it got with top command:
I've checked with my computer instead of the RPi and everything is fine in all lidar modes.
of type
nodelets_os/OusterCloudto manager
os_nodelet_mgr'of type
nodelets_os/OusterImageto manager
os_nodelet_mgr'board:nvidia jetson tx2
os:ubuntu 18.04
ros melodic
Hi, thank you for your work with ouster-ros.
I am using ouster OS-0-64 lidar to run my LIO algorithm. And I choose to use imu 3dm-gx5-25 instead of ouster imu. But when I run ouster.launch. The topic /os_cloud_node/points time stamp is not ros time. While my imu data time stamp is ros time. So I need to sync my lidar data and imu data by ros time. But I don't know how to get the lidar topic data with ros time.
Could you give me some advice about how to change the driver file. So I can get the points data with ros time.
Thank you.
If releasing ROS drivers, we need to select specific ouster_client headers to use. When multiple firmware versions are compatible with the same ouster_client, then we can support a range of firmwares within a same ROS distribution.
However when changes are needing to be made to ouster_client that make existing supported firmware versions within that distribution no longer compatible, then the new changes / firmwares need to be released in an upcoming ROS distribution.
Ex.
ouster_client before november supported all 1.x versions and we released the drivers for Kinetic / Melodic / Foxy. All 1.x's are supported. However since the ouster_client changed and no longer supports 1.x versions, that change can only be made in future ROS distribution releases (e.g. Noetic, Galactic) and those distributions will then only support 2.x+ firmware versions.
So we need to come up with a strategy / a table of what distributions are going to support what version ranges and plan out ouster_client
better so that in the future firmware releases don't break older versions, if possible.
ouster-ros/src/os_sensor_nodelet.cpp
Line 155 in 4fb044d
I want the Ouster to have a destaggered (organized) Point Cloud published. As per the documentation located at https://static.ouster.dev/sdk-docs/reference/lidar-scan.html#staggering-and-destaggering, there is a function available for destaggering. However, I am unsure of where to implement it within the Ouster in order to obtain a destaggered point cloud.
My assumption is that the destaggering function needs to be called from within the scan_to_cloud_f function of the os_ros. But I am uncertain of the exact location within that function where the destaggering function should be integrated.
My guess is that it needs to be called inside the scan_to_cloud_f function of os_ros. But where exactly ?
I know the documentation describes the situation with frames quite extensively, but generally people expect that raw data from a sensor are published in the acquisition frame. That would be os_lidar
. But the example ROS node transforms and publishes the data in os_sensor
, which is rotated and shifted in Z.
One possible consequence of misinterpreting the frames is usage of the scans in a raytracing pipeline. These pipelines usually take the frame_id of the incoming scan and cast rays from the origin of the given frame. But if the frame is os_sensor
, the cast rays are invalid because the origin is shifted lower than the real optical origin of the rays.
I thus suggest changing the data frame to os_lidar
. Users who do not care about the origin of observation should not be affected (except receiving the data in a different frame), and users interested in the observation point would get the expected data by default.
I have multiple Ouster OS1-32D and OS0-64D devices. I want to receive multicast data from them on several computers, and publish point clouds using the ROS driver. Does the driver currently support multicast traffic?
I have configured the udp_dest parameter on my lidars, and I can see multicast traffic through the wireshark, but the driver does not publish messages. Are there any instructions for running the ROS driver via multicast messages?
I am attempting to use PTP to synchronize the OS1-64-U LiDAR with my Ubuntu 20.04 computer running ROS Noetic. I have been following this documentation (https://static.ouster.dev/sensor-docs/image_route1/image_route2/appendix/ptp-quickstart.html#), and also set timestamp_mode
to TIME_FROM_PTP_1588
in the sensor.launch
ROS launch file here https://github.com/ouster-lidar/ouster-ros/blob/master/launch/sensor.launch#L22; but that has not worked so far.
My system does have a GMR1000 grandmaster clock; however, I have temporarily disconnected it for simplicity, as I just want synchronization between the LiDAR and my computer for now. I have verified that the eno1
and enp2s0
ethernet ports/interfaces on my computer do have hardware and software support for PTP.
Before I provide details on my ptp4l
, phc2sys
, and/or phc2shm
configuration(s), I want to clarify if I missed an important preliminary step - do I need to configure the LiDAR's timestamp_mode
to TIME_FROM_PTP_1588
at the firmware level using TCP first? There seems to be some mention of this detail in https://static.ouster.dev/sensor-docs/image_route1/image_route2/time_sync/time-sync.html#time-synchronization and ouster-lidar/ouster_example#78 (comment). Or, does simply setting timestamp_mode
to TIME_FROM_PTP_1588
in sensor.launch
configure the firmware implicitly already?
Also, if this question is better suited for Ouster customer support, please let me know and I can make a ticket in https://ouster.atlassian.net/servicedesk/customer/portal/8/group/22/create/86 instead. Thanks!
Hello,
Thanks for the Ouster driver, it's works well! I would like to make one request, which is to my knowlesge, the user does not have any control over what fields the Ouster publishes. The driver will always publish X, Y, Z, intensity, t, reflectivity, ring, noise, and range. This is a lot of data that to most users is not necessary. In my specific application, I want XYZI because I am fusing the point cloud with XYZI point clouds from other depth sensors onboard a robot. Therefore, having the same PointType is convenient. I can envision other folks wanting to disable fields they don't need to reduce the amount of computational/communications resources required to run the driver.
In order to resolve this issue, I had to make changes to the driver source code (ouster_ros/include/ouster_ros/point_os1.h), which I would prefer to not do.
Thanks!
Gene
Hi, @kairenw
I came across this package by KumarRobotics.
It has very low latency (<0.2ms) compared to ouster_example (>3ms).
can we incorporate it into this standard driver package
thanks
This code and some other similar instances
Lines 151 to 157 in b5393ca
makes an assumption about monotonically increasing timestamps in the lidar packets. However, that is not guaranteed.
For example, we discipline Ouster clock via PTP automotive profile which can move the clock pretty fast, including discrete time jumps in both directions.
What happens in the driver code is that the scan timestamp is taken as the first timestamp in the scan. However, subsequent timestamps may be smaller, the subtraction yields negative numbers, and the static_cast<uint32_t>
returns values close to the max representable uint32_t
as it underflows, which is somewhere around 4e9. That would mean some points in the scan were captured about 4 seconds after the time in header.stamp
, which is of course nonsense.
Here is an example plot of the timestamps in a single scan that was affected by this bug:
There are several possibilities what can be done with such scans:
n
invalid values by the jump size, which would make the timestamps again continuous. The scan start time has to be recomputed afterwards.I can imagine different use-cases will have different preferences about what to do in this case.
If you'd like, I can share the fix I did in our custom driver. However, first it would be good to figure out which approaches should be implemented in this driver.
Hi,
Are there any plans to release the APT packages for the ouster driver? :)
For ros:rolling, there is already published APT package ouster_msgs. Are there any plans to deal with that?
ros-drivers/ros2_ouster_drivers#131
Thanks for you work :)
Best regards Jitka Hodna
Hello, we are using the ROS the driver to obtain the point cloud data. For the the time synchronization we are using TIME_FROM_PTP_1588
. We are wondering where the timestamp from the PointCloud2 message is coming from? Is it from the ptp synched sensor (e.g. start of the measurement process) or the timestamp when the message is received on the host machine, or is it the time after the ROS driver processed the packets?
ouster-ros/src/os_cloud_nodelet.cpp
Lines 139 to 143 in b5393ca
This code takes the first valid timestamp in the scan as the timestamp of the whole scan. However, the usual understanding of header.stamp
field is when the scan acquisition began. I understand that when the first packets are missing, this information is not exactly available. However, given the regularity and precision of the rotation motor in the lidar, the timestamp of column 0 could be very easily extrapolated. That would seem to me as a better solution.
Hi, I am trying to setup PTP time synchronization on RB5 dev kit. It has a USB3.0 to Ethernet interface, which is being for the LIDAR. I need some help with the following queries:
The ethernet interface that we have doesn't support Hardware timestamping. As shown here:
Does it mean we cannot do time synchronization on our development board? What alternatives can we use?
From what I've read, hardware sync is better that software sync in terms of accuracy. Correct me if I'm wrong.
rostopoic delay /topic_name
utility. This compares the message header timestamp to the current ROS timestamp.
I collected following data:
delay in TIME_FROM_PTP_1588 mode over hardware interface: ~0.130
delay in TIME_FROM_PTP_1588 mode over software interface: ~0.350
delay in TIME_FROM_ROS_TIME mode: ~0.105
On ROS2 foxy, when build I got an error
ros2_ws/src/ouster-ros/ouster-ros/src/os_ros.cpp
fatal error: tf2_eigen/tf2_eigen.hpp: No such file or directory
18 | #include <tf2_eigen/tf2_eigen.hpp>
I checked the packages blow, but everything already installed.
sudo apt install -y
ros-foxy-pcl-ros
ros-foxy-tf2-eigen
ros-foxy-rviz2
I see in the sdk that we can convert a pcap to csv. But is there a way to do this and convert to a rosbag with sensor_msg/PointCloud2 and sensor_msg/imu msg format?
If not, how do we take the row by row extracted in the csv demo and extract the imu and lidar data separately?
Hi,
In continuation of the issue mentioned here I got in touch with the Ouster team and elaborated this issue as suggested by @kairenw, one of their suggestion was as follows
Ignore the azimuths/columns of measurement data that are near the shroud column edges. Maybe 2-3 columns on either side as an estimate.
How can I ignore specific azimuths/column in this driver as mentioned in the suggestion
thanks
Description: I was using ouster_ros as a catkin dependency in my own catkin project. It complains about no such file for the pcl include in ros.h. Looking at the cmakelist in ouster_ros, it seems like the pcl dependency is not exported in catkin_package.
Suggestion: either add pcl in catkin_package DEPENDS or just depend on pcl_ros
The issue I am creating here, goes right along with the issue I created with the Ros2 driver repo (ros-drivers/ros2_ouster_drivers#95). But essentially, the ring data type is defined as a uint8_t
and while this doesn't break anything, updating it to a uint16_t
has the benefits of increasing the portability of both the Ros1 and Ros2 Ouster Drivers and allowing the users to create more reusable code because ignition gazebo and other 3D lidar drivers use a uint16_t
as their ring datatype.
I already have this fix completed and ready to be tested when I get to my Ouster on Monday. I can also make PR with these changes so please let me know if i need to add anything!
Build fails with the below error
src/ouster-ros/ouster-sdk/ouster_client/src/image_processing.cpp:145:31: required from here
/usr/local/include/eigen3/Eigen/src/Core/util/ForwardDeclarations.h:23:29: error: invalid use of incomplete type 'struct Eigen::internal::traits<double>'
23 | template<typename T> struct traits<const T> : traits<T> {};
| ^~~~~~~~~~~~~~~
/usr/local/include/eigen3/Eigen/src/Core/util/ForwardDeclarations.h:17:29: note: declaration of 'struct Eigen::internal::traits<double>'
17 | template<typename T> struct traits;
looks like this is because of the below functions from src/ouster-ros/ouster-sdk/ouster_client/src/image_processing.cpp line #145
// use overloads vs templates so implicit conversion to Eigen::Ref still works
void AutoExposure::operator()(Eigen::Ref<img_t<float>> image,
bool update_state) {
update(image, update_state);
}
void AutoExposure::operator()(Eigen::Ref<img_t<double>> image,
bool update_state) {
update(image, update_state);
}
The build is fine by commenting out the first function.
Eigen version : 3.3.7
gcc version: 9.4.0
Ubuntu 20.04
Hello,
Could you please provide an example ROS2 launch file for starting Ouster LiDAR in multi-casting mode so multiple processes can listen to the messages? My LiDAR model is OS1-64.
Thank you!
I have a question about Ouster driver handling for ROS. I was having an error in tf lookupTransform
that the transform is old. Ouster driver publishing the tf
is using ros time where as other sensor data like lidar and imu are using here and here.
I know Ouster can handle different timestamp methods, but I don't understand the reason of using it for sensor readings but not for tf
.
Hi, I've got an OS1-128 using the latest version of the firmware. Running the ROS node at 2048x10 mode synced with a Jetson AGX via hardware PTP, the results of rostopic delay /os_cloud_node/points
command start from around 0.140 sec, but over the course of about 10-15 mins slowly progress to 0.250~ (which feels like quite a lot) and then it seems like they kinda slowly fluctuate between the two. What are the possible reasons and is there a way to make the delay more stable?
Hi!
We use ouster-ros
in our build process, and hadn't pinned a specific commit so our builds stopped working this morning.
After some time, we realized it was because you split this library out of the old repository (good change!), so I've been updating our builds but when I run catkin_make install
, I get this error message:
file INSTALL cannot find "/root/catkin_ws/src/ouster-ros/../LICENSE".
Call Stack (most recent call first):
cmake_install.cmake:136 (include)
Makefile:73: recipe for target 'install' failed
I assume that there is some error in the CMakeLists.txt
, maybe the ../
should be removed from ../LICENSE
?
EDIT: LICENSE-bin
doesn't exist in this repository either, so should that line be removed?
I ran this driver on DJI's onboard processor (manifold2), and the compilation was normal, but an error was reported after running.
ubuntu16.04
ros: kinetic
`Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://manifold2:44993/
PARAMETERS
NODES
/
os_cloud_node (ouster_ros/os_cloud_node)
os_node (ouster_ros/os_node)
relay_imu (topic_tools/relay)
relay_lidar (topic_tools/relay)
rviz (rviz/rviz)
auto-starting new master
process[master]: started with pid [2207]
ROS_MASTER_URI=http://localhost:11311
[rviz-6] killing on exit
[relay_imu-5] killing on exit
[relay_lidar-4] killing on exit
[os_cloud_node-3] killing on exit
[os_node-2] killing on exit
[ INFO] [1633320026.071683232]: poll_client: caught signal, exiting
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done`
Hi!
Thank you for your effort with the ros2 rolling driver for the ouster. I am happy to test it, and I have some doubts and ideas to share. :)
I setup the config file with this setting:
ros__parameters:
sensor_hostname: '10.64.1.6'
udp_dest: '10.64.1.5'
lidar_mode: '1024x10'
timestamp_mode: 'TIME_FROM_ROS_TIME'
udp_profile_lidar: ''
metadata: ''
lidar_port: 7502
imu_port: 7503
ouster/os_cloud:
ros__parameters:
tf_prefix: ''
timestamp_mode: '
And launched
ros2 launch ouster_ros sensor.composite.launch.py
Everything looks fine :)
I tried to integrate it to my robot, and I set in my urdf file the link os_sensor
according to this (the whole urdf is in the attachment)
model.txt
<link name="os_sensor">
<inertial>
<mass value="1.1797214877679865"/>
<origin rpy="0 0 0" xyz="0 0 0"/>
<inertia ixx="0.0010891778635817933" ixy="0.0" ixz="0.0" iyy="0.0010891778635817933" iyz="0.0" izz="0.0011161639926144861"/>
</inertial>
<visual>
<geometry>
<mesh filename="file:///home/hodnajit/rtabmap_experiments/install/optimus_description/share/optimus_description/meshes/sensors/ouster_os0.stl" scale="0.001 0.001 0.001"/>
</geometry>
<origin rpy="0 0 0" xyz="0 0 0"/>
<material name="yellow"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="file:///home/hodnajit/rtabmap_experiments/install/optimus_description/share/optimus_description/meshes/sensors/ouster_os0.stl" scale="0.001 0.001 0.001"/>
</geometry>
</collision>
</link>
<joint name="ouster_joint" type="fixed">
<origin rpy="0 0.06283 0" xyz="0 0 0.9175"/>
<child link="os_sensor"/>
<parent link="base_link"/>
</joint>
I launch it
ros2 launch ouster_ros sensor.composite.launch.py viz:=False
I have no problem with tf if I visualisate it in frame base_footprint
(see the fixed_frame set to base_footprint and Pointcloud2 to topic /ouster/points)
But if I change the view to /odom or /map frame, it says there is no transform between /odom (or /map) to /os_imu or /os_lidar and I cannot see the pointcloud
What am I doing wrong? I tried to add the transforms os_imu and os_lidar into urdf file as well, but the result was the same :/. And I can see, there is a tf publisher in os_cloud
tf_bcast.sendTransform(ouster_ros::transform_to_tf_msg(
info.imu_to_sensor_transform, sensor_frame, imu_frame, msg_ts));
and
tf_bcast.sendTransform(ouster_ros::transform_to_tf_msg(
info.lidar_to_sensor_transform, sensor_frame, lidar_frame, msg_ts));
So it looks to me that I do not need to publish the transform between sensor_frame and lidar(or imu)_frame. It looks good if I printed the transform with ros2 run tf2_tools view_frames
.
frames.pdf
Can you add the setting of sensor_frame as parameter? Or maybe the imu_frame and the lidar_frame as well? Or how does it work?
Thank you very much,
Best regards
Jitka Hodna
Hi,
Right now if we do "roslaunch sensor.launch" and if the sensor is not connected to the systems (lets say it was not powered on), then the launch file crashes.
Is there a way to retry instead of crashing? The launch file is used with other sensor (like a camera, imu etc) and crashing of this file causes the whole system to crash.
I'm trying out the new ros2 branch just mentioned here.
##50 (comment)
Looking at the PointCloud in Rviz2, it is visible that the PointCloud is not updating at the 10Hz rate expected when running in the 1024x10 mode.
Running ros2 topic hz on the /ouster/points topic shows this as well.
However, the images appear to be updating at 10Hz as expected.
I'm using an OS2-64 connected directly to a NUC 12. Ubuntu 22.04 ROS Humble.
Let me know if there any anything I can try to get the PointCloud publishing at 10Hz and help out.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.