ros2_interfaces_humble/visualization_msgs/msg/
image_marker.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4pub struct ImageMarker {
5 pub header: crate::std_msgs::msg::Header,
6 pub ns: ::std::string::String,
7 pub id: i32,
8 #[serde(rename = "type")] pub type_: i32,
9 pub action: i32,
10 pub position: crate::geometry_msgs::msg::Point,
11 pub scale: f32,
12 pub outline_color: crate::std_msgs::msg::ColorRGBA,
13 pub filled: u8,
14 pub fill_color: crate::std_msgs::msg::ColorRGBA,
15 pub lifetime: crate::builtin_interfaces::msg::Duration,
16 pub points: Vec<crate::geometry_msgs::msg::Point>,
17 pub outline_colors: Vec<crate::std_msgs::msg::ColorRGBA>,
18}
19
20impl ImageMarker {
21 pub const CIRCLE: i32 = 0;
22 pub const LINE_STRIP: i32 = 1;
23 pub const LINE_LIST: i32 = 2;
24 pub const POLYGON: i32 = 3;
25 pub const POINTS: i32 = 4;
26 pub const ADD: i32 = 0;
27 pub const REMOVE: i32 = 1;
28}
29
30impl Default for ImageMarker {
31 fn default() -> Self {
32 ImageMarker {
33 header: crate::std_msgs::msg::Header::default(),
34 ns: ::std::string::String::new(),
35 id: 0,
36 type_: 0,
37 action: 0,
38 position: crate::geometry_msgs::msg::Point::default(),
39 scale: 0.0,
40 outline_color: crate::std_msgs::msg::ColorRGBA::default(),
41 filled: 0,
42 fill_color: crate::std_msgs::msg::ColorRGBA::default(),
43 lifetime: crate::builtin_interfaces::msg::Duration::default(),
44 points: Vec::new(),
45 outline_colors: Vec::new(),
46 }
47 }
48}
49
50impl ros2_client::Message for ImageMarker {}