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

rqt_plot: "edit curves and line axes" does not work #103

Closed
ahendrix opened this issue Jul 17, 2013 · 29 comments
Closed

rqt_plot: "edit curves and line axes" does not work #103

ahendrix opened this issue Jul 17, 2013 · 29 comments
Labels

Comments

@ahendrix
Copy link

When I push the "edit curves and line axes" button, I get a stacktrace:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_qt4.py", line 474, in edit_parameters
    figureoptions.figure_edit(axes, self)
  File "/usr/lib/pymodules/python2.7/matplotlib/backends/qt4_editor/figureoptions.py", line 132, in figure_edit
    icon=get_icon('qt4_editor_options.svg'), apply=apply_callback)
  File "/usr/lib/pymodules/python2.7/matplotlib/backends/qt4_editor/formlayout.py", line 511, in fedit
    dialog = FormDialog(data, title, comment, icon, parent, apply)
  File "/usr/lib/pymodules/python2.7/matplotlib/backends/qt4_editor/formlayout.py", line 427, in __init__
    self.formwidget.setup()
  File "/usr/lib/pymodules/python2.7/matplotlib/backends/qt4_editor/formlayout.py", line 399, in setup
    widget.setup()
  File "/usr/lib/pymodules/python2.7/matplotlib/backends/qt4_editor/formlayout.py", line 374, in setup
    widget.setup()
  File "/usr/lib/pymodules/python2.7/matplotlib/backends/qt4_editor/formlayout.py", line 281, in setup
    field.addItems(value)
TypeError: QComboBox.addItems(QStringList): argument 1 has unexpected type 'list'

ros-groovy-rqt-plot 0.2.16-0
ros-groovy-python-qt-binding 0.2.9-0
Ubuntu Precise 12.04

@ghost ghost assigned DorianScholz Jul 17, 2013
@ablasdel
Copy link
Contributor

@DorianScholz Have you seen this issue before?

@DorianScholz
Copy link
Member

I have not seen this before. But I'm not using the matplot backend, I very much recommend using the pyqtgraph backend. I just could not make it the default, because it is not in the Ubuntu repos.

@ablasdel
Copy link
Contributor

ablasdel commented Aug 2, 2013

@DorianScholz Since Matplot has so many issues what would the harm be in depending on the best of the lot and setting it as default?

@DorianScholz
Copy link
Member

I'd be OK with this. But the best of the lot to me is pyqtgraph, which is not available from the Ubuntu repos and needs to be manually downloaded and installed. So depending on it is not as easy as depending on matplotlib. But if you feel this would be OK, go ahaed!

@ablasdel
Copy link
Contributor

ablasdel commented Aug 2, 2013

The Manual bit probably makes it a no go. Would the qwtplot possibly work? It is in the ubunto repos and would be better than matplot right?

@ablasdel
Copy link
Contributor

ablasdel commented Aug 5, 2013

Also wouldn't adding items to a combo box be at the Qt widget layer? I don't think this is a backend problem at all.

@DorianScholz
Copy link
Member

The exception happens inside of the matplotlib Qt4 backend, so this is a problem with matplotlib.
The last line of the exception reads:
QComboBox.addItems(QStringList): argument 1 has unexpected type 'list'

Conversion from "list" to "QStringList" is automatic in PyQt/PySide (if the correct SIP API levels are set).
So it would be important to know whether this happens running with PySide or PyQt bindings, which I cannot see from the backtrace.
@ahendrix If you could reproduce this with forced bindings (rqt -b pyside / rqt -b pyqt), this would be very helpful.

@130s
Copy link
Member

130s commented Aug 6, 2013

My 2 cents - Given that pyqtgraph provides the best functionality but not in Ubuntu repo, but its .deb is available, I would say from user's point of view that it's acceptable to make pyqtgraph as default for rqt_plot, and ask users for manual installation, which can be done by a few clicks.

I'm not yet sure if it's acceptable though from other aspects (ROS package release criteria if any etc.), but at least buildfarm shouldn't be a problem as long as pyqtgraph isn't included in dependency.

Another idea (not sure if it's feasible) is write script in rosdep rule to wget and dpkg the .deb file.

@ahendrix
Copy link
Author

ahendrix commented Aug 6, 2013

From a packaging perspective, rqt_plot should have a dependency on its default backend. Otherwise, it will be broken by default, which will result is a lot of angry users and more bug reports to deal with.

If we want to make pyqtgraph the default backend, we should set up a rosdep for pyqtgraph, and possibly get the deb incorporated into the ROS repositories. It's also worth thinking about how users on non-Ubuntu distributions get pyqtgraph; it's probably worth trying to set up rosdeps for Fedora and OSX.

On a more general note, this bug should be very easy to reproduce: select matplotlib as the backend and push the "edit curves and axes" button.

If matplotlib isn't a supported backend (and it's really sounding like it isn't), it should be removed.

@130s
Copy link
Member

130s commented Aug 6, 2013

I gave it a try to make rosdep rule and keep failing (question asked).

@130s
Copy link
Member

130s commented Aug 7, 2013

Looks like rosdep no longer supports scripted rule http://www.ros.org/reps/rep-0111.html#bash-scripts that's why I kept failing.

@ahendrix
Copy link
Author

ahendrix commented Aug 9, 2013

We already have a deb of pyqtgraph; what's the problem with getting it incorporated into the ROS deb repository? This is done for many other tools, such as openni, collada-dom, etc.

@ablasdel
Copy link
Contributor

ablasdel commented Aug 9, 2013

This seems like a good option. Is there a process for how we can complete this or who we need to talk too?

@ahendrix
Copy link
Author

ahendrix commented Aug 9, 2013

I think you should contact Tully; he does most of the maintenance on the ROS deb repositories.

@ablasdel
Copy link
Contributor

ablasdel commented Aug 9, 2013

I contacted him and will post when I get a response.

@130s
Copy link
Member

130s commented Aug 9, 2013

I had no idea if putting a 3rd party .deb into ROS deb repo was possible. Thanks for letting us know Austin.

@tfoote
Copy link
Contributor

tfoote commented Aug 9, 2013

Picking up random debs is not something to take lightly. Our general rule is that we will import backports of packages submitted/accepted upstream. We do not want to become a complete linux distribution, picking arbitrary versions of all packages and doing the full integration. Also the package should be generally available for other platforms, and it needs to stick to ABI compatibility. If you need something like this I would recommend creating a ros wrapper package such that it will be scoped and installed into /opt/ros/DISTRO. This will keep the maintenance scope down and not interfere with potential future versions released into upstream.

@ablasdel
Copy link
Contributor

ablasdel commented Aug 9, 2013

The pyqtgraph source is available here: http://www.pyqtgraph.org/
They seem to have set up an "unofficial" github version of the source here: https://github.com/lcampagn/pyqtgraph but it is 2 years old.

I'll look around to see if there is a more recent public github or svn repo somewhere that they are using.

@ablasdel
Copy link
Contributor

Took a moment this morning to search. The code lives here: https://code.launchpad.net/pyqtgraph creating a release repo pointed at this should be doable. I will look into that today.

@ablasdel
Copy link
Contributor

Bit of a roadblock it looks like bloom doesn't support bazaar repos as vcs_types. @wjwwood Am I reading the bloom code correctly on this?

@ghost ghost assigned ablasdel Aug 14, 2013
@wjwwood
Copy link
Member

wjwwood commented Aug 14, 2013

bloom does not support bzr.

I would take a pull request to add support though. bloom is designed to take different upstream vcs and vcstools supports bzr, so there aren't a lot of road blocks to adding support I think, but the other, easier solution is to use tar, and use one of their release tarballs.

@wjwwood
Copy link
Member

wjwwood commented Aug 14, 2013

Honestly, I don't know how we got completely side tracked away from the point of this issue, which is that matplotlib, which is the default backend, is broken. Reguardless of getting better support for pyqtgraph and switching it to the default, we should probably fix or remove matplotlib if it doesn't work...

@ablasdel
Copy link
Contributor

Oh sorry for not being clear that was my intention as soon as we don't need matplotlib we would excise it. (or at least that is what I was assuming)

@ablasdel
Copy link
Contributor

Newest info: The tools that currently exist don't handle building/installing pure python packages.

@dirk-thomas I was told that stdeb might be the answer to getting this done and that you would be able to give some insight into getting this built properly.

linking the tar that we are trying to build to keep easy track: http://www.pyqtgraph.org/downloads/pyqtgraph-0.9.7.tar.gz

@ablasdel
Copy link
Contributor

I am going to have to pull myself off of issues for plugins I didn't implement for now due to hardware and time concerns. @dirk-thomas @DorianScholz I think this is a very important issue could someone please pick it up?

@130s
Copy link
Member

130s commented Sep 20, 2013

Back to the original reported issue (since I just saw the same error when I clicked on "check" sign that should open a config dialog for the graph), I investigated a little about the status of matplotlib and this issue might not be going to be resolved in the library on Precise; Looks like similar error was fixed but that was after Precise was released and its .deb version has been staying the same 1.1.1.

I just added recommendation of installing pyqtgraph to wiki. Maybe adding console output for the recommendation is one way to work this around.

@ablasdel ablasdel added this to the untargeted milestone Jun 9, 2014
@vincentrou
Copy link

I do not reproduce this issue on Ubuntu 12.04 with :
ros-hydro-rqt-plot 0.3.12
ros-hydro-python-qt-binding 0.2.16
python-matplotlib 1.1.1
Should be closed ?

@trainman419
Copy link
Contributor

Confirmed fixed in Indigo on Ubuntu 14.04 as well:
ros-indigo-rqt-plot 0.3.12
ros-indigo-python-qt-binding 0.2.17
python-matplotlib 1.3.1

@dirk-thomas
Copy link
Contributor

Thank you both for checking.

I will close the ticket. If anyone is still having this problem please feel free to comment here.

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

No branches or pull requests

9 participants