Journal
This page is the catch-all page that I use to write some quick notes for future reference.
Arduino IDE Linux Install
I just installed the Arduino IDE on Ubuntu 14.04 for the first time. The process using APT is very straightforward. Just run,
$ sudo apt-get install arduino arduino-core
And then upon first launch $ arduino
authenticate via the prompt to configure some permission on the usb port. At this point, everything works perfectly after logging off and then back on again.
But there's one big problem... This version of the IDE (1.0.5 - 8/13/2015) does not support the Arduino DUE! At the time of writing, only the 1.6.x releases are bot supported by developers and are compatible with the Yun and DUE boards.
See: https://www.arduino.cc/en/main/software
Installing IDE from Arduino
Since APT doesn't support the newer Arduino IDE version that support the boards Yun and DUE, the package(s) must be downloaded from Arduino.
The package comes down as an archive in the form arduino-1.6.5-linux64.tar.xz
and must be installed "manually" including external dependencies. I found a nice guide that describes the steps required, and I'll make some personal notes about this process here.
- Extract the package and move to
/opt
$ tar -xvf <archive>
$ sudo mv <archive> /opt
- Install JRE dependency
$ sudo apt-get install openjdk-7-jre
- Configure USB permissions
$ sudo chmod a+rw /dev/ttyACM<number>
where <number> is 0, 1, 2, ... for each board used simultaneously
- Install shortcuts
$ cd /opt/arduino-1.6.5/
$ sudo chmod a+x install.sh
$ ./install.sh
- Right click the desktop icon and change permissions to allow execution
Double-click the desktop icon or run from the terminal by,
$ /opt/arduino-1.6.5/arduino
Configuring the IDE
Direct the IDE toward the desired sketch directory by,
File >> Preferences >> Sketchbook Location : <fullFilePath>
The DUE board may not be an available selection at,
Tools >> Board
If this is the case, go to
Tools >> Board >> Board Manager
And install the required resources in the dialog box that pops up.
Rosserial Arduino Install
See: http://wiki.ros.org/rosserial_arduino/Tutorials/Arduino%20IDE%20Setup
Install the ROS package with APT by,
$ sudo apt-get install ros-indigo-rosserial-arduino
$ sudo apt-get install ros-indigo-rosserial
Install the ros_lib
libraries for Arduino by running the following command in the Arduino libraries location,
$ rosrun rosserial_arduino make_libraries.py
Sphero Driver for Matlab
I've written a class in Matlab that implements the low-level binary communication protocol to expose the Sphero API functionality in m-code. There's a whole page dedicated to the documentation of Sphero API Matlab SDK as well as a Sphero API primer.
Kinect Human Motion Capture with iPi Soft Products
As part of my work in ARMLAB, I have invested many hours in testing and evaluating commercial software produced by iPi Soft. Their programs Recorder and Mocap Studio (with BioMech addon) enable simultaneous capturing of multiple depth sensors (e.g. Microsoft Kinect), detection and tracking of a human motion model in the fused depth data, refinement of the resulting motion model, and export of the results in Matlab format. I have created a page to collect my notes in the form of a quick-start guide or tutorial at iPi Soft Evaluation.
Testing Math Extension
I just installed the Math extension. Here are some equations ...
The equation I added just started throwing php errors in the front end when viewing the page with rendered equations. Maybe it's related to the 1.26 upgrade?
Now I'm trying this again with a test equation,
- <math> \mathbf{F}_{ext} = \frac{d}{dt} \left( m \cdot \mathbf{v} \right) </math>
Got it working with MathJax renderer although php warnings are nuts. Finally some decent rendered equations.
- <math>
{}^{0}\mathbf{R}_{2}={}^{0}\mathbf{R}_{1}{}^{1}\mathbf{R}_{2} </math>
HTPC Config for Home LAN
Streaming media with VLC
Cool new HTPC stuff subsection
Maxon Motor Control for Robotic Prototype
- Motor - Maxon A-max 32 (12V)
- Gearhead -
- Encoder -
- Driver - Maxon ADS 50/5
Matlab interface for Myo
The Matlab package Myo SDK MEX Wrapper includes a Matlab class in m-code that is a wrapper for a Matlab Mex file that is a wrapper for Thalmic Labs' Myo SDK. The end result is a super simple m-code interface to streaming data from Myo.
Kinect 2 Development Environment Setup
The development environment for applications targeting the Kinect 2 (for XBOX ONE) sensor has several dependencies that may not be typical for a standard windows environment in a robotics research lab. Typically, we may find that machines are running Windows XP (32 bit in many cases) or Windows 7 as these operating systems (OS) are directly compatible with legacy systems and modern office productivity software. In the case of Kinect 2, the minimum OS requirement is Windows 8 and the minimum compiler version is Visual Studio 2012. Since this configuration may not be immediately available (it isn't for me at the time or writing), this section describes the process for setting up this development environment.
We begin with a vanilla installation of Windows 8.1 on a Lenovo K450 desktop computer. The general resources required for Kinect 2 development are described quite well by Microsoft on the page for Kinect for Windows SDK 2.0. Aside from the hardware requirements, we first take special note of the system and software requirements. Namely,
- Operating System: Windows 8, 8.1, or Embedded 8
- Compiler: Visual Studio 2012 or 2013
The latter requirement also carries some additional consequences such as compatibility with previous projects and other software (like MATLAB). Since we have some systems working well with MATLAB R2013a (and VS2013 is not supported in this release), we'll choose to use Microsoft Visual Studio Professional 2012.
Glass half full?
I thought it would be fun to reformulate a solution to the "glass half full" according to a meme that I've seen circulating on Facebook recently. The meme indicates a mathematical expression for the volume of liquid in a glass opposed to the typical optimist/pessimist qualifying expressions "half full" and "half empty." However, there appears to be some discrepancy in the validity of the mathematical calculation of the percent volume enclosed by the container.
The of volume enclosed by this container can be calculated by the following integral using the so-called "disk method" in indefinite form as,
- <math>V=\int{A(h)}dh=\int{\pi r^2(h)}dh</math>
or in definite form, as a function of the fluid height, as,
- <math>V(h)=\pi\int_{0}^{h}{r^2(\eta)}d\eta</math>
An expression for the radius at a given height is,
- <math>r(h)=r_1+\frac{h_2}{r_2-r_1}h</math>
which can be substituted into the previous integral formulation for enclosed volume,
- <math>V(h)=\pi\int_{0}^{h}{\left(r_1+\frac{h_2}{r_2-r_1}\eta\right)^2}d\eta</math>
This expressions can then be used to calculate the volume of the container (the total volume),
- <math>V_T=V(h_2)</math>
the volume of liquid (the full part),
- <math>V_F=V(h_l)</math>
or the volume of the void (the empty part),
- <math>V_E=V_T-V_F</math>
And finally, the fractional part of the container's volume occupied by fluid, or void of fluid, can be calculated by,
- <math>V_{F/T} = \frac{V_F}{V_T}</math>
and,
- <math>V_{E/T} = \frac{V_E}{V_T} = \frac{V_T-V_F}{V_T} = 1-V_{F/T}</math>
respectively.
It's unclear whether the mem author intended to calculate the percent volume of the liquid or the void in the container. In either case, a suitable expression will be,
- <math>\%V_{F/T} = 100\frac{\int_{0}^{h_l}{\left(r_1+\frac{h_l}{r_2-r_1}\eta\right)^2}d\eta}{\int_{0}^{h_2}{\left(r_1+\frac{h_2}{r_2-r_1}\eta\right)^2}d\eta}</math>
or,
- <math>\%V_{E/T} = 100\left(1-\frac{\int_{0}^{h_l}{\left(r_1+\frac{h_l}{r_2-r_1}\eta\right)^2}d\eta}{\int_{0}^{h_2}{\left(r_1+\frac{h_2}{r_2-r_1}\eta\right)^2}d\eta}\right)</math>
Evaluation of these expressions to obtain an algebraic formula is left as an exercise for the reader.
Automatic Exhaust Fan
Laptop Selection - Win10/Ubuntu
I'm concerned that special care needs to be taken in selecting a computer these says when one plans to dual boot Ubuntu alongside Windows 8+ OS. I think that certain features of Windows 8/8.1/10 can be problematic when installing multiple UEFI based OS's on the same disk.
Here's a beginner's guide to performing this installation procedure.
Installing ROS on Raspberry Pi
This diary is for a Raspberry Pi 2 Model B.
Get Ubuntu Mate by following the directions here: https://ubuntu-mate.org/raspberry-pi/.
Using Git
I'm starting to use Git at the command line with the revision control server at work located at http://buffet.cs.clemson.edu/. Throughout the process of re-learning Git CLI, I plan to document the relevant commands and workflows here.
See the following resource(s) for good information about Git source code management software:
SSH Config
Git GUI
According to Git SCM, there's a default GUI that comes with Git. I trivially installed this by opening a terminal in Ubuntu and typing,
# apt-get install git-gui
Then the GUI can be lauched by,
$ git gui
This GUI looks like it could be pretty useful for providing a quick and dirty interface for mouse-clicking through forking and pulling changes.
Git Account Management
Git Forking
Forking someone else's repository to create your own hosted version.
Git Branching
Creating another copy of a branch to work on isolated changes. For example, I plan to keep the core stable code base in a main branch called Master whereas other branches will be used to pursue variants on this code. Examples of typical branches include devel (development) and bug-fix, issue, or feature-add branches.
Git Commit
Committing changes to local code.
Git Push
Submitting commits from a local branch to a remote.