pub struct PointCloud2Xyz {
pub frame_id: String,
pub stamp_sec: i32,
pub stamp_nanosec: u32,
pub xyz: Vec<f32>,
pub intensity: Option<Vec<f32>>,
}Expand description
Interleaved XYZ or XYZ-I PointCloud2 payload.
Fields§
§frame_id: StringROS frame id.
stamp_sec: i32Header stamp seconds.
stamp_nanosec: u32Header stamp nanoseconds.
xyz: Vec<f32>Interleaved XYZ floats.
intensity: Option<Vec<f32>>Optional per-point float32 LiDAR intensity values.
Implementations§
Source§impl PointCloud2Xyz
impl PointCloud2Xyz
Sourcepub fn try_new(
frame_id: impl Into<String>,
stamp_sec: i32,
stamp_nanosec: u32,
xyz: Vec<f32>,
) -> RuntimeResult<Self>
pub fn try_new( frame_id: impl Into<String>, stamp_sec: i32, stamp_nanosec: u32, xyz: Vec<f32>, ) -> RuntimeResult<Self>
Creates a validated XYZ cloud (xyz.len() divisible by 3).
Sourcepub fn try_new_with_intensity(
frame_id: impl Into<String>,
stamp_sec: i32,
stamp_nanosec: u32,
xyz: Vec<f32>,
intensity: Vec<f32>,
) -> RuntimeResult<Self>
pub fn try_new_with_intensity( frame_id: impl Into<String>, stamp_sec: i32, stamp_nanosec: u32, xyz: Vec<f32>, intensity: Vec<f32>, ) -> RuntimeResult<Self>
Creates a validated XYZ-I cloud.
Sourcepub fn point_count(&self) -> usize
pub fn point_count(&self) -> usize
Returns point count.
Trait Implementations§
Source§impl Clone for PointCloud2Xyz
impl Clone for PointCloud2Xyz
Source§fn clone(&self) -> PointCloud2Xyz
fn clone(&self) -> PointCloud2Xyz
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PointCloud2Xyz
impl Debug for PointCloud2Xyz
Source§impl PartialEq for PointCloud2Xyz
impl PartialEq for PointCloud2Xyz
Source§fn eq(&self, other: &PointCloud2Xyz) -> bool
fn eq(&self, other: &PointCloud2Xyz) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PointCloud2Xyz
Auto Trait Implementations§
impl Freeze for PointCloud2Xyz
impl RefUnwindSafe for PointCloud2Xyz
impl Send for PointCloud2Xyz
impl Sync for PointCloud2Xyz
impl Unpin for PointCloud2Xyz
impl UnsafeUnpin for PointCloud2Xyz
impl UnwindSafe for PointCloud2Xyz
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more