Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pressing "r" enables rubber-band selection mode #740

Closed
taketwo opened this issue Jun 10, 2014 · 15 comments
Closed

Pressing "r" enables rubber-band selection mode #740

taketwo opened this issue Jun 10, 2014 · 15 comments

Comments

@taketwo
Copy link
Member

taketwo commented Jun 10, 2014

Seems like #703 introduced a bug. In PCL visualizer after pressing "r" to reset view the rubber-band selection mode is getting enabled, and instead of manipulating the camera, one starts to select points with mouse, which most of the times ends up in a segmentation fault.

@xiangxw Could you please have a look?

@VictorLamoine
Copy link
Contributor

Also see issue #732
I'm going to check tomorrow if the bug occurs without this commit

@taketwo
Copy link
Member Author

taketwo commented Jun 10, 2014

... sometimes a rectangle of selection (drag selection) is displayed ...

I guess this "sometimes" is exactly when "r" was pressed before.

For me the bug does not occur if compiled without the pull request in question.

@xiangxw
Copy link
Contributor

xiangxw commented Jun 11, 2014

@taketwo ok I will have a look at this.

@VictorLamoine
Copy link
Contributor

I guess this "sometimes" is exactly when "r" was pressed before.

Yes I didn't spot that 😉

For me the bug does not occur if compiled without the pull request in question.

I second that

@xiangxw
Copy link
Contributor

xiangxw commented Jun 11, 2014

I don't have a computer right now and I will try to figure this out tomorrow. Sorry for the trouble.

@xiangxw
Copy link
Contributor

xiangxw commented Jun 12, 2014

I think I find the problem.

My pull request does not handle the 'r' keyboard event correctly and pass the event to vtkInteractorStyleRubberBandPick, which enables rubber-band selection mode when 'r' is pressed.

I will fix this later 😊

xiangxw added a commit to xiangxw/pcl that referenced this issue Jun 12, 2014
Segmentation fault when "r" is pressed in PCLVisualizer.
The previous pull request PointCloudLibrary#703 does not handle the "r" keyboard event
correctly and pass the event to vtkInteractorStyleRubberBandPick,
which enables rubber-band selection mode when 'r' is pressed.
@xiangxw
Copy link
Contributor

xiangxw commented Jun 12, 2014

Here is the pull request to fix this: #742.
@VictorLamoine Does this pull request fix #732?

@VictorLamoine
Copy link
Contributor

You introduce a warning at PCL compilation:

pcl/visualization/src/interactor_style.cpp: In member function ‘virtual void pcl::visualization::PCLVisualizerInteractorStyle::OnChar()’:
pcl/visualization/src/interactor_style.cpp:421:8:warning : variable ‘keymod’ set but not used [-Wunused-but-set-variable]

We can't switch anymore to surface representation (press H to display the help in a visualizer) s, S : switch to a surface-based representation (where available)

I got some weird artefact's I have never seen before, I can't reproduce them, it happened only the first time I launched a visualizer with the new version installed:
https://mega.co.nz/#!RVlw3bgB!qlX4Wc7BrT-WiPZ1s9wn826Jg3s1VJ-Uqya6AVqMWKc

But it might come from my graphic card which runs through optimus/bumblebee !

@xiangxw
Copy link
Contributor

xiangxw commented Jun 12, 2014

@VictorLamoine
Sorry, I fixed the warning and the key 's', please check whether is right or not.
I don't get your word weird artefact. Could you please upload a normal version of the same video? Thanks.

@VictorLamoine
Copy link
Contributor

Everything is working now! This functionality is really handy I love it!
About the artifact: I think it comes from my graphic card it's not worth investigating.

@taketwo
Copy link
Member Author

taketwo commented Jun 12, 2014

@xiangxw On a separate note, I noticed that when starting pcl_viewer the output is following:

The viewer window provides interactive commands; for help, press 'h' or 'H' from within the window.
> Loading data/test47.pcd 
Restore camera parameters from .62f81ba6d07520e369c940c009291835c659a8.cam.
[done, 116 ms : 307200 points]
Available dimensions: x y z rgba label

The information about camera is printed right in the middle of file loading output. Do you think it would possible to fix? (I.e. move "Restore..." before "Loading..." or after "[done...".)

taketwo added a commit that referenced this issue Jun 12, 2014
Fix #740 and #732: Segmentation fault when "r" is pressed
@xiangxw
Copy link
Contributor

xiangxw commented Jun 12, 2014

@taketwo Yes I noticed that before. I will try to fix this.

@xiangxw
Copy link
Contributor

xiangxw commented Jun 12, 2014

@taketwo I pulled a request #744 to fix this.

@taketwo
Copy link
Member Author

taketwo commented Jun 12, 2014

Actually you requested a pull :)

@xiangxw
Copy link
Contributor

xiangxw commented Jun 12, 2014

haha, sorry for my bad english.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants