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

New plugin rqt_plotxy #360

Closed
wants to merge 25 commits into from
Closed

Conversation

rafael1193
Copy link

rqt_plot can plot topics with respect to time but sometimes it is useful to see its evolution in relation to another topic. For instance when representing trajectories, or doing other 2D scatter plots.

rqt_plotxy replaces time in the horizontal axis by another topic, so topics can be entered in (X, Y) pairs.

rqt_plotxy

May close #69

@dirk-thomas
Copy link
Contributor

The patch contains a lot of copied code. While copy-n-paste is easy in the first place it is expensive to maintain. Please consider either reusing code from the existing plugin or even extending the existing plugin to support both use cases.

Also you should customize the description of the package / main - currently they are indistinguishable from rqt_plot. Also the changelog is a one-to-one copy which does not apply to this new plugin. And the toplevel CMake file should not be checked in. That is custom to your workspace.

@rafael1193
Copy link
Author

I removed all the repeated code and now it is using or inheriting rqt_plot classes. Plugin description was updated, changelog was corrected and the CMake file was removed.

I had to modify the update_values function rqt_plot/data_plot/__init__.py to include a named parameter that disables value sorting. This change doesn't affect rqt_plot, but it is necessary to rqt_plotxy.

@cbandera
Copy link

Hi @rafael1193,

I was working on a similar plugin for the last days, before I found your pull request. But it turned out, that we have a different understanding of a XY plot. I was looking for a possibility to plot array data,(i.e. anything defined as [ ] ) against any other array data. Your approach on the other hand focuses on plotting any scalar value against another scalar value tracked over time.

You can have a look at my implementation on the rqt_plot_xy-branch of my fork.

I wonder if we could combine the two approaches somehow. I'd be happy to hear your feedback,

cbandera

@dirk-thomas
Copy link
Contributor

dirk-thomas commented Sep 9, 2016

I have applied your changes to the rqt_plot plugin (adding the keyword argument to make the sort optional) in 417fd3f.

Since this repo already contains way to many plugins I don't think more should be added since maintaining this big set becomes more and more a problem. Therefore I suggest you release your new plugin from a separate repo. With the change in rqt_plot you should be easily able to do so. If you do so please also add your plugin to the rqt wiki page to make it discoverable for other users. Thanks.

Therefore I will close this PR.

@dirk-thomas dirk-thomas closed this Sep 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

trajectory plotter
3 participants