ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Hi @Zhou, please take a lot at this tutorial: http://wiki.ros.org/rviz/Tutorials/Markers%3A%20Points%20and%20Lines

The scale member means different things for these marker types. The POINTS marker uses the x and y members for width and height respectively, while the LINE_STRIP and LINE_LIST markers only use the x component, which defines the line width. Scale values are in meters.

The marker types to POINTS, LINE_STRIP and LINE_LIST.

  68     // POINTS markers use x and y scale for width/height respectively
  69     points.scale.x = 0.2;
  70     points.scale.y = 0.2;
  71 
  72     // LINE_STRIP/LINE_LIST markers use only the x component of scale, for the line width
  73     line_strip.scale.x = 0.1;
  74     line_list.scale.x = 0.1;