Robotics StackExchange | Archived questions

How do I disable the edges drawn on a CUBE_LIST marker?

I'm making wireframe boxes, and I'd like to move from a bunch of Marker::CUBE to a few Marker::CUBELIST. The problem I've got, though, is the appearance - it looks like the CUBELIST markers have a border drawn on them that stretches with the marker scale. I do not want this; I want it to look like a CUBE, but I cannot find any documentation anywhere that this is an option I can disable. The best I could find is this bug from 9 years ago where hershwg said they were leaving the borders on, but I can't find even a mention of this anywhere else online.

This is how it looks when I do it as a Marker::CUBE_LIST. Note the "cigarette ash" ends, where the border is stretched along the long axis of the cube, and then also because of the borders it's very obvious that the cubes are overlapping.

This is how it looks when I do it as a Marker::CUBE. Much cleaner appearance and it's not apparent that the corners overlap.

Even if I stopped short and "mitered" the corners so they touched but didn't overlap, the borders will make them look as individual members instead of as one unified box wireframe, and even still the stretched borders just look bad.

Asked by RoboticsChuck on 2021-09-24 10:53:42 UTC

Comments

Hi @Saundecp. Just curious can't you use lines instead to create the cubes and play with the thickness?

Asked by osilva on 2021-09-27 08:48:57 UTC

@osilva - Several reasons! (1) the lines show as billboards, meaning they're always facing the camera, so they don't render as cleanly as the cubes do, (2) the rendering is messed up for us (having the same issue mentioned here) and (3) because the lines are always facing the camera it's not really possible to calculate the amount of "overlap" required to get clean corners, so the corners always look a little broken. In short, the LINE_LIST option does look acceptable, but it does not look good in my honest opinion. At least, not for making these kinds of wireframe shapes.

Asked by RoboticsChuck on 2021-09-27 09:16:22 UTC

I reviewed the documentation and I couldn't find what else can you do with the Cubes. One suggestion is to look at the source code and modify for your application if you can't find other ways to do it:

https://github.com/ros-visualization/interactive_markers/blob/051af05d3eb4378938e89fbf6030f5e3a6ad014a/src/test/bursty_tf.cpp

Asked by osilva on 2021-09-27 09:23:29 UTC

Answers