Thursday, May 30, 2013

Sorry for the Quietness

I've been kept really busy recently with my high school graduation and my robotics team's practice schedule, so I haven't had much time for personal programming projects.  For robotics, I had the opportunity to learn all about Qt's Event Filters, which are pretty cool and I'll definitely be using them more.  This summer, I plan to get more practice with QtQuick2 and I want to start learning Java because I'll need to know that language for college.  My goal is to publish a few more paid apps this summer so I can start making money on my programming hobby, but we'll see how well that goes.

Thanks for stopping by and please don't expect regular updates until sometime in July (once robotics is over)!

Chris

7 comments:

  1. Just curious, do you use Qt for your robots? If you do use it, what role does it play? Control software? Logic? I thought about building a robot this summer and controlling it with OpenCV and Qt, but I am not really familiar with how I'd incorporate Qt. I know OpenCV can be used for robot "AI" for spotting different things, etc.

    ReplyDelete
    Replies
    1. Yup! It's what I first based my Monterey ROV controller on. This year, our team uses the Monterey QROVController and QROV classes as the basis for our ROV control software (although I am no longer the programmer for the team). It uses UDP for communication with the embedded Arduino microprocessors (onboard the ROV) and a USB joystick for the HID. It is capable of auto-depth holding and some other features that I am thinking about implementing in Monterey later. I really REALLY want to port Monterey to Android and make it more accessible to more people. I'm thinking about trying to make it an alternative control application for OpenROV, but I don't have hardware to test on. I haven't used OpenCV yet, but I plan on playing around with it this summer. Sadly, my robotics team's current setup has a purely analog video feed passed up the tether, so no OpenCV opportunities there. I want to use IP cameras, but the lag was too great. One of my plans for this summer is to learn how to write libraries and to make an ROV library that anyone can use, with really clean APIs and hopefully make it using the Test Driven Development (TDD) philosophy. I'd also like to work on a FOSS project with someone... Maybe that could be the library.

      Delete
    2. I'd love to work on a project with someone too. I haven't really gotten the chance to work on a FOSS project on the scale I'd like.

      And that's a cool setup. Unfortunate to hear about that analog feed. I should really take a look at your software. I wasn't aware that you even had anything like that. :P

      I just got done with another Android app--this one made use of about 10-15 C++ classes (depending on the configuration), and I have to say that it worked really, really well. Once I figured out how to do the whole signals/slots thing, I look at QML + C++ in a whole new light! Unfortunately the app won't be released to Google Play, as it was developed for an organization.

      Just downloaded the latest Qt beta that has Android integrated even better. Really loving QML layouts too--and don't forget those desktop components. I also wrote the QML UI in Qt Quick 1 and I must say that I did cross some annoyances because I was spoiled to the new features/performance gains. Luckily, the people I was making the app for perfectly fine with a "metro-style" UI. :P That is, rectangles with no round edges, no images tiling, etc. Definitely something of a design challenge for me, especially on the lower end devices some of their organization had. Testing it out on my mid-end desktop on a computer monitor didn't exactly help!

      Unfortunately for me, I had to jump through a lot of hoops. They didn't like Ministro one bit, sadly. I ended up bundling the Qt libraries with each application (there were multiple ones) so they are wasting probably 50-100MB on their devices. They weren't mine though, so I didn't really know what their deal was. :P I can't wait for the day that Android ships with Qt Libraries/Ministro. However, something like that would probably cause some sort of scare or something as there'd be like 20MB extra to the Android OS....

      This summer I hope to post some tutorials to my blog too, hopefully. I might get into QML more since I finally learned the ropes (or at least, I can draw rectangles and connect them to my C++, which is the important part!).

      As for signing my Android app, that definitely needs to be improved. I think Necessitas (Creator) was bugged because it wouldn't let me sign my apps in the build process, but hey, I'm fine with using Ant as long as the build files are made for me. Setting all the Necessitas stuff up manually would be a nightmare! My other problem with Necessitas is that--for the longest period of time--I struggled with getting spaces in my package name because it just wouldn't build right. Eventually I moved to a more command-line drive workflow and it worked out.

      Command lines are still better for a lot of things! :)

      Delete
    3. Yeah, analog video feeds are a pain. We want to go all HD digital next year.

      Oh nice! I really do love Qt's signals and slots. They're incredibly handy! What kind of app did you develop?

      Haha! Yeah. I haven't played around with QtQuick2 yet, but I really want to! It looks really slick with the new components and I really like the performance increases.

      Yeah. One reason I decided to switch my Android development from Qt to Java is because of Ministro (the other was that I wanted to have access to more Android APIs and the ability to add advertisements). I really wish that Android's SDK was Qt/QML based... That would be nice!

      I'm sorry to hear about your signing difficulties! I haven't had any issues yet with Necessitas and signing (thankfully!). Gotta love that command-line, huh?

      On the flight to Tacoma, Washington for the ROV competition, my teammate and I setup and configured a CounterStrike Source server on his home server over SSH. That was a pretty cool experience and a great example to the other guys on the team for why the command-line is so useful.

      Delete
    4. The app was for an organization and wasn't for the Play store, but it was definitely an experience. Eventually it fell through because of Ministro... another reason not to like it. If only Android shipped with Qt libraries! Besides the politics of it all, an extra 30MB of the standard Qt libraries (Core, GUI, QML, etc.) to the stock Android would mean a lot less hassle and a lot more Qt apps. In regards to the extra API's, I'm pretty sure there are ways to call the native Java API's through Necessitas (JNI).

      The signing was actually all automated thanks to the ant.properties file and just adding it there. Then it seems to sign automatically just fine, and other people could use the .apk.

      The command line is definitely powerful, it's just that sometimes an IDE is necessary in my opinion. Besides debugging, I'd be lost without Visual Studio/Qt Creator in large projects (especially multiple-project solutions). I also toyed around with some more advanced text editors lately like Sublime on Windows. They have excellent features and a C++ build pipeline built-in most of the time.

      That sounds like a fun plane ride. Did the flight attendants get on to you guys for the impromptu LAN party? :P

      Delete
    5. That's a bummer! I really wish Android used Qt/QML as the SDK language. iOS uses a native language for their SDK, so why wouldn't Android? Of all languages, why Java?! Yeah, there are ways to call them through the JNI, but I don't have enough Java experience yet to fully understand the Android API. I'm working on writing more apps for Android with Java so that I can learn more about "normal" Android development, which should open up more possibilities for my C++ Android development.

      Yeah. I love the command line and scripting, although I need to get better at it. Also, my development environment keeps bouncing around between Linux, OSX and Windows, which makes scripting kinda difficult. I really wish Windows had a useful command line, although Cygwin does help.

      Haha. I don't know if they noticed. XD

      Delete
    6. Yeah, I honestly don't hate Objective-C as much as Java, since I'm so used to C and C++. Objective-C just seems to be a spin-off of C++ that is better suited for iOS development to me. Java... yeah, I honestly don't know why they chose Java over something like C or C++ (even a C derivative). The only thing that comes to mind is flexibility, which is about the only thing I can say Java is better at. No need to compile or anything--just write a JVM and any byte code works. You still can't beat Java's portability, even with Qt or standard C++.

      That's probably my problem. I'm just not used to the command line anymore since I switched over to Windows 7 as my primary development OS. Mac is good, but my only Mac right now is years old and has 2GB of RAM... and I just invested in a shiny new PC. :P You can kind of tell that Microsoft has sort of just built on their DOS environment with CMD, instead of improving it.

      So, what kind of ping do you get at 35,000 feet? :P

      Delete