Skip to content

Stable version of notification filter#34

Open
Daniel-Meza wants to merge 8 commits intoPaperFanz:noeticfrom
Daniel-Meza:noetic-notification_filter
Open

Stable version of notification filter#34
Daniel-Meza wants to merge 8 commits intoPaperFanz:noeticfrom
Daniel-Meza:noetic-notification_filter

Conversation

@Daniel-Meza
Copy link
Copy Markdown

First working version of notification filter.
The filter works as follows:

  • Subscribes to a ROS topic (default is "notification_topic").
  • Scrolling messages are displayed as they are posted.
    Message Type: std_msgs/String
    Format: "data: 'This is a message'"
  • Dialog box provides options to change the subscribed topic and the number of messages displayed.

Copy link
Copy Markdown
Collaborator

@AdamPettinger AdamPettinger left a comment

Choose a reason for hiding this comment

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

Great work @Daniel-Meza! This looks very good. I mostly left cleanup and cosmetic recommendations/comments.

I think the biggest 2 changes I would want to see are:

  1. Move the Notification-specific padding at the topic of the multiline print to the Notification filter itself so that printing function becomes more agnostic. Left a comment about this in the code
  2. Didn't leave a comment about this, but I dislike the order the queue is displayed. New messages are added to the bottom so that the oldest messages are on top. That seems backwards of what it should be to me. Maybe @PaperFanz has input about this. It would probably be pretty easy to have the new messages appear on the top: switching from queue to deque is probably the way

Comment thread insitu_plugins/inc/Notification/Notification.hpp Outdated
Comment thread insitu_plugins/inc/Notification/Notification.hpp Outdated
Comment thread insitu_plugins/src/Notification/Notification.cpp Outdated
Comment thread insitu_plugins/src/Notification/Notification.cpp Outdated
Comment thread insitu_plugins/src/Notification/Notification.cpp Outdated
Comment thread insitu_plugins/src/Notification/Notification.cpp Outdated
Comment thread insitu_utils/src/painter.cpp Outdated
Comment thread insitu_utils/src/painter.cpp Outdated
Comment thread insitu_utils/lib/insitu_utils/painter.hpp Outdated
Comment thread insitu_plugins/src/Notification/Notification_dialog.cpp Outdated
@Daniel-Meza
Copy link
Copy Markdown
Author

@AdamPettinger
I've implemented all of your suggestions with two exceptions.

First, I've yet to change the order of the queue. My reasoning was to make it have the order of a terminal, where new messages are at the bottom. But I'm not set on either so just let me know and I can put new messages on top.

Secondly, there are still those debugging lines commented out. Need them to finalize the change above so those will be removed next time.

Copy link
Copy Markdown
Collaborator

@AdamPettinger AdamPettinger left a comment

Choose a reason for hiding this comment

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

Look good @Daniel-Meza!

@Daniel-Meza
Copy link
Copy Markdown
Author

Daniel-Meza commented Jan 13, 2022

@AdamPettinger

All comments above have been addressed.
New checkbox inside the dialog box allows the user to change the position of new messages to show either at the bottom (by default) or at the top.

Let me know if you encounter any problems.

Copy link
Copy Markdown
Collaborator

@AdamPettinger AdamPettinger left a comment

Choose a reason for hiding this comment

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

There was one change needed to get this to build after the recent batch of changes.

While testing this more thoroughly I discovered a problem: the placement of the drawn text is weird depending on the length of the topic. Try this:

  1. Change topic name to "test" -> text should disappear
  2. Change topic name to "reallyreallyreallyreallyreallylongstring" -> text is way lower in the box
  3. Change topic name to "elevenchars" -> text is half off the top side of the box

I don't really know what is causing this, but for topic names of less than 11 characters, the filter text disappears. Long long topic names puts it very low on the screen. Thoughts?

Comment thread insitu_plugins/src/Notification/Notification.cpp Outdated
Copy link
Copy Markdown
Owner

@PaperFanz PaperFanz left a comment

Choose a reason for hiding this comment

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

The code looks good at a glance but make sure you are running the format script before committing every time. With these types of pull requests it may be best to include screenshots or even a short screen capture to demonstrate the functionality of the pull request.

@Daniel-Meza
Copy link
Copy Markdown
Author

@AdamPettinger

Made changes to the filter.
You already saw most of it in person.

@Daniel-Meza Daniel-Meza force-pushed the noetic-notification_filter branch from f398ad2 to 878f121 Compare February 1, 2022 22:24
Copy link
Copy Markdown
Collaborator

@AdamPettinger AdamPettinger left a comment

Choose a reason for hiding this comment

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

I just tested the most recent changes, and everything looks really good!

Great job @Daniel-Meza!

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.

3 participants