Ask Your Question

Thin visualization marker

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

Hunk gravatar image


i have a problem with my marker (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.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()); = 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

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

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


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

Seen: 1,747 times

Last updated: Apr 18 '13