gazebosim / gazebosim/gz-rendering

Add Arrow and Axis markers

Open
#493 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
81
Forks
90
Avg merge
1d 13h
Merged PRs (30d)
10

Description

The creation of arrow and axis visuals has been supported since https://github.com/ignitionrobotics/ign-rendering/pull/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 `CompositeVisual`s 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 `OgreObject`s. 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 https://github.com/ignitionrobotics/ign-msgs/pull/62

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.