Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SW-5148: back port improvements in ros 2 to ros 1 #170

Merged
merged 16 commits into from
Jul 25, 2023
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 62 additions & 50 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,46 @@ ouster_ros(1)
* fixed a potential issue of time values within generated point clouds that could result in a value
overflow
* added a new ``/ouster/metadata`` topic that is consumed by os_cloud and os_image nodelets and
save it to the bag file on record
save it to the bag file on record.
* make specifying metadata file optional during record and replay modes as of package version 8.1
* added a no-bond option to the ``sensor.launch`` file
* reduce the publish rate of imu tf transforms
* implemented a new node named ``os_driver`` which combines the functionality of ``os_sensor``,
``os_cloud`` and ``os_image`` into a single node. The new node can be launch via the new
``driver.launch`` file.
* introduced a new topic ``/ouster/scan`` which publishes ``sensor_msgs::LaserScan`` messages, the
user can pick which beam to be used for the message through the ``scan_ring`` launch argument.
* added ability to pick which messsages to process and through the new ``proc_mask`` launch file
argument.
* introduced a new parameter ``point_cloud_frame`` to allow users to select which frame to use when
publishing the point cloud (choose between ``sensor`` and ``lidar``). The default publishing frame
the sensor one which is in line with the current behavior.
* added the ability to change the names of ``sensor_frame``, ``lidar_frame`` and ``imu_frame``
* added a placeholder for the ``/ouster/reset`` (not implemented for ROS1).
* breaking: switched back to using static transforms broadcast but with ability to select the frames
to be updated dynamically and at what rate through the two new launch file arguments
``dynamic_transforms_broadcast`` and ``dynamic_transforms_broadcast_rate``.
* updated RVIZ color scheme for point clouds to match with the ROS2 version of the driver.

ouster_ros(2)
-------------
* MVP ouster-ros targeting ros2 distros (beta release)
* MVP ouster-ros targeting ros2 distros
* introduced a ``reset`` service to the ``os_sensor`` node
* implemented a new node named ``os_driver`` which combines the functionality of ``os_sensor``,
``os_cloud`` and ``os_image`` into a single node.
* added support to parse the same parameters provided by the ``ros2_ouster_driver``, the parameters
are ``lidar_ip``, ``computer_ip``, ``proc_mask`` and ``use_system_default_qos``; the parameters
are fully functional and similar to what the ``ros2_ouster_driver`` provides.
* for convenience introduced a new launch file ``driver_launch.py`` that is compatible with the
``ros2_ouster_driver`` in terms of parameters it accepts and the name of published topics.
* introduced a new parameter ``point_cloud_frame`` to allow users to select which frame to use when
publishing the point cloud (choose between ``sensor`` and ``lidar``).
* breaking: ``lidar`` frame is the default frame used when publishing point clouds.
* added the ability to choose between ``SensorDataQoS`` or ``SystemDefaultQoS`` across all published
topics with ``SensorDataQoS`` selected by default for live sensor mode and ``SystemDefaultQoS``
enabled for record and replay modes.
* introduced a new topic ``/ouster/scan`` which publishes ``sensor_msgs::msg::LaserScan`` messages


ouster_client
-------------
Expand All @@ -41,53 +72,34 @@ ouster_client
[20230114]
==========

ouster_ros
----------
* breaking change: renamed ``ouster_ros/ros.h`` to ``ouster_ros/os_ros.h`` and
``ouster_ros/point.h`` to ``ouster_ros/os_point.h``.
* breaking change: change the type of the ring field within ``ouster::Point`` from ``uint8_t`` to
``uint16_t``
* correct LICENSE file installation path.
* update code files copyrights period.
* bug fix: ros driver doesn't use correct udp_dest given by user during launch
* update published TF transforms time with senosr or ros time based on the
active timestamp mode.
* validate lidar and imu port values. warn users when assigning random port numbers.
* switch to using the cartesianT method when populating pcl point cloud for performance and reduced
cpu utilization
* reduce dynamic memory allocation within the driver for performance and driver stability
* add ``pcl_ros`` as a dependency to ``package.xml``
ouster_ros(2)
-------------
* MVP ouster-ros targeting ros2 distros (beta release)
* introduced a ``reset`` service to the ``os_sensor`` node
* breaking change: updated to ouster sdk release 20230403
* EOL notice: ouster-ros driver will drop support for ``ROS foxy`` by May 2023.
* bugfix: Address an issue causing the driver to warn about missing non-legacy fields even they exist
in the original metadata file.
* added a new launch file ``sensor_mtp.launch.xml`` for multicast use case (experimental).
* added a technique to estimate the the value of the lidar scan timestamp when it is missing packets
at the beginning
* add frame_id to image topics
* fixed a potential issue of time values within generated point clouds that could result in a value
overflow
* added a new ``/ouster/metadata`` topic that is consumed by os_cloud and os_image nodes and save it
to the bag file on record
* make specifying metadata file optional during record and replay modes as of package version 8.1
* replace ``tf_prefix`` from ``os_cloud`` with ``sensor_frame``, ``lidar_frame`` and ``imu_frame``
launch parameters.
* bugfix: fixed an issue that prevents running multiple instances of the sensor and cloud components
in the same process.
* switch to using static transform publisher for the ros2 driver.

