robotics_signals/sensors/laser_scan.rs
1use cdds_derive::*;
2use cyclonedds_rs::*;
3use serde_derive::{Deserialize, Serialize};
4
5use crate::standard::Header;
6
7#[repr(C)]
8#[derive(Serialize, Deserialize, Topic)]
9pub struct LaserScan {
10 /// timestamp in the header is the acquisition time of
11 /// the first ray in the scan.
12 ///
13 /// in frame frame_id, angles are measured around
14 /// the positive Z axis (counterclockwise, if Z is up)
15 /// with zero angle being forward along the x axis
16 pub header: Header,
17
18 /// start angle of the scan in radians
19 pub angle_min: f32,
20
21 /// end angle of the scan in radians
22 pub angle_max: f32,
23
24 /// angular distance between measurements
25 pub angle_increment: f32,
26
27 /// time between scans in seconds
28 /// if your scanner is moving, this will be used in interpolating position
29 /// of 3d points
30 pub time_increments: f32,
31
32 /// time between scans in seconds
33 pub scan_time: f32,
34
35 /// minimum range value in metres
36 pub range_min: f32,
37
38 /// maximum range valie in metres
39 pub range_max: f32,
40
41 /// range data in metres
42 pub ranges: Vec<f32>,
43
44 /// intensity data
45 pub intensities: Vec<f32>,
46}