Function navmap_ros::from_points

Function Documentation

navmap::NavMap navmap_ros::from_points(const pcl::PointCloud<pcl::PointXYZ> &input_points, navmap_ros_interfaces::msg::NavMap &out_msg, BuildParams params)

Build a NavMap surface from a PCL point cloud.

Typical steps implemented by this builder include:

  • Optional downsampling according to params.resolution.

  • Local neighborhood discovery using either radius (params.use_radius) or k-NN.

  • Edge and face filtering based on params.max_edge_len, params.min_area and params.min_angle_deg.

  • Optional slope gating using params.max_slope_deg with respect to the vertical axis.

  • Creation of a single surface with shared vertices and triangle indices. The function also fills out_msg with the compact ROS representation of the resulting map.

Note

Input is treated as an unorganized cloud. If normals or intensities are present, they are ignored by this overload.

Parameters:
  • input_points[in] Point set in world coordinates (pcl::PointXYZ).

  • out_msg[out] Output transport message mirroring the created NavMap.

  • params[in] Meshing and filtering parameters (see ::BuildParams).

Returns:

The constructed navmap::NavMap.

Throws:

std::runtime_error – If meshing fails due to inconsistent parameters or empty input.