Thursday, July 26, 2012

ROV-Suite, OSX 10.8, Headaches

Yay for smooth(er) circles and OSX 10.8!
I'm not going to go into too many details tonight because of the time, but there's some new code sitting in the repo still warm from my keyboard.  I've started adding the code that reads the joystick's hats and buttons.  It's kind of a pain simply because it's a fair amount of work and then I have to figure out to sync the inputs that Monterey gets from it's GUI and from the joystick (and Tahoe) and make them all spit out a single, correct value to the ROV.  So far, the joystick's first hat can change the servo values and enable or disable a relay while the joystick's buttons can only enable or disable relays.  I'm going to add their servo code within the next few days.  So far, these settings can only be changed in the settings.ini file, but I will break them out to a GUI.  Speaking of the GUI, look at the compass!  I have finally gotten around to touching up the outer ring around the compass!  I think it looks much better (albeit maybe not perfect).  Please be aware that this code, Monterey 2.0.3 Beta, is not in the downloads page yet and is not yet ready for public consumption.  I just put it in the public for those of you who always want the latest, most cutting edge code.

Speaking of the cutting edge, I finally upgraded my MacBook Pro from 10.6.8 to 10.8!  I can finally enjoy all of the features of Lion and Mountain Lion!  I never thought I'd like the fullscreen apps part, but I'm finding that I enjoy using the fullscreen apps (and the four-fingered swipe between them) much more than I ever loved Spaces.  My only complaints so far are that 1) Apple doesn't ship any version of Make with 10.8 (first install Xcode 4.4 and then install the command line tools in the downloads section of Xcode's preferences) and 2) most of my programming tools are yet to be upgraded to be fully compatible with Mountain Lion.  I tried to install Valgrind tonight, but I couldn't even build it because compilation would stop with a "Your version of OSX is not supported" message.  Luckily, even though Qt 4.8.1 spits out about 25 warning messages (all with the "your version of OSX is not supported" text), it stil compiles my applications.  Although I have seem to have run into an issue... When running the debug build of Monterey on OSX 10.8 I get many crashes during startup and seemingly arbitrarily afterwards.  Most are sigsegv and sigabrt messages, although most seem to be related to QList.  The weird part is, when I switch the the release build of the same source code, everything runs along perfectly fine.  My guess is that maybe there's a compatibility issue with the debug libraries of Qt 4.8.1 and OSX 10.8.... or perhaps I'm just a crappy programmer (a much more likely alternative, except for the fact that these issues only plague the debug build).  ;)  My advice is to hold off on Mountain Lion until your programming environment has fully been carried over.  If you don't wait, you might run into the headaches that I've been running into.  But, let me tell you, OSX 10.8 is one amazing OS and I have almost no regrets upgrading so early.  The rest of the user experience has been perfect!

Anyways, I'll be uploading the latest version of Monterey when I get it all worked out.  Hopefully these crashing issues with the debug build are related more to Mountain Lion and less to any errors I've created.

Thanks for stopping by!

Chris Konstad

Wednesday, July 18, 2012

Raspberry Pi

I'm pretty excited!  I finally got my Raspberry Pi in the mail today!  I played with one at a friend's house, and so I'm pretty excited to get started with this one!  I have a few interesting projects in mind....


  • Turn my TV into a weather, news, information, etc display
  • Raspberry Pi based ROV...
I will admit, I'm most excited about the second option.  It'll be interesting working with Nick to make some custom circuit boards that can expand on the Raspberry Pi's GPIO (and buffer it AND bring it up to 5v from 3.3V).  It'd be nice to be able to write both the topside and the bottomside in Qt as well.  As much as I love the Arduino, Qt's language is much nicer and the whole Qt environment is much easier to program in (once you've gotten used to a full-fledged IDE, that is).  One cool idea that I've had as far as Raspberry Pi based ROVs go is a debug GUI.  Think about it.  You can have your ROV and give it a composite video link in a easily accessed spot.  When you need to check on statuses of different systems of your ROV, check on it's configuration or change it's configuration, you can just fire up the GUI and change it from the ROV.  I personally think that'd be a pretty awesome feature.  I'm just going to have to learn more about Linux now than I ever have before...

In other news, I'm finally going to get around exposing the joystick buttons and hats in Monterey.  I want you to be able to map them to the different relays and to the servos.  Sometime while I'm doing that I want to continue trying to port Monterey over to Android.  I think it would be totally awesome to be able to drive your ROV from an Android tablet.  After I get that done, I need to talk to Nick about getting an IP camera set up so that I can start writing and testing a more pilot-oriented GUI with a nice overlay (or something like that).  

Thanks!

Chris Konstad

Monday, July 16, 2012

ROV-Suite: Bottomside 1.1.0 Released


