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

Transport Topics Plugin #69

Merged
merged 1 commit into from
Aug 4, 2020

Conversation

AmrElsersy
Copy link
Contributor

@AmrElsersy AmrElsersy commented Jun 1, 2020

Topic Viewer Plugin

  • Topics Viewer Plugin which lists all ign-transport topics that is currently published.
  • Models each topic structure and shows its fields and nested fields
  • Plot-able fields are drag-able to be used by the plotting tool

Screenshot from 2020-08-25 04-56-59
Screenshot from 2020-08-25 05-01-07

@chapulina chapulina self-assigned this Jun 1, 2020
@chapulina chapulina linked an issue Jun 1, 2020 that may be closed by this pull request
17 tasks
@chapulina chapulina added enhancement New feature or request 🔮 dome Ignition Dome labels Jun 1, 2020
Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

Looking good, I did an initial review 😉

src/plugins/CMakeLists.txt Outdated Show resolved Hide resolved
src/plugins/transport_topics/TransportTopics.hh Outdated Show resolved Hide resolved
src/plugins/transport_topics/TransportTopics.cc Outdated Show resolved Hide resolved
src/plugins/transport_topics/TopicsModel.hh Outdated Show resolved Hide resolved
src/plugins/transport_topics/TopicsModel.hh Outdated Show resolved Hide resolved
src/plugins/transport_topics/TransportTopics.qml Outdated Show resolved Hide resolved
src/plugins/transport_topics/TransportTopics.qml Outdated Show resolved Hide resolved
src/plugins/transport_topics/TransportTopics.hh Outdated Show resolved Hide resolved
src/plugins/transport_topics/TransportTopics.cc Outdated Show resolved Hide resolved
src/plugins/transport_topics/TransportTopics.qml Outdated Show resolved Hide resolved
Copy link
Contributor

@claireyywang claireyywang left a comment

Choose a reason for hiding this comment

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

some quick style comments. I'll look more into code logic later.

src/plugins/topic_viewer/TopicViewer.cc Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.cc Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.cc Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.cc Outdated Show resolved Hide resolved
Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

I noticed that there's always one item under the topic name with the message type, for example, Pose_V below:

pose_v

I think we could get rid of that extra level. And just have the field names:

/world/default/dynamic_pose/info
├── header
└── pose

Also, just a reminder to make the plottable fields draggable 😉

src/plugins/topic_viewer/TopicViewer.hh Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.hh Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.hh Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.hh Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.hh Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.qml Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.qml Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.qml Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.qml Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.qml Outdated Show resolved Hide resolved
@AmrElsersy
Copy link
Contributor Author

@chapulina I solved all style issues you mentioned
and made the items draggable and the tooltip

Screenshot from 2020-06-07 02-32-20

Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

This is looking great! A couple more comments:

Right now there's no way to see a topic if it starts being published after the plugin was open. How about updating it periodically like this:

https://github.com/ignitionrobotics/ign-gui/blob/560389770529d50a1b7c925c211ba0967fccd12b/src/plugins/TopicViewer.cc#L371-L374

src/plugins/topic_viewer/TopicViewer.qml Outdated Show resolved Hide resolved
Copy link
Contributor

@claireyywang claireyywang left a comment

Choose a reason for hiding this comment

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

works great in general, just have some comments from debugging the Scene msg

src/plugins/topic_viewer/CMakeLists.txt Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.qml Outdated Show resolved Hide resolved
Copy link
Contributor

@claireyywang claireyywang left a comment

Choose a reason for hiding this comment

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

Spotted missing topics during debugging recursive messages in Scene
Terminal output

[GUI] [Dbg] [TopicViewer.cc:197] msg name: Scene, msg field name: header, msg field type: Header
[GUI] [Dbg] [TopicViewer.cc:197] msg name: Scene, msg field name: ambient, msg field type: Color
[GUI] [Dbg] [TopicViewer.cc:197] msg name: Scene, msg field name: background, msg field type: Color
[GUI] [Dbg] [TopicViewer.cc:197] msg name: Scene, msg field name: sky, msg field type: Sky
[GUI] [Dbg] [TopicViewer.cc:197] msg name: Scene, msg field name: fog, msg field type: Fog
[GUI] [Dbg] [TopicViewer.cc:197] msg name: Scene, msg field name: model, msg field type: Model
[GUI] [Dbg] [TopicViewer.cc:197] msg name: Scene, msg field name: light, msg field type: Light
[GUI] [Dbg] [TopicViewer.cc:197] msg name: Scene, msg field name: joint, msg field type: Joint

