ros2_interfaces_rolling/visualization_msgs/msg/
marker.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4pub struct Marker {
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 pose: crate::geometry_msgs::msg::Pose,
11 pub scale: crate::geometry_msgs::msg::Vector3,
12 pub color: crate::std_msgs::msg::ColorRGBA,
13 pub lifetime: crate::builtin_interfaces::msg::Duration,
14 pub frame_locked: bool,
15 pub points: Vec<crate::geometry_msgs::msg::Point>,
16 pub colors: Vec<crate::std_msgs::msg::ColorRGBA>,
17 pub texture_resource: ::std::string::String,
18 pub texture: crate::sensor_msgs::msg::CompressedImage,
19 pub uv_coordinates: Vec<crate::visualization_msgs::msg::UVCoordinate>,
20 pub text: ::std::string::String,
21 pub mesh_resource: ::std::string::String,
22 pub mesh_file: crate::visualization_msgs::msg::MeshFile,
23 pub mesh_use_embedded_materials: bool,
24}
25
26impl Marker {
27 pub const ARROW: i32 = 0;
28 pub const CUBE: i32 = 1;
29 pub const SPHERE: i32 = 2;
30 pub const CYLINDER: i32 = 3;
31 pub const LINE_STRIP: i32 = 4;
32 pub const LINE_LIST: i32 = 5;
33 pub const CUBE_LIST: i32 = 6;
34 pub const SPHERE_LIST: i32 = 7;
35 pub const POINTS: i32 = 8;
36 pub const TEXT_VIEW_FACING: i32 = 9;
37 pub const MESH_RESOURCE: i32 = 10;
38 pub const TRIANGLE_LIST: i32 = 11;
39 pub const ARROW_STRIP: i32 = 12;
40 pub const ADD: i32 = 0;
41 pub const MODIFY: i32 = 0;
42 pub const DELETE: i32 = 2;
43 pub const DELETEALL: i32 = 3;
44}
45
46impl Default for Marker {
47 fn default() -> Self {
48 Marker {
49 header: crate::std_msgs::msg::Header::default(),
50 ns: ::std::string::String::new(),
51 id: 0,
52 type_: 0,
53 action: 0,
54 pose: crate::geometry_msgs::msg::Pose::default(),
55 scale: crate::geometry_msgs::msg::Vector3::default(),
56 color: crate::std_msgs::msg::ColorRGBA::default(),
57 lifetime: crate::builtin_interfaces::msg::Duration::default(),
58 frame_locked: false,
59 points: Vec::new(),
60 colors: Vec::new(),
61 texture_resource: ::std::string::String::new(),
62 texture: crate::sensor_msgs::msg::CompressedImage::default(),
63 uv_coordinates: Vec::new(),
64 text: ::std::string::String::new(),
65 mesh_resource: ::std::string::String::new(),
66 mesh_file: crate::visualization_msgs::msg::MeshFile::default(),
67 mesh_use_embedded_materials: false,
68 }
69 }
70}
71
72impl ros2_client::Message for Marker {}