for a project i have been assigned, I have been given 2 robots...one has ROS and the other basically uses Windows. So my task is to develop one Graphic User Interface that can be used for both robots.
From the GUI , a user should be able to.
- Connect to the Robot
- Move and control the robot.
- Change speed...etc
I will like to ask for advice as i am about to start this project.
How can i go about this? and which has better support for my requirements?
From my research i have read people recommend QT...for cross platform developmens. Are there any other alternatives? any book recommendations?
The goal will be to have a GUI that is compatible for both systems. Any Recommendations or help is welcomed.
First you setup ROS On windows Using WSL (or any other ways to do it WSL is most stable).
after that you need achieve everything you want the GUI does on robot using ROS terminal.
after that your write the GUI. You can Choose any framework You want(You need C++ or Python for compatibility issues with ROS) but QT Framework is most used in multi platform Application and has a lot of support.
the compatibility with non-ROS is what You should Implement in your Application Like Choosing or something Like that.
PySimpleGUI is a framework built on top of tkinter that runs on the Pi. There are some example programs written to do robot remote control. There are GUI buttons designed specifically for "realtime" control of hardware that will provide immediate and constant feedback when a button is held.
It runs on Python 2.7 and 3 (recommend 3).
There is a Recipe in the Cookbook that matches your problem located here.
If you use PySimpleGUI in your project, post in the Issues area on GitHub if you have any questions and you'll get support.
Related
I made a really simple, pseudo GUI using pythondialogue (its a wrapper for whiptail for bash), I need it to be cross platform between linux and Mac OSX. The main issue is its really hard to find information on pythondialogue, the only documentation seems to be on their own site. I would just use whiptail, but I'm learning python so using this to hone my python skills.
What I like about pythondialogue (and whiptail) is that its not really a GUI, just a dialogue inside the CLI, so it can used purely through the command line such as if you SSH to the computer you want to run it on. Can tkinter do this too?
Either way, a big thing I'm wondering is what benefits tkinter would provide over regular pythondialogue. Obviously the difference is it lets you create proper GUI applications, but would it be wisest to only create a GUI application in cases where its absolutely necessary?
tkinter sounds like the easiest way to code GUIs in python. What disadvantages does it have to PyQt or wxPython. I wan't to start developing mobile apps as soon as possible and I see iOS and android apps can be written using python and Qt can be used to write both Android and iOS apps. So with this in mind, would learning PyQt mean I would also be developing the skills I'll need to create iOS and android apps? If so, this is most definitely what I'm going to do.
Learning PyQt will definitely help you learn to create IOS and Android apps. Even more, PyQt comes with QtDesinger which is a visual editor for creating apps with minimal coding. Tkinter in my perspective is for very light GUI programming. If you feel like you want to make money of these apps, I would highly advise you to check out Kivy.
I'm trying to find a good GUI library I could use to create a program on the computer that connects to a microcontroller by USB. I've never done any GUI work before but I have done a lot of webpage design/tools. We are going to program the microcontroller with C but I don't think the GUI will need to be C. It needs to work on Windows, so probably compile on Windows too. I've also never done any USB transmission but I'm hoping to take it one step at a time.
Right now I'm looking at using GTK but it needs a bunch of other things to download with it. I'm also going to look at QT and someone else suggested making a Windows Forms Application. There's a lot of options out there so I'm having trouble figuring it out.
As for my requirement, it just needs to be a very simple GUI that has a few control buttons, a display area (info from microcontroller), a notification area (basically error messages go here), and maybe a graph. I've included a prototype GUI help give you an idea of what I'm doing.
Edit: It needs to run and compile on Windows. We don't really have a budget for it, free open source is preferred. I don't need something elaborate and fancy, I just want to get it done as fast as possible.
We are using a TTL-232R cable, UART interface. I know nothing about USB transmission, school has crushed me.
From what you've specified, I would set base-camp up at Java.
Java in Eclipse to write the code.
Java Swing libraries (helped by the WindowBuilder plugin for Eclipse) to "draw" the GUI. It is very easy to create "Windowsy" GUIs using these.
JFreeGraph libaries to allow you to create graphs very easily, again from within Eclipse.
RXTX library for "virtual COM port" serial communication within Java (it doesn't sound like you're using proper USB, but just RS232 with a USB adapter).
Your created GUI would run on any machine with Java installed, which is not a big ask for the end user. You can even create a Windows executable/installer from the resulting Java files if you wanted it to be a (apparently) native Windows application.
And - bonus - all the tools mentioned are free as a bird.
It will kind of depend on what kind of compiler, IDE, etc you will settle on. If you are going to windows cold, and
money is an issue, then open source is always a good thing to look at. I have enjoyed using eclipse and Code::Blocks IDEs. For C/C++, I use minGW. In terms of GUI plug-ins, HERE are some conversation with GUI recommendations specifically for use with Code::Blocks.
If money is not an issue, I have use National Instruments LabWindows/CVI full dev kit forever. It is one of the easiest ANSI C compilers/IDE I have ever used. It is only ANSI C, but has extensions to make using instrumentation easy. I have written a little USB stuff (not much), sockets, instrumentation, and many GUI apps.
Please comment what tools you currently prefer, I may have other suggestions.
Lazarus CodeTyphon has cross platform native compiler with GUI working on every supported platform. It supports 8 OS-CPU host layers (Win32, Win64, Linux32, Linux64, FreeBSD32, FreeBSD64, Solaris32 and Solaris64), and 25+ OS-CPU target layers. It also incorporates many graphical widgets and SCADA like behaviour with PascalSCADA and other components. There are wrappers for LibUSB.
I would use Microsoft Visual Studio to develop the GUI. They offer a free version called Express. I would use the C# language but MSVS supports other languages as well so just choose whichever you're most comfortable with. The best thing about MSVS is that there are millions of developers out there, which means that you will be able to search for and find lots of examples for how to use an RS-232 COM port or USB interface. I'm guessing that you'll be able to find GUI objects for graphing and other objects as well. (The basic stuff like buttons and edit boxes is all built into MSVS.)
BTW, you need to sort out whether you're using an RS-232 COM port or a USB interface. They're both serial interfaces but they're not the same thing. Either could work.
I am currently deployed overseas with the military and am using my down time to keep up with my civilian education, which is about 1 year of computer science. I developed this rather simple batch program that functions to use taskkill to kill a specific .exe after a specified time, aka an application-specific Sleep Timer:
Blog post describing use of program.
However, I have never had any experience with a GUI program. I have seen some old Q&As here recommending using Qt to get started, but as things change so quickly in the technology world, would you all be kind enough to give me some fresh information on how to create a GUI out of this application?
Instead of Microsoft technologies coupled with Qt, you'll cut learning and dev time by learning and using tcl/tk which comes with "expect" to communicate with command line programs and utilities. The only downside is needing to deploy tcl/tk to each machine to run your program as it's not compiled, rather an interpretive language.
I would use the Windows API + Windows Resource files + the C language to do it. ResEdit is a useful tool to edit resource files. Some handy links:
Windows Application UI Development
MSDN Library
ResEdit Home Page
Hope it helps.
Here are my requirements for a very very simple desktop gui I need to make.
Totally standalone - Needs to be double clickable with out the reliance on having anything installed on the users machine.
Simple GUI - Bare bones. Will be loading a list from a file that will be stored in a dropdown or w/e.
Rock solid on Windows distributions - XP, Vista etc
Bonus (Not strong requirement) - Could create a mac app from the same source
Background:
I am a java developer and have created a demo program that runs off a flash drive. You just pop it in and double click. It loads a GUI which reads a file and lets you select contents of that file for a drop down enter some other info and hit save and saves a new file with the details.
I am potentially limited by space so I don't think I have room to bundle a jre with the app. We do not want to require the users to have a JRE installed so it can be as dumbed down as possible.
So I am looking for alternatives and have little experience in standalone desktop apps so seek some advice.
I am not opposed to using something that will only work on Windows if it is that much stronger as we can create a separate program for Mac since they should all have a JRE installed.
So far I've been looking into python with py2exe, C++, C#. I don't really know the pro's and con's and would love some help.
Thanks
Delphi is very comfortable for these tasks. Easy Gui building, single exe with copy&go installations, Object pascal as language,...
http://en.wikipedia.org/wiki/Embarcadero_Delphi
We are planning to develop an application for monitoring and configuring our service (which is running on remote server). After long time of discussion, we decided for python as platform for our app, because we love and know python. But we don't know, what GUI toolkit preferred for our aims. We need fast (for development and running) app, whose users will be Admins, Maintainers and Account managers.
There are two GUI toolkit for python, which we know: wxPython and pyQT.
Anybody have arguments regarding pro and cons? And maybe someone knows any commercial applications, using these products (only python version of toolkits)? Links are desirable.
Thanks.
I choose wxPython after much research. The reasons were:
"wxPython in Action" book by Rappin & Dunn
The voluminous examples that come as part of the wxPython download
The number of projects that have used wxWidgets
The fact that wxPython code runs equally well on Linux, Mac OS/X and Win32
I did consider pyQT and other researchers are successfully using it. After writing many examples in all API's that I considered, I found wxPython ticked the most boxes for me.
As for Tkinter (TIX), I think it looks rather dated.
Unless you are using IronPython or Jython I would not consider using the associated native windowing APIs. For another project which is to be delivered exclusively on .Net, I plan to use WinForms after lots of great feedback from StackOverflow members.
Well, I am a fan of QT: it has a more modern look and feel. However - your choice should be based on your actual requirements. Simple trade studies are helpful for this. Make a list of what features your toolkit must have and what features would be nice to have and then weight each item appropriately. Then look at all your options (TKinter also) and then score them according to your feature list (using the weights you assigned to each feature requirement). At the end it should be evident which one is right for your project.
I've always liked Qt's "signals and slots" conceptual model, though I guess it may take a bit of learning for developers who are more used to other models of event propagation and handling. Personally, given a choice, I'd pick PyQt because of this programming aspect.
You wrote "There is two GUI toolkit for python, which we know: wxPython and pyQT." You are forgetting about the most obvious toolkit: tkinter. That's actually part of a core python distribution, no extra downloads required.
Some people don't like Tk but that's often due to ignorance. Tk is a fine choice for a cross platform toolkit. It uses native widgets on windows (and has for many years) and the latest versions of tk use themed widgets on all platforms.
i've been using wxpython for 3 years .. and now we had to switch into pyqt since qt is integrated in maya 2011 .. however , wxpython is more straight forward and you can easily start working on it and learn it from zero fast .it provides and awesome resources and decumentation . but QT provides more powerful features that you cant find in wxpython , for example ( the multi touch detection) , QT also provides good support for drawing devices like pc tablets and so on .
qt also provides a good designer that makes u create interfaces faster.
one of qt disadvantages is it's license since it's not free like wxpython
A Windows (and Mono) option for a GUI toolkit is provided by IronPython. It provides access to the Winforms and WPF libraries. For examples, see Developing with IronPython & Windows Forms, and many others.
If you want to expand the list of options, consider building a Web App instead of a (local) GUI app. You say your service runs on a remote server, so networking is part of your requirements.
Once you start down that road, Python provides a bewildering amount of options.
I want to point out two strengths that wxPython has compared to pyQt:
It uses native widgets on every supported platform. So the apps have a native look and feel. I'm aware that PyQt uses native styles, but the behavior ("the feel") is reported to be somewhat non-native especially on the Mac.
It provides a wider choice of widgets out of the box.
You should also check out PyGTK. It is similar to pyQT in programming model but does not have any licensing cost since it is LGPL. I always found it nice to work with as a developer. The main drawback over pyQT is that in some cases they take away functionality in things like file chooser dialogs in favour of simplicity for the user.