Great news!  I just uploaded the first revision of ROV-Suite's bottomside code to the repo and to the downloads page.  This new version supports a depth sensor, a voltage sensor and a digital compass.  Please note that while the libraries have been used (my robotics team used those very libraries to get 3rd place in the MATE ROV competition) and tested, the entire setup has not been tested yet.  Since it is late here tonight, I'll do some bench top testing tomorrow.  

Here's the setup:
Compass (HMC6352) hooked up to the Arduino's A4 and A5 (I2C) pins.
Voltage sensor (Phidgets P1135) hooked up to the Arduino's A1 analog input pin
Depth sensor* (Phidgets P1115) hooked up to the Arduino's A2 analog input pin

Now the depth sensor's setup is a little tricky at first, but it is really robust in practice.  In fact, in our testing, we found that the library was accurate to within a centimeter!  Since the P1115 is really just an air pressure sensor, you must use the water to compress a volume of air that must then compress the pressure sensor.




The flexible diaphragm is pushed inwards (towards the P1115) as the water pressure increases.  That causes the volume of air inside the sealed container to decrease, and since the container is sealed, the pressure then increases.  From there, the P1115 reads the absolute air pressure inside the sealed container and converts that to a depth reading.  I will admit, this is not my design.  A mentor on the team, Jay Isaacs, came up with it.  The only downfall of this setup is the maximum depth of the pressure sensor (as it can only have 36 PSI atmospheric on it, only 21.3 PSI of water pressure can be applied before it exceeds it's maximum pressure rating).  According to some calculations with the help of Engineering Tool Box, it's maximum depth is 49.2 feet of water.

I hope to test out this code more fully soon so that I can catch any bugs it's hiding.

Thanks for stopping by!

Chris Konstad

Tuesday, July 10, 2012

Update

I have some great news regarding Monterey and Android!  With the help of Stack Overflow, I've gotten SDL to almost compile and work with a Qt application on Android.  Now I'm just missing the compiled library to link to (my compiling is spitting out undefined reference errors).  Once I can get that sorted out, you can expect a fully functional version of Monterey for Android!

Also, I've been spending some of my programming time recently working on an application for a med school student that I'm working with at a hospital near my house (I'm volunteering there).  I'm writing an application for him that will detect the coordinates of a touch on the screen of an Android (and hopefully soon, iOS) phone, log those coordinates for multiple tests on multiple planes of the hand and integrate all of the data to find out the volume of space that the patient's thumb can move in (this will help patients with congenital thumb hypoplasia).  My application is based on the proof of concept technique the med school student figured out using an iPhone drawing program and MATLAB.  Hopefully, my application will simplify the process and make it practical to use in a clinical environment.  What I'm getting at here is that development of Monterey will be slowed down a little bit for the time being due to other commitments, although this application will be completed before the end of summer (so then I will have more time to spend on ROV-Suite)!

Also, since I'm on summer vacation, I'm spending some time playing around with fun side projects that I've been meaning to get setup for quite a while now.  I finally installed Linux on my Core 2 Quad desktop that I built in the 8th grade, so it's a nice little Samba file server on my home network, now.  I've since set up SSH (something I've been wanting to play around with for awhile) and I hope to turn my desktop into a remote compiler and backup solution for my computer.  My goal is to set up cross compilation on it so that I can write my programs in OSX, and then automatically compile them for Linux and Windows (and even Android) after I push the update to my Git repo.  I find having to reboot my laptop just to compile a Windows build kind of annoying (especially when I have all of my reference windows open in Chrome), so this should be fun to try out!

On a final note, I've noticed that ROV-Suite has been getting some negative feedback on Sourceforge (people have been not recommending it).  Obviously, if you think that ROV-Suite deserves the negative feedback, then go ahead and give it a thumbs down.  But please, if you do so, comment on why.  I really enjoy working on ROV-Suite and I want to make it the best suite of applications possible, but I can only do so if I am told what is wrong with it.  If you find any bugs, please make a ticket!  I will get back to those tickets as soon as I can!

Thanks for stopping by!

Chris K

Wednesday, July 4, 2012

Minor Setbacks

I have some semi-bad news (luckily it's not too bad)!  First off, I downloaded an IP camera app for my iPhone, and while trying to get it to work with Qt, I realized something: I don't know how to get the data from the IP camera chips that Nick and I are planning to include on the official ROV-Suite PCB!  I'll need to find out how the data is sent from the chips (jpg, mjpg, etc) before I can continue development on Bodega (the piloting GUI).

Also, I ran Monterey through Doxygen today and I was shown that I don't know how to properly add the comments and information in my code.  So I'll be spending some time adding more Doxygen information in my Monterey code soon.  That will, of course, delay the distribution of the Doxygen documentation.

That completes the bad news for today.  Luckily these are only minor issues!

On a side note, if any Android developers are out there and willing to help out with ROV-Suite, I'd love to have an Android service that reads USB joysticks and sends the values of the axes, buttons and hats over UDP to localhost.... Just saying. ;)  You can contact me in the comments if you are willing to help out!

Thanks!

Chris