ros2_interfaces_rolling/irobot_create_msgs/msg/
hazard_detection.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4pub struct HazardDetection {
5    pub header: crate::std_msgs::msg::Header,
6    #[serde(rename = "type")]    pub type_: u8,
7}
8
9impl HazardDetection {
10    pub const BACKUP_LIMIT: u8 = 0;
11    pub const BUMP: u8 = 1;
12    pub const CLIFF: u8 = 2;
13    pub const STALL: u8 = 3;
14    pub const WHEEL_DROP: u8 = 4;
15    pub const OBJECT_PROXIMITY: u8 = 5;
16}
17
18impl Default for HazardDetection {
19    fn default() -> Self {
20        HazardDetection {
21            header: crate::std_msgs::msg::Header::default(),
22            type_: 0,
23        }
24    }
25}
26
27impl ros2_client::Message for HazardDetection {}