# Why ist TRIANGLE_LIST with scale.x = 0.001 not shown?

Hey!

I want to draw some triangles in RVIZ via TRIANGLE_LIST and have problems to understand the scale in this case. I had the size set to

marker.scale.x = marker.scale.y = 0.001;
marker.scale.z = 1;


from visualizing another type. A marker with this scale was not drawn in RVIZ (also no warning was generated). It took me some time to find this error and my triangles are rendered nicely if I set the scale to [1,1,1]. Can someone tell me why this is implemented in this way? Shouldn't the scale be ignored completely?

edit retag close merge delete

0.001 is 0.1 cm which is very small, you can zoom out more to see.

( 2014-08-12 13:46:38 -0500 )edit

Sort by » oldest newest most voted

Why would you want the scale to be ignored? That doesn't seem to make sense. Set it to 1, if you want to draw the triangles exactly as you did. Scale being ignored would be coutnerintuitive as it takes a feature away. If you set the scale to 0.001 it's drawn at a 1/1000th size. It is not surprising that this is not visible unless you zoom in.

more

@domhege (as answer as a comment has a length limit):

When I draw other types (as LINE_LIST), the scale modifies the visualization (in this case the line width) but does not change the marker.points. But for the triangles, the scale modifies the points so that it has a completely different interpretation. The manual also says "Scale of the marker. Applied before the position/orientation. A scale of [1,1,1] means the object will be 1m by 1m by 1m. "

For Triangle_list, the scale is applied ON the position. I can understand that this behaviour can be useful if the Triangle_list is used to generate a mesh, but at least the documentation should mention the different interpretation.

more

I find this first comment slightly confusing. It's probably more meant for the build-in markers, e.g. a cube. The documentation http://wiki.ros.org/rviz/DisplayTypes... explictly mentions the meaning of scale for the different display types,

( 2014-08-13 04:32:46 -0500 )edit

i.e. for TRIANGLE_LIST: "Note that pose and scale are still used (the points in the line will be transformed by them)"

( 2014-08-13 04:32:48 -0500 )edit

Ehm. You are completely right. I don't how I could have missed this part :( Thanks!

( 2014-08-13 04:59:06 -0500 )edit