Ask Your Question
0

Thin visualization marker

asked 2013-04-10 00:15:27 -0500

Hunk gravatar image

Hello,

i have a problem with my marker

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

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.header.frame_id="/map";
    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

    maps_marker_pub_.publish(line_strip_obstacles);
    ctr++;

  }

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

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-04-18 06:15:45 -0500

dgossow gravatar image
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-04-10 00:15:27 -0500

Seen: 1,747 times

Last updated: Apr 18 '13