ros2_interfaces_rolling/mavros_msgs/msg/
position_target.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4pub struct PositionTarget {
5 pub header: crate::std_msgs::msg::Header,
6 pub coordinate_frame: u8,
7 pub type_mask: u16,
8 pub position: crate::geometry_msgs::msg::Point,
9 pub velocity: crate::geometry_msgs::msg::Vector3,
10 pub acceleration_or_force: crate::geometry_msgs::msg::Vector3,
11 pub yaw: f32,
12 pub yaw_rate: f32,
13}
14
15impl PositionTarget {
16 pub const FRAME_LOCAL_NED: u8 = 1;
17 pub const FRAME_LOCAL_OFFSET_NED: u8 = 7;
18 pub const FRAME_BODY_NED: u8 = 8;
19 pub const FRAME_BODY_OFFSET_NED: u8 = 9;
20 pub const IGNORE_PX: u16 = 1;
21 pub const IGNORE_PY: u16 = 2;
22 pub const IGNORE_PZ: u16 = 4;
23 pub const IGNORE_VX: u16 = 8;
24 pub const IGNORE_VY: u16 = 16;
25 pub const IGNORE_VZ: u16 = 32;
26 pub const IGNORE_AFX: u16 = 64;
27 pub const IGNORE_AFY: u16 = 128;
28 pub const IGNORE_AFZ: u16 = 256;
29 pub const FORCE: u16 = 512;
30 pub const IGNORE_YAW: u16 = 1024;
31 pub const IGNORE_YAW_RATE: u16 = 2048;
32}
33
34impl Default for PositionTarget {
35 fn default() -> Self {
36 PositionTarget {
37 header: crate::std_msgs::msg::Header::default(),
38 coordinate_frame: 0,
39 type_mask: 0,
40 position: crate::geometry_msgs::msg::Point::default(),
41 velocity: crate::geometry_msgs::msg::Vector3::default(),
42 acceleration_or_force: crate::geometry_msgs::msg::Vector3::default(),
43 yaw: 0.0,
44 yaw_rate: 0.0,
45 }
46 }
47}
48
49impl ros2_client::Message for PositionTarget {}