How to make a location bar UI that that can be linked to gps in Qt programming? (Please do check out the images for the context of the idea)
Hi to all developers!, I am trying to make a station bar that can be linked in GPS in QT application GUI (I'm Sorry I don't know what is the right term in this stuff, but this is the context), and I don't know what widget do I need to use, or How can I possibly do that in QT. I am using QT
I've searched in the internet but I've found nothing in result.
Starting point
moving
Station reached
I am a newbie in the QT programming , Please do help me, I highly appreciate any kind of answer, suggestion, and idea regarding this matter, Hoping that you can help me guys, I'm Sorry for my english grammar,
Thank you in Advance!
To break down your question - there are several tasks.
I guess you know how to acquire the current GPS-position and how to process it? Recommend way: C++ (but Python is nowadays is also possible).
Then, when a certain position is reached (like you know the complete track-lenghth and can therefore compute some percentual for the current progress, emit a signal to your new Widget-class).
Create a custom widget with some self-defined 'paintEvent'. The widget also has a slot, which you connect to your aforementioned signal. The 'paintEvent' will position then your ship-icon accordingly.
I keep this high-level, because I don't know your level of understanding nor how much exists already (in terms of GPS-integration).
Related
BACKSTORY
The other day I found a motorized wheel chair that someone was throwing away. Being a maker who spends a lot of time looking at what other people have made online I decided to snatch it and try to make a robot out of it. I also bought an Arduino mega, a Kinect sensor, and a motor controller to try to control the motors and give it some form of vision.
MY VISION
Honestly I don’t intend for this robot to be much more than a fun, and challenging, project. My current goals are to have it run SLAM algorithms to figure out where it is on a map and for it to navigate to predetermined points on the map. However at this point I would be happy with just being able to do a simple teleop control with the keyboard.
MY PROBLEM
I have spent the past week researching ros and how to get it talking to my Arduino. I have installed diff_drive_controller, Turtlebot, ros_control, ros_serial, ros_arduino_bridge, and several others trying to find something that will tell the motors what to do. By now I feel like I have a good barely below the surface understanding about how ros works. Basically there are a series of nodes each publishing info for the other nodes to see and subscribing to info that they want to read. All I want right now is a node that publishes data about the velocity of the motors based on it trying to navigate or teleop or something like that. I think turtlebot is my best bet considering it is an all in one stack that does everything I want it to do. The only problem is I don’t have an iRobot create. But it seems like it should be simple enough to intercept those commands and have them drive my own robot base. However I’m not sure which topic to listen on and how to run turtle bot in a way that doesn’t try to connect to an iRobot create. I could just listen to the /cmd_vel_mux/input/teleop topic but I think that would limit me to just teleop and it might make it hard to move on to autonomy in the future.
What topic should I listen on? Am I going about this the right way? Are there any packages that would be better suited for my needs? Keep in mind that I am new to ros so tutorials would be appreciated.
I look forward to your responses
Thanks, Logan
Nice sounding project! I second the recommendation to take a look at the tutorials, but I think you spend some more time with the basic ROS tutorials before diving into the world of Arduino + ROS.
For instance, I noticed one misconception I believe you may have. It doesn't really matter which topic your nodes listens to, as its just a name that can be easily remapped through a parameter given when launching the node. The important thing is to ensure you are listening to the right type of messages - they specify the interface by which all the different nodes communicate. There's a bunch of options, and if none of them fit your use case, you can define your own.
I suspect that for low-level things, such as drivers for your motors, you will need to write your own ROS nodes. For advanced functionality, such as SLAM; there's a variety of options. You can find one that's suited to the input data you have available from your sensors.
One last recommendation is to take advantage of the features of ROS that allow you to break a big problem into manageable subtasks. Do one thing at a time - implement a motor contoroller, write a teleoperation method; taking care to specify suitable interfaces at each point. The advantage of this approach is that if you made smart choices in defining individual components with good interfaces, it is very easy to replace them with another one should you so wish.
You can find a list of tutorials how to interface Arduino and ROS here.
I have successfully communicated with one of my ARM7 board through serial port in Qt using qextserialport.
Now I have the data with me. I want to use it to plot graph (realtime plot), so, can anybody tell me how to do it?
If possible please, provide the sample example.
Qwt offers several optimizations how to implement real time plots - f.e in opposite to all other Qt plot packages it offers incremental painting.
You can check the oscilloscope example to see what is possible without almost no CPU usage.
Having to repaint from scratch for every incoming sample is the worst case, but even then there are strategies to speed up the repaints. But what optimzations are possible depends on your specific situation and can't be answered in general.
But if you need support for the Qwt library it doesn't make much sense to ask anywhere ales beside on the official Qwt support channels you can find on the Qwt project page !
I think what you looking for is this
http://www.workslikeclockwork.com/index.php/components/qt-plotting-widget/
Im new to this website, and mostly to any type of programming. Recently Im trying to learn C++(Game Programming), and my father wants me to make him a web-based application, that flashes the window wether there is any sound playing(I believe it's called an audio visualization), I talked to my brother, and he said that I should do an external application in C++ or Java. He lend me a book about GUI with QT, but the problem is I don't know how or where to start with, Im installing the QT, although I dont know how to add a library to Microsoft Visual C++(I tried but I had some problems, hopefully qt will do everything automatically), but I wanted to know if anyone has any advice,suggestion or any help to give me. Im pretty much a beginner, this will be my 1st application ever made(with C++ at least) and Im really scared. Thank you for the time wasted reading this, I know I wrote a lot, but I wanted to be the more descriptive I could.
Thank you beforehand.
This might be a bit late, but they are right.
Though, if you really want to, I would look into FMOD.
Here's an example using FMOD & OpenGL.
http://segfaultlabs.com/devlogs/sound-equalizer-with-fmod-and-opengl
If that's what you're looking for, if not, email me I am sure I could help you out!
In the past I've had some experience of Qt in C++. I've now started using PyQt, and finding it a bit bewildering. There doesn't seem to be any definitive source of documentation, apart from a small amount at Riverbank. I guess the first thing I'd like to know is that there's an initial hump with PyQt, and it does get easier. [Edit: The main problem I was having was due to a typo - init not __init__. I'm not finding it so hard now :P]
The PyQt docs talk about new style signals and slots for PyQt, as well as old style. They suggest that the new style is better, but I was wondering if that is what most users of PyQt do.
Yes, that is. New syntax is more clear, so why not?
Note, that when you trying to connect slots by name, you must call connectSlotsByName explicitly, since there no preprocessor that will work before execution and connect them.
PS: Beside, C++ syntax for signal/slot connnection is just ugly, and old PyQt syntax was pretty similar without any reason, so I was glad to see this change in PyQt.
PS2: There was the question here recently about this, check it out.
For reference see: PyQt Class Reference - it's quite comprehensive and goes into details with examples. Most of the examples are in C++ and although I'm something of a Python newbee, I didn't find it difficult to translate into Python.
If you're an experienced developer and starting to use Python and PyQt, this is a pretty good book - about the only full scale book on the subject that I know of: Rapid GUI Programming with Python and Qt.
Signals and Slots: I always use the new syntax for signals and slots in PyQt, which is simple and elegant - much more 'pythonic'. PyQt is great, but in many respects it's still very C++ like - the more they do to 'pythonate' it, the better.
When you're prototyping a new system, what guideline(s) do you use to mark a stop-and-start-over point?
Typically I write prototypes as part of the architecture/design process, to answer questions that can only be answered by actually working with the code. For example, questions such as:
Can I do drag & drop in Silverlight?
What framework would I use to draw interactive canvas objects in WinForms?
Usually you can write a prototype fairly quickly to answer such questions. Obviously the code does not have to be production-quality, it just has to go far enough to answer these questions.
Once you run out of open questions, I would scrap the prototype and finish your "design". Then you are ready to begin creating a production version.
When the one I'm working on doesn't fit the requirements anymore (functional, usability, or otherwise).
Prototypes are meant to be a dispossable item so I never hesitate when throwing one away.
When you've de-risked the functionality to a level where you feel ready to write production code.