3 #include "visualization_msgs/Marker.h"
4 #include "visualization_msgs/MarkerArray.h"
15 visualization_msgs::InteractiveMarker int_marker;
16 int_marker.header.frame_id =
"rviz_logo";
17 int_marker.name =
"R";
19 int_marker.pose.orientation.x = 0.0;
20 int_marker.pose.orientation.y = 0.0;
21 int_marker.pose.orientation.z = 1.0;
22 int_marker.pose.orientation.w = 1.0;
23 int_marker.pose.position.y = -2.0;
24 int_marker.scale = 2.3;
26 visualization_msgs::Marker marker;
27 marker.type = visualization_msgs::Marker::MESH_RESOURCE;
31 marker.pose.position.x = 0;
32 marker.pose.position.y = -0.22;
33 marker.pose.position.z = 0;
34 marker.scale.x = marker.scale.y = marker.scale.z = 4;
39 marker.mesh_resource =
"package://rviz/image_src/R.stl";
40 marker.mesh_use_embedded_materials =
true;
44 visualization_msgs::InteractiveMarkerControl control;
45 control.always_visible =
true;
46 control.markers.push_back(marker);
49 int_marker.controls.push_back(control);
51 visualization_msgs::InteractiveMarkerControl linear_control;
52 linear_control.name =
"rotate_z";
53 linear_control.interaction_mode = visualization_msgs::InteractiveMarkerControl::ROTATE_AXIS;
54 linear_control.orientation.y = 1;
55 linear_control.orientation.w = 1;
58 int_marker.controls.push_back(linear_control);
62 int_marker.name =
"Viz";
64 marker.mesh_resource =
"package://rviz/image_src/Viz.stl";
65 marker.pose.position.x = 3.3;
66 marker.pose.orientation.x = 0.0;
67 marker.pose.orientation.y = 0.0;
68 marker.pose.orientation.z = 0.0;
69 marker.pose.orientation.w = 1.0;
70 control.markers.clear();
71 control.markers.push_back(marker);
74 int_marker.controls.clear();
75 int_marker.controls.push_back(control);
86 geometry_msgs::TransformStamped transform;
87 transform.transform.translation =
tf2::toMsg(tf2::Vector3(3, 1, 0));
89 q.
setRPY(0, 0, M_PI * 0.9);
91 transform.header.frame_id =
"base_link";
93 transform.child_frame_id =
"rviz_logo";
97 int main(
int argc,
char** argv)
99 ros::init(argc, argv,
"rviz_logo_marker");