ouster_client
--------------
* breaking change: signal multiplier type changed to double to support new FW values of signal
multiplier.
* breaking change: make_xyz_lut takes mat4d beam_to_lidar_transform instead of
lidar_origin_to_beam_origin_mm double to accomodate new FWs. Old reference Python implementation
was kept, but new reference was also added.
* address an issue that could cause the processed frame being dropped in favor or the previous
frame when the frame_id wraps-around.
* added a new flag ``CONFIG_FORCE_REINIT`` for ``set_config()`` method, to force the sensor to reinit
even when config params have not changed.
* breaking change: drop defaults parameters from the shortform ``init_client()`` method.
* added a new method ``init_logger()`` to provide control over the logs emitted by ``ouster_client``.
* add parsing for new FW 3.0 thermal features shot_limiting and thermal_shutdown statuses and countdowns
* add frame_status to LidarScan
* introduced a new method ``cartesianT()`` which speeds up the computation of point projecion from range
image, the method also can process the cartesian product with single float precision. A new unit test
``cartesian_test`` which shows achieved speed up gains by the number of valid returns in lidar scan.
* added ``RAW_HEADERS`` ChanField to LidarScan for packing headers and footer (alpha version, may be
changed/removed without notice in the future)


[20221004]
==========

ouster_ros
----------
* Moved ouster-ros into separate repo
* Refresh the docker file

