LINE_STRIP类型把每个点作为一组连接的线的顶点( where point 0 is connected to point 1, 1 to 2, 2 to 3, etc.)。LINE_LIST类型为没对点创建不互相连接的线( i.e. point 0 to 1, 2 to 3, etc)。 2.1 源码 #include<ros/ros.h>#include<visualization_msgs/Marker.h>#include<cmath>intmain...
// The LINE_STRIP type uses each point as a vertex in a connected set of lines, where point 0 is connected to point 1, 1 to 2, 2 to 3, etc. The LINE_LIST type creates unconnected lines out of each pair of points, i.e. point 0 to 1, 2 to 3, etc. #include <ros/ros.h>...
points.header.frame_id = line_strip.header.frame_id ="/map"; points.header.stamp = line_strip.header.stamp = ros::Time::now(); points.ns = line_strip.ns ="showpath"; points.action = line_strip.action = visualization_msgs::Marker::ADD; points.pose.orientation.w = line_strip.pose....
for the line widthline_strip.scale.x=0.1;line_list.scale.x=0.1;// Points are greenpoints.color.g=1.0f;points.color.a=1.0;// Line strip is blueline_strip.color.b=1.0;line_strip.color.a=1.0;// Line
line width line_strip.scale.x = 0.1; line_list.scale.x = 0.1; //初始化颜色 // Points are green points.color.g = 1.0f; points.color.a = 1.0; // Line strip is blue line_strip.color.b = 1.0; line_strip.color.a = 1.0; // Line list is red line_list.color.r = 1.0; line_...
//声明一个marker 用来画出边//赋值边的 marker的 基本信息 初始化位置 为 0edge.header.frame_id ="map";edge.header.stamp = ros::Time::now();edge.action = visualization_msgs::Marker::ADD;edge.ns ="karto";edge.id =0;edge.type ...
header.stamp = line_strip.header.stamp = line_list.header.stamp = ros::Time::now(); points.ns = line_strip.ns = line_list.ns = "points_and_lines"; points.action = line_strip.action = line_list.action = visualization_msgs::Marker::ADD; points.pose.orientation.w = line_strip.pose...
//声明一个marker 用来画出边//赋值边的 marker的 基本信息 初始化位置 为 0edge.header.frame_id ='map';edge.header.stamp = ros::Time::now();edge.action = visualization_msgs::Marker::ADD;edge.ns ='karto';edge.id =0;edge.type = visualization_msgs::Marker::LINE_STRIP;edge.scale.x =...
LINE_STRIP marker.action = Marker.ADD marker.scale = Vector3(0.01, 0.01, 0) marker.color.g = 1.0 marker.color.a = 1.0 centre_x = 1 centre_y = 1 R = 0.5 delta_th = 0.1 for th in np.arange(0.0, 2*math.pi+delta_th, delta_th): x = centre_x + R * math.sin(th) y =...
uint8LINE_STRIP=4 uint8LINE_LIST=5 uint8CUBE_LIST=6 uint8SPHERE_LIST=7 uint8POINTS=8 uint8TEXT_VIEW_FACING=9 uint8MESH_RESOURCE=10 uint8TRIANGLE_LIST=11 uint8ADD=0 uint8MODIFY=0 uint8DELETE=2 uint8DELETEALL=3 std_msgs/Headerheader ...