Skip to content

[Sensor] Visualize the semantic observations#1207

Merged
bigbike merged 14 commits intomasterfrom
viz-semantic
May 4, 2021
Merged

[Sensor] Visualize the semantic observations#1207
bigbike merged 14 commits intomasterfrom
viz-semantic

Conversation

@bigbike
Copy link
Copy Markdown
Contributor

@bigbike bigbike commented Apr 30, 2021

Motivation and Context

As titled.
This PR adds a brand new functionality to visualize the observations from the semantic sensor.

The results are as follows:
rgb-1
semantic-1
rgb-2
semantic-2

How Has This Been Tested

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Apr 30, 2021
@bigbike bigbike changed the title [Sensor] visualize the semantic observations [Sensor] Visualize the semantic observations Apr 30, 2021
if (flags_ & Flag::DepthTexture) {
setColorMapTransformation(1.0f / 512.0f, 1.0f / 1000.0f);
} else if (flags & Flag::ObjectIdTexture) {
setColorMapTransformation(1.0f / 512.0f,
Copy link
Copy Markdown
Contributor Author

@bigbike bigbike Apr 30, 2021

Choose a reason for hiding this comment

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

@mosra:
I was thinking the wrapping of the colorMapTexture found here.
I believe for depth rendering it should be set to ClampToEdge while for semantic rendering it should be set to Repeat. How do you think?
(Update: I just changed the code above.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@mosra:
Another question: we can clear the depth, clear the color, but how can we clear the objectId (another color attachment)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

use the clearDepth() / clearColor() APIs on the framebuffer, instead of clear(), those allow you to clear also non-integer attachments

@bigbike bigbike merged commit ce834eb into master May 4, 2021
@bigbike bigbike deleted the viz-semantic branch May 4, 2021 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants