PointCloudLibrary / PointCloudLibrary/pcl
Viewport Creation in PCLVisualizer
Nobody has claimed this yet.
- 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
removeViewPortmethod - Start using viewport id -1 when specifying that something should be added to all viewports
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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