Skip to content

Commit

Permalink
Change the option for point type from auto to native and from legacy …
Browse files Browse the repository at this point in the history
…to original
  • Loading branch information
Samahu committed Oct 12, 2023
1 parent 56823f8 commit e33552f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
8 changes: 4 additions & 4 deletions ouster-ros/config/driver_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ 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: {legacy, auto, xyz, xyzi, xyzir}
# point_type[optional]: choose from: {original, native, xyz, xyzi, xyzir}
# Here is a breif description of each option:
# - legacy: legacy representation
# - auto: directly maps all fields as published by the sensor to an
# - original: ouster_ros::Point
# - 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}
Expand All @@ -81,4 +81,4 @@ ouster/os_driver:
# 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 ouster_ros/os_point.h header.
point_type: legacy
point_type: original
2 changes: 1 addition & 1 deletion ouster-ros/config/os_sensor_cloud_image_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +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: legacy # choose from: {legacy, auto, xyz, xyi, xyzir}
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
1 change: 0 additions & 1 deletion ouster-ros/src/point_cloud_processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "ouster_ros/os_ros.h"
// clang-format on

#include "point_cloud_compose_lambda.h"
#include "point_cloud_compose.h"
#include "lidar_packet_handler.h"

Expand Down
6 changes: 5 additions & 1 deletion ouster-ros/src/point_cloud_processor_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,14 @@ class PointCloudProcessorFactory {
info, frame, apply_lidar_to_sensor_transform, post_processing_fn);
} else if (point_type == "xyzi") {
if (info.format.udp_profile_lidar == UDPProfileLidar::PROFILE_RNG15_RFL8_NIR8)
// TODO: propagate warning message
// RCLCPP_WARN_STREAM(get_logger(),
// "selected point type 'xyzi' is not compatible with the current udp profile: RNG15_RFL8_NIR8");
return make_point_cloud_procssor<pcl::PointXYZI>(
info, frame, apply_lidar_to_sensor_transform, post_processing_fn);
} else if (point_type == "xyzir") {
if (info.format.udp_profile_lidar == UDPProfileLidar::PROFILE_RNG15_RFL8_NIR8)
// TODO: propagate warning message
// RCLCPP_WARN_STREAM(get_logger(),
// "selected point type 'xyzir' is not compatible with the current udp profile: RNG15_RFL8_NIR8");
return make_point_cloud_procssor<PointXYZIR>(
Expand All @@ -133,10 +135,12 @@ class PointCloudProcessorFactory {
return make_point_cloud_procssor<Point_RNG15_RFL8_NIR8>(
info, frame, apply_lidar_to_sensor_transform, post_processing_fn);
default:
// TODO: revize fallback
// TODO: propagate warning message
// TODO: implement fallback
throw std::runtime_error("point_type is set to auto but current udp_profile_lidar is unknown");
}
} else if (point_type != "original") {
// TODO: propagate warning message
// RCLCPP_WARN_STREAM(get_logger(),
// "Un-supported point type used: " << point_type <<
// "! falling back to driver original/legacy pcl point format");
Expand Down

0 comments on commit e33552f

Please sign in to comment.