Skip to content

Commit

Permalink
merge changes to fork (#3)
Browse files Browse the repository at this point in the history
* SW-5607: rename package ouster_msgs to avoid package name conflict in ros index (ouster-lidar#244)

* rename package ouster_msgs to avoid conflict name conflict in ros index
* set ouster_sensor_msgs version number to match with ouster_ros package

* SW-5466: Support Velodyne and other point types in ouster-ros driver (ouster-lidar#216)

* Quick protoype of Velodyne point type
* Add PointXYZIR point type + other major pcl point types
* Include point meta functions and point transform by the ouster_ros namesapce
* Wrap point meta functions with a namespace and use shorter names for the functions +
* Add a seed test module for the point_cloud_compose methods +
 Add description for the point_cloud_compose methods + refactor code and add compile time checks.
* Propagate error state, warn about potential incompatible profile, propagate error state
* Add minimal documentation about the new `point_type` parameter.

* SW-5466: Support Velodyne point type in the ROS driver amendments (ouster-lidar#254)

* Add support to control point_type through launch.xml files +
* Add a note to CHANGELOG about the breaking change for ptp/utc time offset

* SW-5623: Bump up ouster_client to 20231031 release (ouster-lidar#262)

* Bump ouster-client to 2023103 release
* fix: gracefully stop the driver when shutdown is requested.

* ROS-196: laser scan from ros driver is not properly aligned with point cloud [humble] (ouster-lidar#203)

* Apply destagger to laser scan + Add laser to RVIZ
* Align LaserScan with the PointCloud
* Apply proper pixel shift
* Resolve the issue of zeroed laserscan on dual mode
* Address an issue where LaserScan appeared different on FW prior to 2.4
* Fix the issue for odd numbers
* List selected sensors on the main page + Update RVIZ config to highlight the 2D LaserScan.

* Use timeout when waiting for packets to be proceed in case they don't come (ouster-lidar#293)

* docs: fix spelling mistakes (ouster-lidar#296)

---------

Co-authored-by: Ussama Naal <[email protected]>
Co-authored-by: Andre Nguyen <[email protected]>
  • Loading branch information
3 people authored Mar 23, 2024
1 parent ebfecc1 commit 61fa6ce
Show file tree
Hide file tree
Showing 41 changed files with 2,171 additions and 639 deletions.
49 changes: 48 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,60 @@ Changelog

[unreleased]
============
* breaking: publish PCL point clouds destaggered.
* [BUGFIX]: LaserScan is not properly aligned with generated point cloud
* address an issue where LaserScan appeared different on FW prior to 2.4
* [BUGFIX]: LaserScan does not work when using dual mode
* [BUGFIX]: ROS2 crashes when standby mode is set and then set to normal


ouster_ros v0.12.0
==================
* [BREAKING]: updated ouster_client to the release of ``20231031`` [v0.10.0]; changes listed below.
* [BREAKING]: publish PCL point clouds destaggered.
* introduced a new launch file parameter ``ptp_utc_tai_offset`` which represent offset in seconds
to be applied to all ROS messages the driver generates when ``TIME_FROM_PTP_1588`` timestamp mode
is used.
* [BREAKING]: the default value of ``ptp_utc_tai_offset`` is set to ``-37.0``. To retain the same
time offset for an existing system, users need to set ``ptp_utc_tai_offset`` to ``0.0``.
* fix: destagger columns timestamp when generating destaggered point clouds.
* shutdown the driver when unable to connect to the sensor on startup
* breaking: rename ouster_msgs to ouster_sensor_msgs
* added the ability to customize the published point clouds(s) to velodyne point cloud format and
other common pcl point types.
* ouster_image_compoenent can operate separately from ouster_cloud_component.
* fix: gracefully stop the driver when shutdown is requested.

ouster_client
-------------
* [BREAKING] Updates to ``sensor_info`` include:
* new fields added: ``build_date``, ``image_rev``, ``prod_pn``, ``status``, ``cal`` (representing
the value stored in the ``calibration_status`` metadata JSON key), ``config`` (representing the
value of the ``sensor_config`` metadata JSON key)
* the original JSON string is accessible via the ``original_string()`` method
* The ``updated_metadata_string()`` now returns a JSON string reflecting any modifications to
``sensor_info``
* ``to_string`` is now marked as deprecated
* [BREAKING] The RANGE field defined in `parsing.cpp`, for the low data rate profile, is now 32 bits
wide (originally 16 bits).
* Please note this fixes a SDK bug. The underlying UDP format is unchanged.
* [BREAKING] The NEAR_IR field defined in `parsing.cpp`, for the low data rate profile, is now 16
bits wide (originally 8 bits).
* Plase note this fixes a SDK bug. The underlying UDP format is unchanged.
* [BREAKING] changed frame_id return size to 32 bits from 16 bits
* An array of per-packet timestamps (called ``packet_timestamp``) is added to ``LidarScan``
* The client now retries failed requests to an Ouster sensor's HTTP API
* Increased the default timeout for HTTP requests to 40s
* Added FuSA UDP profile to support Ouster FW 3.1+
* Improved ``ScanBatcher`` performance by roughly 3x (depending on hardware)
* Receive buffer size increased from 256KB to 1MB
* [bugfix] Fixed an issue that caused incorrect Cartesian point computation in the ``viz.Cloud``
Python class
* [bugfix] Fixed an issue that resulted in some ``packet_format`` methods returning an uninitialized
value
* [bugfix] Fixed a libpcap-related linking issue
* [bugfix] Fixed an eigen 3.3-related linking issue
* [bugfix] Fixed a zero beam angle calculation issue
* [bugfix] Fixed dropped columns issue with 4096x5 and 2048x10

ouster_ros v0.10.0
==================
Expand Down
78 changes: 58 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,27 @@
| 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 (galactic/foxy) | [![galactic/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)
- [Requirements](#requirements)
- [Linux](#linux)
- [Windows](#windows)
- [Mac](#mac)
- [Getting Started](#getting-started)
- [Usage](#usage)
- [Launching Nodes](#launching-nodes)
- [Sensor Mode](#sensor-mode)
- [Recording Mode](#recording-mode)
- [Replay Mode](#replay-mode)
- [Multicast Mode (experimental)](#multicast-mode-experimental)
- [Invoking Services](#invoking-services)
- [GetMetadata](#getmetadata)
- [GetConfig](#getconfig)
- [SetConfig](#setconfig)
- [Reset](#reset)
- [License](#license)
- [Official ROS driver for Ouster sensors](#official-ros-driver-for-ouster-sensors)
- [Overview](#overview)
- [Supported Devices](#supported-devices)
- [Requirements](#requirements)
- [Linux](#linux)
- [Windows](#windows)
- [Mac](#mac)
- [Getting Started](#getting-started)
- [Usage](#usage)
- [Launching Nodes](#launching-nodes)
- [Sensor Mode](#sensor-mode)
- [Recording Mode](#recording-mode)
- [Replay Mode](#replay-mode)
- [Multicast Mode (experimental)](#multicast-mode-experimental)
- [Invoking Services](#invoking-services)
- [GetMetadata](#getmetadata)
- [GetConfig](#getconfig)
- [SetConfig](#setconfig)
- [Reset](#reset)
- [Driver Parameters](#driver-parameters)
- [License](#license)


## Overview
Expand All @@ -41,6 +44,17 @@ messages on the topics of `/ouster/imu` and `/ouster/points`. In the case the us
dual return and it was configured to use this capability, then another topic will published under the
name `/ouster/points2` which corresponds to the second point cloud.


## Supported Devices
The driver supports the following list of Ouster sensors:
- [OS0](https://ouster.com/products/hardware/os0-lidar-sensor)
- [OS1](https://ouster.com/products/hardware/os1-lidar-sensor)
- [OS2](https://ouster.com/products/hardware/os2-lidar-sensor)
- [OSDome](https://ouster.com/products/hardware/osdome-lidar-sensor)

You can obtain detailed specs sheet about the sensors and obtain updated FW through the website
[downloads](https://ouster.com/downloads) section.

## Requirements
This branch is only intended for use with **Rolling**, **Humble** and **Iron** ROS 2 distros. Please
refer to ROS 2 online documentation on how to setup ROS on your machine before proceeding with the
Expand Down Expand Up @@ -238,8 +252,32 @@ connection, reset the sensor and reconnect again.
> **Note**
> Changing settings is not yet fully support during a reset operation (more on this)
TBD: For further detailed instructions refer to the [main guide](./docs/index.rst)

### Driver Parameters
The driver has several parameters that allow you to customize its behavior, all of
these parameters are defined with the `driver_params.yaml` file found under `config`
folder. The only required parameter is `sensor_hostname` which sets the sensor
hostname or ip that you want to connect to through ouster-ros driver.

Other notable parameters include:
* **point_type**: This parameter allows to customize the point cloud that the
driver produces through its `/ouster/points` topics. Choose one of the following
values:
- `original`: This uses the original point representation `ouster_ros::Point`
of the ouster-ros driver.
- `native`: directly maps all fields as published by the sensor to an
equivalent point cloud representation with the additon of ring
and timestamp fields.
- `xyz`: the simplest point type, only has {x, y, z}
- `xyzi`: same as xyz point type but adds intensity (signal) field. this
type is not compatible with the low data profile.
- `xyzir`: same as xyzi type but adds ring (channel) field.
this type is same as Velodyne point cloud type
this type is not compatible with the low data profile.

This is not a comprehenisve list of all the parameters that the driver supports
for more detailed list please refer to the `config/driver_params.yaml` file.

For further detailed instructions about the driver refer to the [main guide](./docs/index.rst)

## License
[License File](./LICENSE)
20 changes: 16 additions & 4 deletions ouster-ros/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ find_package(rclcpp_lifecycle REQUIRED)
find_package(std_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(ouster_msgs REQUIRED)
find_package(ouster_sensor_msgs REQUIRED)
find_package(std_srvs REQUIRED)
find_package(rosidl_default_generators REQUIRED)
find_package(Eigen3 REQUIRED)
Expand Down Expand Up @@ -63,7 +63,7 @@ set(ouster_ros_library_deps
rclcpp
sensor_msgs
geometry_msgs
ouster_msgs
ouster_sensor_msgs
pcl_conversions
tf2
tf2_eigen
Expand Down Expand Up @@ -154,7 +154,7 @@ rclcpp_components_register_node(os_image_component
EXECUTABLE os_image
)

# ==== os_sensor_component ====
# ==== os_driver_component ====
create_ros2_component(os_driver_component
"src/os_sensor_node_base.cpp;src/os_sensor_node.cpp;src/os_driver_node.cpp"
"std_srvs"
Expand All @@ -168,11 +168,23 @@ rclcpp_components_register_node(os_driver_component
# ==== Test ====
if(BUILD_TESTING)
find_package(ament_cmake_gtest REQUIRED)
ament_add_gtest(${PROJECT_NAME}_test test/ring_buffer_test.cpp)
ament_add_gtest(${PROJECT_NAME}_test
test/ring_buffer_test.cpp
src/os_ros.cpp
test/point_accessor_test.cpp
test/point_transform_test.cpp
test/point_cloud_compose_test.cpp
)
ament_target_dependencies(${PROJECT_NAME}_test
rclcpp
ouster_sensor_msgs
)
target_include_directories(${PROJECT_NAME}_test PUBLIC
${_ouster_ros_INCLUDE_DIRS}
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
target_link_libraries(${PROJECT_NAME}_test ouster_ros_library)
endif()


Expand Down
19 changes: 19 additions & 0 deletions ouster-ros/config/driver_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,22 @@ ouster/os_driver:
# data QoS. This is preferrable for production but default QoS is needed for
# rosbag. See: https://github.com/ros2/rosbag2/issues/125
use_system_default_qos: false
# point_type[optional]: choose from: {original, native, xyz, xyzi, xyzir}
# Here is a breif description of each option:
# - original: This uses the original point representation ouster_ros::Point
# of the ouster-ros driver.
# - native: directly maps all fields as published by the sensor to an
# equivalent point cloud representation with the additon of ring
# and timestamp fields.
# - xyz: the simplest point type, only has {x, y, z}
# - xyzi: same as xyz point type but adds intensity (signal) field. this
# type is not compatible with the low data profile.
# - xyzir: same as xyzi type but adds ring (channel) field.
# this type is same as Velodyne point cloud type
# this type is not compatible with the low data profile.
# for more details about the fields of each point type and their data refer
# to the following header files:
# - ouster_ros/os_point.h
# - ouster_ros/sensor_point_types.h
# - ouster_ros/common_point_types.h.
point_type: original
1 change: 1 addition & 0 deletions ouster-ros/config/os_sensor_cloud_image_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ ouster/os_cloud:
use_system_default_qos: False # needs to match the value defined for os_sensor node
scan_ring: 0 # Use this parameter in conjunction with the SCAN flag and choose a
# value the range [0, sensor_beams_count)
point_type: original # choose from: {original, native, xyz, xyzi, xyzir}
ouster/os_image:
use_system_default_qos: False # needs to match the value defined for os_sensor node
54 changes: 45 additions & 9 deletions ouster-ros/config/viz.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ Panels:
- /nearir1/Topic1
- /reflec1
- /signal1
Splitter Ratio: 0.5
- /LaserScan1
- /LaserScan1/Topic1
Splitter Ratio: 0.626074492931366
Tree Height: 1185
- Class: rviz_common/Selection
Name: Selection
Expand Down Expand Up @@ -92,23 +94,23 @@ Visualization Manager:
Enabled: true
Frame Timeout: 15
Frames:
" os_imu":
All Enabled: true
os_imu:
Value: true
" os_lidar":
os_lidar:
Value: true
" os_sensor":
os_sensor:
Value: true
All Enabled: true
Marker Scale: 1
Name: TF
Show Arrows: true
Show Axes: true
Show Names: false
Tree:
" os_sensor":
" os_imu":
os_sensor:
os_imu:
{}
" os_lidar":
os_lidar:
{}
Update Interval: 0
Value: true
Expand Down Expand Up @@ -168,10 +170,44 @@ Visualization Manager:
Reliability Policy: Best Effort
Value: /ouster/signal_image
Value: true
- Alpha: 1
Autocompute Intensity Bounds: false
Autocompute Value Bounds:
Max Value: 10
Min Value: -10
Value: true
Axis: Z
Channel Name: intensity
Class: rviz_default_plugins/LaserScan
Color: 255; 255; 255
Color Transformer: Intensity
Decay Time: 0
Enabled: true
Invert Rainbow: false
Max Color: 255; 255; 255
Max Intensity: 1000
Min Color: 0; 0; 0
Min Intensity: 0
Name: LaserScan
Position Transformer: XYZ
Selectable: true
Size (Pixels): 3
Size (m): 0.02
Style: Flat Squares
Topic:
Depth: 5
Durability Policy: Volatile
Filter size: 10
History Policy: Keep Last
Reliability Policy: Best Effort
Value: /ouster/scan
Use Fixed Frame: true
Use rainbow: true
Value: true
Enabled: true
Global Options:
Background Color: 48; 48; 48
Fixed Frame: "os_sensor"
Fixed Frame: os_sensor
Frame Rate: 30
Name: root
Tools:
Expand Down
Loading

0 comments on commit 61fa6ce

Please sign in to comment.