lrse / ros-keyboard

Keyboard driver for ROS
27 stars 75 forks source link

Add some optional parameters for customizing window appearance #2

Closed corot closed 8 years ago

corot commented 8 years ago

If not used, the application behaves exactly as before. The new parameters are: window_width, window_height, window_caption, shown_text, text_font and font_size.

SOME HINTS:

TODO:

protobits commented 8 years ago

Hi, thanks for you work. However, I really don't feel that drawing text on the window is a goal for this package, nor I see much use for it. The window is only there since it is not possible to receive input otherwise. What was your goal when adding this?

Best, Matias

On Tue, Nov 17, 2015 at 7:58 AM, Jorge Santos Simón < notifications@github.com> wrote:

If not used, the application behaves exactly as before. The new parameters are: window_width, window_height, window_caption, shown_text, text_font and font_size.

SOME HINTS:

  • shown_text requires SDL2 and SDL2's TTF extension so it doesn't ignore line breaks (as SDL one does). I already added to rosdep repo, so it will be automatically installed with rosdep.
  • text_font requires the full path of the .ttf file, e.g. "/usr/share/fonts/truetype/freefont/FreeMono.ttf"

TODO:

  • Would be cool to have a better way for finding fonts, instead of specifiyng the full path of the .ttf file
  • Text color can also be easily customizable.

You can view, comment on, or merge this pull request online at:

https://github.com/lrse/ros-keyboard/pull/2 Commit Summary

  • Add some optional parameters for customizing window appearance:
  • Use Markdown Syntax
  • Shutdown ROS when the window is closed
  • Render also if not showing text so the window is always black
  • Add an example

File Changes

Patch Links:

— Reply to this email directly or view it on GitHub https://github.com/lrse/ros-keyboard/pull/2.

corot commented 8 years ago

Hi, I use this package to allow the user to interact with a robot. I find useful to show the available commands on input window, for example as here. I think it's a reasonable usecase, because a black small window is not very striking as interface.

protobits commented 8 years ago

I understand the use case, but I feel this diverges from the point of this node (i.e. documenting the keymap) which should be as simple as possible. Thanks for your time submitting the pull request but I'd rather not include this functionality.

Best, Matias

corot commented 8 years ago

No problem