Topic viewer
scene topic viewer

Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

I did another pass. This is looking really neat! Did you give any thought to the periodic update?

src/plugins/topic_viewer/TopicViewer.cc Outdated Show resolved Hide resolved
#include <QStandardItem>
#include <QStandardItemModel>
#include <QHash>
#include <QByteArray>
Copy link
Contributor

@chapulina chapulina Jun 17, 2020

Choose a reason for hiding this comment

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

Did you get a chance to triage these, @AmrElsersy ?

src/plugins/topic_viewer/TopicViewer.hh Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.hh Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.hh Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.cc Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.cc Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.cc Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.cc Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.cc Outdated Show resolved Hide resolved
@chapulina chapulina mentioned this pull request Jun 22, 2020
17 tasks
Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

Left some comments on the test, it's looking pretty good, but I didn't try running it locally.

src/plugins/publisher/CMakeLists.txt Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer_TEST.cc Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer_TEST.cc Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer_TEST.cc Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer_TEST.cc Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer_TEST.cc Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer_TEST.cc Show resolved Hide resolved
Copy link
Contributor

@claireyywang claireyywang 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 adding the test! I did another review. It looks good in general. I just had some nitpicks on style and minor questions.

src/plugins/topic_viewer/TopicViewer.cc Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.cc Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.cc Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.cc Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.cc Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.cc Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer_TEST.cc Show resolved Hide resolved
Copy link
Contributor

@claireyywang claireyywang left a comment

Choose a reason for hiding this comment

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

a couple lingering style issue, otherwise looks good to me! Also make sure to git pull before working on local branch, I made some small commits along the way.

src/plugins/topic_viewer/TopicViewer.cc Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.cc Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.cc Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.cc Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.hh Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.hh Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.hh Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.hh Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.hh Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer_TEST.cc Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.qml Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.qml Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.cc Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.cc Outdated Show resolved Hide resolved
@claireyywang claireyywang changed the base branch from plotting-ui-project to master July 23, 2020 16:55
Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

Working for me, great work!

Besides the other comments, the only thing I'd like to ask is that you change all the indentation to be 2 spaces in the QML file. Right now there's a mix of 2 and 4 🙂 Thanks!

src/plugins/topic_viewer/TopicViewer_TEST.cc Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.qml Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.qml Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.qml Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.qml Outdated Show resolved Hide resolved
src/plugins/topic_viewer/TopicViewer.qml Show resolved Hide resolved
Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

LGTM! I just fixed a linter error on 3071d72.

Also, the new test is failing on CI. This should fix it on Ubuntu: gazebo-tooling/release-tools#255. And for Homebrew, we can disable it when #76 is merged forward.

Copy link
Contributor

@claireyywang claireyywang left a comment

Choose a reason for hiding this comment

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

LGTM!

…lds draggable

Signed-off-by: AmrElsersy <amrelsersay@gmail.com>
@chapulina chapulina merged commit 801c0cc into gazebosim:master Aug 4, 2020
@cottsay
Copy link

cottsay commented Aug 5, 2020

This appears to have caused a build regression on Windows: https://build.osrfoundation.org/job/ign_gui-ci-win/58/consoleFull#-20872881438ff58640-3599-4406-a210-216932f1748c

FYI @AmrElsersy / @chapulina / @claireyywang

@chapulina
Copy link
Contributor

Thanks, @cottsay , compilation should be fixed on #103 🤞

chapulina pushed a commit that referenced this pull request Aug 29, 2020
…lds draggable (#69)

Signed-off-by: AmrElsersy <amrelsersay@gmail.com>
chapulina pushed a commit that referenced this pull request Aug 31, 2020
…lds draggable (#69)

Signed-off-by: AmrElsersy <amrelsersay@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔮 dome Ignition Dome enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plotting tool
4 participants