PDA

View Full Version : qp / qm state machine programming ?



perigalacticon
05-03-2016, 02:09 AM
Has anyone been successful in using qp / qm programming system for running state machine style code on Arduino?

Thanks

tician
05-03-2016, 04:31 PM
https://sourceforge.net/projects/qpc/files/QP-nano_Arduino/

perigalacticon
05-04-2016, 09:11 AM
Thanks, I am currently studying how to use this. Do you know of any references for using this to program robotics?

jwatte
05-04-2016, 12:53 PM
Do you know of any references for using this to program robotics?


What do you expect to achieve by doing this, instead of just writing code?

perigalacticon
05-04-2016, 04:28 PM
What do you expect to achieve by doing this, instead of just writing code?

I am a beginning robotics and programming hobbyist. I started about 9 months ago with an Arduino Uno, and used it to make a robot, in the process learning the beginnings of C++ for the first time. Through this I found that blocking-type statements are not good for most types of robotics functions. I re-programmed the code to eliminate for and while loops instead using if statements with timers and counters. I came across information about state machines and tried to implement some into the code. Then I came across a few systems for using state machines that appear potentially very useful. I have since installed the qp-nano and qm programs and worked on understanding the tutorial examples.

Being somewhat new to programming I have found it challenging and was looking for some assistance or possibly to find someone with experience that might be willing to help me learn the subject. I have previous programming experience with Matlab, VBA for Excel, and now C++. I have a mech eng degree but have not formally studied programming, although I have self-learned other engineering related tools such as FEA and dynamics simulations. I am interested to improve my quality and efficiency of programming robots, that is my reason for getting into qp / qm. It appears to be a potentially very powerful tool.

jwatte
05-04-2016, 07:40 PM
Gotcha. My guess would be that you'll spend a frustratingly large amount of time learning and using the system, rather than solving the base problem you set out to solve in the first place. That being said, if your main goal is education, then getting exposure to such systems is good on general purpose, so that may not be a negative!

perigalacticon
05-04-2016, 08:25 PM
Gotcha. My guess would be that you'll spend a frustratingly large amount of time learning and using the system, rather than solving the base problem you set out to solve in the first place. That being said, if your main goal is education, then getting exposure to such systems is good on general purpose, so that may not be a negative!


Have you worked with it or a state-machine system? I am looking for someone who might be able to tell me how to do some things basically. The problem I set out to solve was just to have better tools for robotics development. Do you know of languages or branches that are optimized for robotics that straight C++ ? Thanks.

jwatte
05-05-2016, 11:01 AM
I've worked with a large number of similar projects over many years, but not this particular system.
For robotics, the best language is C++ because of its good timing behavior and direct interface to necessary hardware.
The second-best language is probably Python, because the ROS package (very well regarded overall) supports both C++ and Python development.
A cheap-and-easy way to get into Python development is to start with a Raspberry Pi. The RPi can also run ROS.

The draw-back of all of robotics is that it is a very small field, compared to "playing the guitar" or "racing cars" or whatever, so there's much less ready-made resources to get going. It also has a higher barrier to entry than such more mainstream activities.
If you find someone nearby who knows a particular tool, and who you can use as a mentor, it's more important that you gain that mentor, than that you're using the "right tool" -- because no tool will be best for all situations, so you're eventually going to have to become good at switching tools :-)