ros2_interfaces_rolling/marti_sensor_msgs/msg/
direction.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Direction {
    pub header: crate::std_msgs::msg::Header,
    pub direction: i8,
}

impl Direction {
    pub const BACKWARD: i8 = -1;
    pub const ZERO: i8 = 0;
    pub const FORWARD: i8 = 1;
    pub const UNKNOWN: i8 = 127;
}

impl Default for Direction {
    fn default() -> Self {
        Direction {
            header: crate::std_msgs::msg::Header::default(),
            direction: 0,
        }
    }
}

impl ros2_client::Message for Direction {}