ouster_sdk
----------
* Removed ouster_ros
-------------
* added a new method ``mtp_init_client`` to init the client with multicast support (experimental).
* the class ``SensorHttp`` which provides easy access to REST APIs of the sensor has been made public
under the ``ouster::sensor::util`` namespace.
* breaking change: get_metadata defaults to outputting non-legacy metadata
* add debug five_word profile which will be removed later
* breaking change: remove deprecations on LidarScan
23 changes: 15 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,27 @@ target_link_libraries(ouster_ros PUBLIC ${catkin_LIBRARIES} ouster_build pcl_com
add_dependencies(ouster_ros ${PROJECT_NAME}_gencpp)

# ==== Executables ====
add_library(nodelets_os
src/os_client_base_nodelet.cpp
add_library(${PROJECT_NAME}_nodelets
src/os_sensor_nodelet_base.cpp
src/os_sensor_nodelet.cpp
src/os_replay_nodelet.cpp
src/os_cloud_nodelet.cpp
src/os_image_nodelet.cpp)
target_link_libraries(nodelets_os ouster_ros ${catkin_LIBRARIES})
add_dependencies(nodelets_os ${PROJECT_NAME}_gencpp)
src/os_image_nodelet.cpp
src/os_driver_nodelet.cpp)
target_link_libraries(${PROJECT_NAME}_nodelets ouster_ros ${catkin_LIBRARIES})
add_dependencies(${PROJECT_NAME}_nodelets ${PROJECT_NAME}_gencpp)

# ==== Test ====
if(CATKIN_ENABLE_TESTING)
catkin_add_gtest(${PROJECT_NAME}_test tests/ring_buffer_test.cpp)
target_link_libraries(${PROJECT_NAME}_test ${catkin_LIBRARIES})
endif()

# ==== Install ====
install(
TARGETS
ouster_ros
nodelets_os
${PROJECT_NAME}
${PROJECT_NAME}_nodelets
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
Expand All @@ -104,7 +111,7 @@ install(
install(
FILES
LICENSE
nodelets_os.xml
${PROJECT_NAME}_nodelets.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)

Expand Down
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,16 @@ RUN set -xe \

FROM build-env

SHELL ["/bin/bash", "-c"]

ENV CXXFLAGS="-Werror -Wno-deprecated-declarations"
RUN /opt/ros/$ROS_DISTRO/env.sh catkin_make -DCMAKE_BUILD_TYPE=Release \
RUN /opt/ros/$ROS_DISTRO/env.sh catkin_make \
-DCMAKE_BUILD_TYPE=Release \
&& /opt/ros/$ROS_DISTRO/env.sh catkin_make install

RUN /opt/ros/$ROS_DISTRO/env.sh catkin_make --make-args tests \
&& source ./devel/setup.bash && rosrun ouster_ros ouster_ros_test

# Entrypoint for running Ouster ros:
#
# Usage: docker run --rm -it ouster-ros [sensor.launch parameters ..]
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Official ROS1/ROS2 drivers for Ouster sensors

[ROS1 (melodic/noetic)](https://github.com/ouster-lidar/ouster-ros/tree/master) |
[ROS2 (rolling/humble)](https://github.com/ouster-lidar/ouster-ros/tree/ros2) |
[ROS2 (rolling/humble/iron)](https://github.com/ouster-lidar/ouster-ros/tree/ros2) |
[ROS2 (foxy)](https://github.com/ouster-lidar/ouster-ros/tree/ros2-foxy)

<p style="float: right;"><img width="20%" src="docs/images/logo.png" /></p>

| ROS Version | Build Status (Linux) |
|:-----------:|:------:|
| ROS1 (melodic/noetic) | [![melodic/noetic](https://github.com/ouster-lidar/ouster-ros/actions/workflows/docker-image.yml/badge.svg?branch=master)](https://github.com/ouster-lidar/ouster-ros/actions/workflows/docker-image.yml)
| ROS2 (rolling/humble) | [![rolling/humble](https://github.com/ouster-lidar/ouster-ros/actions/workflows/docker-image.yml/badge.svg?branch=ros2)](https://github.com/ouster-lidar/ouster-ros/actions/workflows/docker-image.yml)
| ROS2 (rolling/humble/iron) | [![rolling/humble/iron](https://github.com/ouster-lidar/ouster-ros/actions/workflows/docker-image.yml/badge.svg?branch=ros2)](https://github.com/ouster-lidar/ouster-ros/actions/workflows/docker-image.yml)
| ROS2 (foxy) | [![foxy](https://github.com/ouster-lidar/ouster-ros/actions/workflows/docker-image.yml/badge.svg?branch=ros2-foxy)](https://github.com/ouster-lidar/ouster-ros/actions/workflows/docker-image.yml)

- [Overview](#overview)
Expand All @@ -30,12 +30,12 @@

## 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 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.
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
Expand Down
12 changes: 6 additions & 6 deletions config/viz.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,17 @@ Visualization Manager:
Min Value: -10
Value: true
Axis: Z
Channel Name: z
Channel Name: range
Class: rviz/PointCloud2
Color: 255; 255; 255
Color Transformer: Intensity
Decay Time: 0
Enabled: true
Invert Rainbow: true
Max Color: 255; 255; 255
Max Intensity: 15
Max Intensity: 10000
Min Color: 0; 0; 0
Min Intensity: -10
Min Intensity: 0
Name: PointCloud2
Position Transformer: XYZ
Queue Size: 10
Expand All @@ -89,17 +89,17 @@ Visualization Manager:
Min Value: -10
Value: true
Axis: Z
Channel Name: z
Channel Name: range
Class: rviz/PointCloud2
Color: 255; 255; 255
Color Transformer: Intensity
Decay Time: 0
Enabled: true
Invert Rainbow: true
Max Color: 255; 255; 255
Max Intensity: 15
Max Intensity: 10000
Min Color: 0; 0; 0
Min Intensity: -10
Min Intensity: 0
Name: PointCloud2
Position Transformer: XYZ
Queue Size: 10
Expand Down
2 changes: 1 addition & 1 deletion include/ouster_ros/os_point.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) 2018-2023, Ouster, Inc.
* All rights reserved.
*
* @file point.h
* @file os_point.h
* @brief PCL point datatype for use with ouster sensors
*/

Expand Down
Loading