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

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

asked 2014-08-12 12:31:36 -0600

NEngelhard gravatar image

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 flag offensive close merge delete

Comments

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

bvbdort gravatar image bvbdort  ( 2014-08-12 13:46:38 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2014-08-13 03:47:14 -0600

dornhege gravatar image

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.

edit flag offensive delete link more
0

answered 2014-08-13 03:56:58 -0600

NEngelhard gravatar image

@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.

edit flag offensive delete link more

Comments

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,

dornhege gravatar image dornhege  ( 2014-08-13 04:32:46 -0600 )edit

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

dornhege gravatar image dornhege  ( 2014-08-13 04:32:48 -0600 )edit

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

NEngelhard gravatar image NEngelhard  ( 2014-08-13 04:59:06 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-08-12 12:31:36 -0600

Seen: 258 times

Last updated: Aug 13 '14