Gazebo | Ignition | Community
Ask Your Question
0

How to change thickness of Dynamic Lines?

asked 2018-12-19 11:32:19 -0600

rasecg3 gravatar image

Hi,

I'm currently using dynamic lines for application, but the lines created are too thin and I'd like to make it thicker. How could I do that?

If not possible, could someone point an alternative?

Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-12-19 11:40:36 -0600

chapulina gravatar image

updated 2018-12-19 12:13:28 -0600

Ogre, the rendering engine used by Gazebo, only supports 1px wide lines. An alternative would be to use billboards, or very thin cylinders.

You can find an example of billboards being used on Gazebo's source code on the model editor's JointMaker for example. In this case, the billboards are the squares which get attached to both ends of the joint line.

edit flag offensive delete link more

Comments

Humm, thank you! What would be "billboards"?

rasecg3 gravatar imagerasecg3 ( 2018-12-19 12:07:50 -0600 )edit

updated the question pointing to some billboard code.

chapulina gravatar imagechapulina ( 2018-12-19 12:13:42 -0600 )edit

It worked, thanks! I actually used Billboard Chains. The problem I have now it that the lines are being detected by my GPU laser. Is there a way remove the lines obstruction, but make it still visible by the cameras?

rasecg3 gravatar imagerasecg3 ( 2018-12-20 05:55:19 -0600 )edit

I managed by doing the following: 1 - created a specific mask for the billboard, i.e, GZ_VISIBILITY_BILLBOARD 2 - billboard->setVisibilityMask(GZ_VISIBILITY_BILLBOARD) 3 - changed GPULaser 1st and 2nd viewports to: (GZ_VISIBILITY_ALL & ~(GZ_VISIBILITY_GUI | GZ_VISIBILITY_SELECTABLE | GZ_VISIBILITY_BILLBOARD)) 4 - recompiled gazebo source code. The question is...is there a way to do it without changing gazebo source code? Form model plugin I think 1st and 2nd viewport are not accessible.

rasecg3 gravatar imagerasecg3 ( 2018-12-20 08:51:36 -0600 )edit

You should be able to use `GZ_VISIBILITY_GUI` instead of the new mask you created.

chapulina gravatar imagechapulina ( 2018-12-20 11:28:38 -0600 )edit

RViz also uses billboard lines. I've wondered why they do this instead of using GL_LINES of a specific pixel size. This could be because I'm an old graphics curmudgeon and "lines" makes me think of GL_LINES. I suppose there are good uses for both styles.

mogumbo gravatar imagemogumbo ( 2019-01-03 14:18:12 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-12-19 11:32:19 -0600

Seen: 599 times

Last updated: Dec 19 '18