Skip to content

Conversation

@mannewalis
Copy link

@mannewalis mannewalis commented Jul 7, 2022

Proposed change(s)

PR adds a property to Drawing3dManager to allow the developer to specify the layer to render into.
This PR just adds the support to specify the layer, and it defaults to UI.
A followup PR will be needed for RoboticsSensors that use cameras, to optionally grab this layer index (if the visualizations package is present) and set the layer mask appropriately.

Useful links (GitHub issues, JIRA tickets, forum threads, etc.)

https://jira.unity3d.com/browse/AIRO-1941

Types of change(s)

  • Bug fix
  • New feature
  • Code refactor
  • Documentation update
  • Other (please describe)

Testing and Verification

Please describe the tests that you ran to verify your changes. Please also provide instructions, ROS packages, and Unity project files as appropriate so we can reproduce the test environment.

Test Configuration:

  • Unity Version: [e.g. Unity 2020.2.0f1]
  • Unity machine OS + version: [e.g. Windows 10]
  • ROS machine OS + version: [e.g. Ubuntu 18.04, ROS Noetic]
  • ROS–Unity communication: [e.g. Docker]

Checklist

  • Ensured this PR is up-to-date with the dev branch
  • Created this PR to target the dev branch
  • Followed the style guidelines as described in the Contribution Guidelines
  • Added tests that prove my fix is effective or that my feature works
  • Updated the Changelog and described changes in the Unreleased section
  • Updated the documentation as appropriate

Other comments

SerializedProperty layer = property.FindPropertyRelative("LayerNumber");
position = EditorGUI.PrefixLabel(position, GUIUtility.GetControlID(FocusType.Passive), label);
if (layer != null)
layer.intValue = EditorGUI.LayerField(position, layer.intValue);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Though you really shouldn't have to go to this much trouble, there should be a SelectableLayer struct predefined in the engine...

{
"name": "com.unity.robotics.visualizations",
"version": "0.7.1-preview",
"version": "0.7.2-preview",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't bump the version number until the changes get merged to main.

@hyounesy hyounesy self-requested a review July 26, 2022 18:00
Copy link
Contributor

@hyounesy hyounesy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I verified that visualizations don't show up in the rgb and stereo sensors.

@hyounesy hyounesy changed the title Justing/add visualization layer support AIRO-1941 Justing/add visualization layer support Jul 29, 2022
@hyounesy hyounesy merged commit 9fda95f into dev Jul 29, 2022
@hyounesy hyounesy deleted the justing/add-visualization-layer-support branch July 29, 2022 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants