PointCloudLibrary / PointCloudLibrary/pcl

Viewport Creation in PCLVisualizer

Open
#2,119 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

kind: proposal module: visualization needs: feedback status: stale
Dominant language
C++
Stars
11.1k
Forks
4.7k
Avg merge
4d 10h
Merged PRs (30d)
6

Description

This issue follows up on the behavior discovered in https://github.com/PointCloudLibrary/pcl/pull/2110#issuecomment-349130625

Current Behavior

When creating a window with PCLVisualizer it comes populated by default with a viewport which spans the entire window. This is viewport 0.

Occasionally a user might need more than one viewport, so he uses PCLVisualizer::createViewPort () to accomplish this task. New ids will be assigned to the created viewport 1, 2 and forth.

Since the viewport created by default spans the entire window, the newly created viewport will always be created on top of the default one, rendering it useless.

To make things slightly more confusing, there's some indications stating that adding shapes to viewport with id = 0, means they will be added to all viewports in existence. This is also potentially problematic since, viewport 0 is apparently a valid viewport id.

Possible Solution

  • Implement a PCLVisualizer constructor which doesn't created a viewport by default
  • Add a removeViewPort method
  • Start using viewport id -1 when specifying that something should be added to all viewports

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the PCLVisualizer constructor and createViewPort() entry points, then trace how viewport 0 is initialized and how id 0 is handled when adding shapes. A contributor must first resolve which of the proposed viewport semantics the project should adopt; done means the chosen behavior is implemented so additional viewports are usable without the default viewport obscuring them.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-vision
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.