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);
60 server->
insert(int_marker);
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 );
77 server->
insert(int_marker);
92 int main(
int argc,
char** argv)
94 ros::init(argc, argv,
"rviz_logo_marker");
static tf::Quaternion createQuaternionFromRPY(double roll, double pitch, double yaw)
void publishCallback(tf::TransformBroadcaster &tf_broadcaster, const ros::TimerEvent &)
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
interactive_markers::InteractiveMarkerServer * server
ROSCPP_DECL void spin(Spinner &spinner)
static void quaternionTFToMsg(const Quaternion &bt, geometry_msgs::Quaternion &msg)
Timer createTimer(Rate r, Handler h, Obj o, bool oneshot=false, bool autostart=true) const
void insert(const visualization_msgs::InteractiveMarker &int_marker)
int main(int argc, char **argv)