ros2_interfaces_jazzy/mavros_msgs/srv/
command_tol.rs

1use serde::{Deserialize, Serialize};
2
3
4#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5pub struct CommandTOLRequest {
6    pub min_pitch: f32,
7    pub yaw: f32,
8    pub latitude: f32,
9    pub longitude: f32,
10    pub altitude: f32,
11}
12
13impl Default for CommandTOLRequest {
14    fn default() -> Self {
15        CommandTOLRequest {
16            min_pitch: 0.0,
17            yaw: 0.0,
18            latitude: 0.0,
19            longitude: 0.0,
20            altitude: 0.0,
21        }
22    }
23}
24
25impl ros2_client::Message for CommandTOLRequest {}
26
27
28
29#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
30pub struct CommandTOLResponse {
31    pub success: bool,
32    pub result: u8,
33}
34
35impl Default for CommandTOLResponse {
36    fn default() -> Self {
37        CommandTOLResponse {
38            success: false,
39            result: 0,
40        }
41    }
42}
43
44impl ros2_client::Message for CommandTOLResponse {}
45
46
47pub struct CommandTOL;
48impl ros2_client::Service for CommandTOL {
49    type Request = CommandTOLRequest;
50    type Response = CommandTOLResponse;
51
52    fn request_type_name(&self) -> &str { "CommandTOLRequest" }
53    fn response_type_name(&self) -> &str { "CommandTOLResponse" }
54}