Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Arrow and Axis markers #493

Open
chapulina opened this issue Nov 24, 2021 · 1 comment
Open

Add Arrow and Axis markers #493

chapulina opened this issue Nov 24, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@chapulina
Copy link
Contributor

The creation of arrow and axis visuals has been supported since #87. But these shapes can't be used as markers yet:

https://github.com/ignitionrobotics/ign-rendering/blob/04a50f8a88653c25a0824aa1277e5b8b0e17d704/include/ignition/rendering/Marker.hh#L35-L72

Desired behavior

I'd like to create markers shaped like arrows and axes.

Alternatives considered

Creating axis and arrow visuals instead of markers. I think the main functionality we miss is lifetime:

https://github.com/ignitionrobotics/ign-rendering/blob/04a50f8a88653c25a0824aa1277e5b8b0e17d704/include/ignition/rendering/Marker.hh#L85-L88

Another option would be for downstream applications to create separate markers for each piece of these more complex markers (i.e. cylinders and cones).

Implementation suggestion

What sets axis and arrow apart from the other geometries and renderables being used as markers is that they're CompositeVisuals and have multiple geometries inside them. That's complicated because Marker derives from Geometry, and there are multiple places in the code that assume that geometries have only one "object" (i.e. one OgreObject).

In hindsight, I wish we had made Marker derive from Visual instead, so it could hold many geometries.

I explored the idea of making a marker hold many geometries, but that breaks many assumptions. In particular, we'd need to also allow Ogre*Geometry to hold many OgreObjects. At that point, we're basically treating geometries as visuals.

Another idea is creating axis and arrow meshes that are glued together, so they can be used as primitives. The disadvantage would be losing control over materials / scale for each piece.

The last thing I can think of is creating a "composite marker" which can hold many markers... Or can hold visuals...

Additional context

There's already axis and arrow support on the marker message, see gazebosim/gz-msgs#62

@chapulina chapulina added the enhancement New feature or request label Nov 24, 2021
@osrf-triage osrf-triage added this to Inbox in Core development Nov 24, 2021
@chapulina
Copy link
Contributor Author

I explored the idea of making a marker hold many geometries

That work is on these branches, but only the first geometry is being shown right now 😕

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant