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

fix resize bug #69

Merged
merged 1 commit into from
Feb 6, 2021
Merged

Conversation

rhaschke
Copy link
Contributor

@rhaschke rhaschke commented Feb 4, 2021

This reverts #52 and instead just sets the minimum canvas size to (1,1), which avoids the bugs mentioned in #35 and #54.
This PR takes a similar approach as #56 (which targets the ros2 branch) but sets the minimum size of the canvas widget.

Copy link
Contributor

@mabelzhang mabelzhang left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. The setMinimumSize(1,1) gets rid of the numpy.linalg.linalg.LinAlgError: Singular matrix error when I did the steps in #54. But the safe_tight_layout is still needed on my system, otherwise rqt_plot crashed right away.

src/rqt_plot/data_plot/mat_data_plot.py Outdated Show resolved Hide resolved
src/rqt_plot/data_plot/mat_data_plot.py Outdated Show resolved Hide resolved
@rhaschke
Copy link
Contributor Author

rhaschke commented Feb 5, 2021

Sorry, I tested only on Noetic, where the matplotlib issue is already fixed natively. I removed the reversion of #52 from this PR now.

Copy link
Contributor

@mabelzhang mabelzhang left a comment

Choose a reason for hiding this comment

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

This works. I tested on Kinetic, Melodic, and Noetic. Kinetic and Melodic are clean. Noetic has a warning but no crashes.

For future reference, the warning on Kinetic is

/home/developer/viper/catkin_ws/install_isolated/lib/python3/dist-packages/rqt_plot/data_plot/mat_data_plot.py:122: UserWarning: Tight layout not applied. The bottom and top margins cannot be made large enough to accommodate all axes decorations. 
  self.figure.tight_layout()

@mabelzhang mabelzhang merged commit 0b9cc04 into ros-visualization:master Feb 6, 2021
@rhaschke rhaschke deleted the fix-resize-bug branch February 6, 2021 21:44
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

Successfully merging this pull request may close these issues.

2 participants