|
Autoware.Auto
|
|
Classes | |
| struct | _create_custom_pcl_datatype |
| struct | _create_custom_pcl_datatype< float32_t > |
| struct | _create_custom_pcl_datatype< float64_t > |
| struct | _create_custom_pcl_datatype< int16_t > |
| struct | _create_custom_pcl_datatype< int32_t > |
| struct | _create_custom_pcl_datatype< int8_t > |
| struct | _create_custom_pcl_datatype< uint16_t > |
| struct | _create_custom_pcl_datatype< uint32_t > |
| struct | _create_custom_pcl_datatype< uint8_t > |
| class | AngleFilter |
| Filter class to check if a point's azimuth lies within a range defined by a start and end angles. The range is defined from start to the end angles in counter-clock-wise direction. More... | |
| class | DistanceFilter |
| Filter class to check if a point lies within a range defined by a min and max radius. More... | |
| class | IntensityIteratorWrapper |
| class | PointCloudIts |
| struct | SafeCloudIndices |
| class | StaticTransformer |
| Transform to apply a constant transform to given points. More... | |
Functions | |
| float32_t | fast_atan2 (float32_t y, float32_t x) |
| LIDAR_UTILS_PUBLIC std::size_t | index_after_last_safe_byte_index (const sensor_msgs::msg::PointCloud2 &msg) noexcept |
| Compute minimum safe length of point cloud access. More... | |
| LIDAR_UTILS_PUBLIC SafeCloudIndices | sanitize_point_cloud (const sensor_msgs::msg::PointCloud2 &msg) |
| LIDAR_UTILS_PUBLIC void | init_pcl_msg (sensor_msgs::msg::PointCloud2 &msg, const std::string &frame_id, const std::size_t size=static_cast< std::size_t >(MAX_SCAN_POINTS)) |
| initializes header information for point cloud for x, y, z and intensity More... | |
| template<typename ... Fields> | |
| LIDAR_UTILS_PUBLIC void | init_pcl_msg (sensor_msgs::msg::PointCloud2 &msg, const std::string &frame_id, const std::size_t size, const uint32_t num_fields, Fields const &... fields) |
| LIDAR_UTILS_PUBLIC bool8_t | add_point_to_cloud_raw (sensor_msgs::msg::PointCloud2 &cloud, const autoware::common::types::PointXYZIF &pt, uint32_t point_cloud_idx) |
| add a point in the cloud by memcpy instead of using iterators This version prioritize speed and ease of parallelisation it assumes : - PointXYZIF is a POD object equivalent to a point stored in the cloud, which means same fields and same endianness. More... | |
| LIDAR_UTILS_PUBLIC bool8_t | add_point_to_cloud (PointCloudIts &cloud_its, const autoware::common::types::PointXYZIF &pt, uint32_t &point_cloud_idx) |
| LIDAR_UTILS_PUBLIC bool8_t | add_point_to_cloud (sensor_msgs::msg::PointCloud2 &cloud, const autoware::common::types::PointXYZIF &pt, uint32_t &point_cloud_idx) |
| LIDAR_UTILS_PUBLIC bool8_t | add_point_to_cloud (sensor_msgs::msg::PointCloud2 &cloud, const autoware::common::types::PointXYZF &pt, uint32_t &point_cloud_idx) |
| LIDAR_UTILS_PUBLIC void | reset_pcl_msg (sensor_msgs::msg::PointCloud2 &msg, const std::size_t size, uint32_t &point_cloud_idx) |
| LIDAR_UTILS_PUBLIC void | resize_pcl_msg (sensor_msgs::msg::PointCloud2 &msg, const std::size_t new_size) |
| LIDAR_UTILS_PUBLIC bool8_t | has_intensity_and_throw_if_no_xyz (const PointCloud2::SharedPtr &cloud) |
| LIDAR_UTILS_PUBLIC bool8_t | has_intensity_and_throw_if_no_xyz (const PointCloud2 &cloud) |
| template<typename T > | |
| LIDAR_UTILS_PUBLIC sensor_msgs::msg::PointCloud2::SharedPtr | create_custom_pcl (const std::vector< std::string > &field_names, const uint32_t cloud_size) |
Variables | |
| static const uint32_t | MAX_SCAN_POINTS = 57872U |
| bool8_t autoware::common::lidar_utils::add_point_to_cloud | ( | PointCloudIts & | cloud_its, |
| const autoware::common::types::PointXYZIF & | pt, | ||
| uint32_t & | point_cloud_idx | ||
| ) |
| bool8_t autoware::common::lidar_utils::add_point_to_cloud | ( | sensor_msgs::msg::PointCloud2 & | cloud, |
| const autoware::common::types::PointXYZIF & | pt, | ||
| uint32_t & | point_cloud_idx | ||
| ) |
| bool8_t autoware::common::lidar_utils::add_point_to_cloud | ( | sensor_msgs::msg::PointCloud2 & | cloud, |
| const autoware::common::types::PointXYZF & | pt, | ||
| uint32_t & | point_cloud_idx | ||
| ) |
| bool8_t autoware::common::lidar_utils::add_point_to_cloud_raw | ( | sensor_msgs::msg::PointCloud2 & | cloud, |
| const autoware::common::types::PointXYZIF & | pt, | ||
| uint32_t | point_cloud_idx | ||
| ) |
add a point in the cloud by memcpy instead of using iterators This version prioritize speed and ease of parallelisation it assumes : - PointXYZIF is a POD object equivalent to a point stored in the cloud, which means same fields and same endianness.
| LIDAR_UTILS_PUBLIC sensor_msgs::msg::PointCloud2::SharedPtr autoware::common::lidar_utils::create_custom_pcl | ( | const std::vector< std::string > & | field_names, |
| const uint32_t | cloud_size | ||
| ) |
| float32_t autoware::common::lidar_utils::fast_atan2 | ( | float32_t | y, |
| float32_t | x | ||
| ) |
Approximation was taken from: http://www-labs.iro.umontreal.ca/~mignotte/IFT2425/Documents/EfficientApproximationArctgFunction.pdf
|Error = fast_atan2(y, x) - atan2f(y, x)| < 0.00468 rad
Octants: pi/2 3 | 2 / | / 4 ` | / 1 pi --—+--— 0 5 / | 8 / | / 6 | 7 ` 3pi/2
| bool8_t autoware::common::lidar_utils::has_intensity_and_throw_if_no_xyz | ( | const PointCloud2::SharedPtr & | cloud | ) |
Check that the pointcloud msg has x, y, z of type float32_t as the first three fields, otherwise throw an exception; check that the pointcloud msg has intensity field as the fourth field, otherwise return false
| bool8_t autoware::common::lidar_utils::has_intensity_and_throw_if_no_xyz | ( | const PointCloud2 & | cloud | ) |
Check that the pointcloud msg has x, y, z of type float32_t as the first three fields, otherwise throw an exception; check that the pointcloud msg has intensity field as the fourth field, otherwise return false
|
noexcept |
Compute minimum safe length of point cloud access.
| [in] | msg | The point cloud message to validate |
| void autoware::common::lidar_utils::init_pcl_msg | ( | sensor_msgs::msg::PointCloud2 & | msg, |
| const std::string & | frame_id, | ||
| const std::size_t | size = static_cast<std::size_t>(MAX_SCAN_POINTS) |
||
| ) |
initializes header information for point cloud for x, y, z and intensity
| [out] | msg | a point cloud message to initialize |
| [in] | frame_id | the name of the frame for the point cloud (assumed fixed) |
| [in] | size | number of points to preallocate for underyling data array |
| LIDAR_UTILS_PUBLIC void autoware::common::lidar_utils::init_pcl_msg | ( | sensor_msgs::msg::PointCloud2 & | msg, |
| const std::string & | frame_id, | ||
| const std::size_t | size, | ||
| const uint32_t | num_fields, | ||
| Fields const &... | fields | ||
| ) |
initializes header information for point cloud given frame id, size, number of frames and a parameter pack of fields.
| Fields | Template paramater pack containing field types. |
| msg | Point cloud message. |
| frame_id | Frame ID of the point cloud. |
| size | Size of the initialized point cloud. |
| num_fields | Number of fields. |
| fields | Set of parameters defining the fields. Each field must contain the following parameters in strict order: field_name, count, data_type. These parameters should be provided for each field |
| void autoware::common::lidar_utils::reset_pcl_msg | ( | sensor_msgs::msg::PointCloud2 & | msg, |
| const std::size_t | size, | ||
| uint32_t & | point_cloud_idx | ||
| ) |
| void autoware::common::lidar_utils::resize_pcl_msg | ( | sensor_msgs::msg::PointCloud2 & | msg, |
| const std::size_t | new_size | ||
| ) |
| SafeCloudIndices autoware::common::lidar_utils::sanitize_point_cloud | ( | const sensor_msgs::msg::PointCloud2 & | msg | ) |
Compute the safe stride and max length for given point cloud
for (auto idx = 0U; idx < ret.data_length; idx += msg.point_step) {memcpy(&pt, msg.data[idx], ret.point_step);} XYZI or XYZ, or throw
XYZI or XYZ, or throw
|
static |
max number of points in a scan for VLP16s, assuming 300 rpm = 5hz: 57870.3703 points per full rotation