Rosanswers logo


i have a problem with my marker

Marker Picture http://imageshack.us/f/580/markerd.png/

as you can see the last line is very thin and i didn't understand why.

My code is

       visualization_msgs::Marker  line_strip_obstacles;

    line_strip_obstacles.action = visualization_msgs::Marker::ADD;
    line_strip_obstacles.lifetime = ros::Duration();

    line_strip_obstacles.type = visualization_msgs::Marker::LINE_STRIP;

    line_strip_obstacles.scale.x = 0.02;
    line_strip_obstacles.scale.y = 0.02;
    line_strip_obstacles.scale.z = 1;
    line_strip_obstacles.color.r = 1.0;
    line_strip_obstacles.color.g = 0;
    line_strip_obstacles.color.b = 0;
    line_strip_obstacles.color.a = 1.0;
        int ctr=0;

  for(int j=0;j<number contours();j++){
    line_strip_obstacles.points.resize(number contours());
    line_strip_obstacles.id = ctr;

    for(int i=0 ;number edges;i++){
                    add point

    add first point again to close polygon



the problem is that i have an array of polygon and this is in my opinion the only why i get visualize it.

Anyone has an idea why the last line is so thin?

And one other question. Is it possible that rviz fill an polygon with an colour ? or some work around for it?

thank you for your help

regards Hunk

Originally posted by Hunk on ROS Answers with karma: 222 on 2013-04-10

Post score: 0


1 Answer 1


Rosanswers logo

Use a triangle list for that: http://www.ros.org/wiki/rviz/DisplayTypes/Marker#Triangle_List_.28TRIANGLE_LIST.3D11.29_.5B1.1.2B-.5D

Originally posted by dgossow with karma: 1444 on 2013-04-18

This answer was ACCEPTED on the original site

Post score: 0


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.