ros2_interfaces_iron/rtabmap_msgs/msg/
odom_info.rs

1use serde::{Deserialize, Serialize};
2use serde_with::serde_as;
3
4#[serde_as]
5#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6pub struct OdomInfo {
7    pub header: crate::std_msgs::msg::Header,
8    pub lost: bool,
9    pub matches: i32,
10    pub inliers: i32,
11    pub icp_inliers_ratio: f32,
12    pub icp_rotation: f32,
13    pub icp_translation: f32,
14    pub icp_structural_complexity: f32,
15    pub icp_structural_distribution: f32,
16    pub icp_correspondences: i32,
17    #[serde_as(as = "[_; 36]")]
18    pub covariance: [f64; 36],
19    pub features: i32,
20    pub local_map_size: i32,
21    pub local_scan_map_size: i32,
22    pub local_key_frames: i32,
23    pub local_bundle_outliers: i32,
24    pub local_bundle_constraints: i32,
25    pub local_bundle_time: f32,
26    pub key_frame_added: bool,
27    pub time_estimation: f32,
28    pub time_particle_filtering: f32,
29    pub stamp: f32,
30    pub interval: f32,
31    pub distance_travelled: f32,
32    pub memory_usage: i32,
33    pub gravity_roll_error: f32,
34    pub gravity_pitch_error: f32,
35    pub local_bundle_ids: Vec<i32>,
36    pub local_bundle_models: Vec<crate::rtabmap_msgs::msg::CameraModels>,
37    pub local_bundle_poses: Vec<crate::geometry_msgs::msg::Pose>,
38    pub transform: crate::geometry_msgs::msg::Transform,
39    pub transform_filtered: crate::geometry_msgs::msg::Transform,
40    pub transform_ground_truth: crate::geometry_msgs::msg::Transform,
41    pub guess: crate::geometry_msgs::msg::Transform,
42    #[serde(rename = "type")]    pub type_: i32,
43    pub words_keys: Vec<i32>,
44    pub words_values: Vec<crate::rtabmap_msgs::msg::KeyPoint>,
45    pub word_matches: Vec<i32>,
46    pub word_inliers: Vec<i32>,
47    pub local_map_keys: Vec<i32>,
48    pub local_map_values: Vec<crate::rtabmap_msgs::msg::Point3f>,
49    pub local_scan_map: crate::sensor_msgs::msg::PointCloud2,
50    pub ref_corners: Vec<crate::rtabmap_msgs::msg::Point2f>,
51    pub new_corners: Vec<crate::rtabmap_msgs::msg::Point2f>,
52    pub corner_inliers: Vec<i32>,
53}
54
55impl Default for OdomInfo {
56    fn default() -> Self {
57        OdomInfo {
58            header: crate::std_msgs::msg::Header::default(),
59            lost: false,
60            matches: 0,
61            inliers: 0,
62            icp_inliers_ratio: 0.0,
63            icp_rotation: 0.0,
64            icp_translation: 0.0,
65            icp_structural_complexity: 0.0,
66            icp_structural_distribution: 0.0,
67            icp_correspondences: 0,
68            covariance: [0.0; 36],
69            features: 0,
70            local_map_size: 0,
71            local_scan_map_size: 0,
72            local_key_frames: 0,
73            local_bundle_outliers: 0,
74            local_bundle_constraints: 0,
75            local_bundle_time: 0.0,
76            key_frame_added: false,
77            time_estimation: 0.0,
78            time_particle_filtering: 0.0,
79            stamp: 0.0,
80            interval: 0.0,
81            distance_travelled: 0.0,
82            memory_usage: 0,
83            gravity_roll_error: 0.0,
84            gravity_pitch_error: 0.0,
85            local_bundle_ids: Vec::new(),
86            local_bundle_models: Vec::new(),
87            local_bundle_poses: Vec::new(),
88            transform: crate::geometry_msgs::msg::Transform::default(),
89            transform_filtered: crate::geometry_msgs::msg::Transform::default(),
90            transform_ground_truth: crate::geometry_msgs::msg::Transform::default(),
91            guess: crate::geometry_msgs::msg::Transform::default(),
92            type_: 0,
93            words_keys: Vec::new(),
94            words_values: Vec::new(),
95            word_matches: Vec::new(),
96            word_inliers: Vec::new(),
97            local_map_keys: Vec::new(),
98            local_map_values: Vec::new(),
99            local_scan_map: crate::sensor_msgs::msg::PointCloud2::default(),
100            ref_corners: Vec::new(),
101            new_corners: Vec::new(),
102            corner_inliers: Vec::new(),
103        }
104    }
105}
106
107impl ros2_client::Message for OdomInfo {}