Configuring an AWS Ubuntu Server Instance

Configuring the Server After connecting to your newly instantiated server, you will want to configure it. The first thing I always do is create an account for myself, and then disable the public/private key authentication requirements for SSH tunneling. Be wary about whether you choose to do this as well, RSA authentication is a far superior security measure to username/password combinations. I however do not have any sensative information on my servers, I use many different computers and creating key/value pairs for all of them is a pain, and lastly my passwords are strong.

To create a new user you will need the adduser command.

sudo adduser username

After the above command, enter the relevant information and continue. To ensure that username has been added to the list of users you can examine the last line of the /etc/passwd file.

tail /etc/passwd

Next, you should add your new user to the super user group, sudo. The usermod command with the -a and -G flags will get the job done.

sudo usermod -a -G sudo username

Here -G says to add the user, username, to the group, sudo, and the -a flag ensures the group is appended to the list of groups the user currently belongs to. This ensures any previous groups are not over written.

Once I’ve got my new account made, I’d like to be able to log in to the server simply by specifying my username and password. The can be taken care of by changing the ssh daemon running on the server. Edit three lines in the /etc/ssh/sshd_config file…

RSAAuthentication yes –> RSAAuthentication no
PubkeyAuthentication yes –> PubkeyAuthentication no
PasswordAuthentication no –> PasswordAuthentication yes

Then you will just need to restart the ssh daemon.

sudo service ssh restart

Now you can log into your server with the usual approach…

ssh username@127.0.0.1

When you don’t yet have a domain name set aside for your server you will always need to reference it by its IP address. This is uncool. To make life easier I add an entry to the /etc/hosts file on my local machines.

127.0.0.1 superServer.net

Adding the above line to the /etc/hosts file will allow you to access your server located at 127.0.0.1 with the alias superServer.net via ssh, web browsers, and more. i.e.

ssh username@superServer.net

This makes things easier when setting up virtual hosts on the instance’s apache web server.

Lastly you want to get your ubuntu verion up to snuff with all the latest security patches and updates. Run a final update/upgrade to get that underway

sudo apt-get update && sudo apt-get upgrade

In most cases you’ll be doing development, coding, and networking. You are going to need to install some software from Ubuntu’s repository to get working. Below are a few packages that I recommend for general use.

sudo apt-get install build-essential git cmake

Posted in Coding | 1 Comment

Launching an AWS Instance

Reaching into the Cloud

We will be configuring a virtual server to provide data aggregation and visualization services. There will be many posts in this series, but we must begin by initializing our Amazon Web Services (AWS) instance. First choose to “Launch Instance” from the EC2 section of your AWS console.

Step 1: Choose AMI

We will be using the Ubuntu Server 12.04.3 LTS – ami-6aad335a (64-bit) Amazon Machine Image (AMI). Choose an appropriate image for your needs.

Step 2: Choose and Instance Type

As for the Instance Type, we will be launching a prototype for testing. If this is your first time using AWS, a micro instance should be available in the free tier. A micro instance will be sufficient for our testing needs.

Step 3: Configure Instance

The default settings should be sufficient for most needs. New AWS users may wish to check the “protect against accidental termination” box. Sometimes if one is unfamiliar with the AWS interface they may accidentally delete or terminate an instance. Checking this box requires the user to remove termination protection before this instance can be terminated.

Step 4: Add Storage

In most all cases web services will be accumulating, referencing, and manipulating, data. It is not wise to store this important data on the server itself for if the server crashes your data is lost as well. AWS provides a service called Elastic Block Storage designed to ameliorate this issue. In this step you can attach an arbitrarily sized storage space to your instance and later mount it wherever you need.

Step 5: Tag Instance

Tagging enables you to conveniently label your instance. This is most useful when you have many instances in different groups with different purposes. For your first instance a simple “Name” = “Webserver” key value pair should be sufficient.

Step 6: Configure Security Group

This is a very important step. The security group controls which ports should be open to the public. You can consider it a watered down iptable. Each case will have different needs, but in general you’ll want to have ports 22, 80, and 443 available. These will provide you with access to SSH (22), HTTP (80), and HTTPS (443).

Step 7: Review Instance Launch

Now just review your configurations and when you’re ready launch your new instance. At the launch of your new instance, you will be asked to use or create a security key-pair. You will need this to access your device, make sure you download it to a safe place.

Connecting to your new Instance

Now to connect to your new instance you’ll need to use an SSH client that can employ RSA key value authentication. Linux users can just use the ssh command with the -i flag to specify the local key downloaded in the previous step. Each instance will have a default root account that you must log into before you can create any users. For our instance it is ubuntu. Lastly you must get the public ip address of your instance. You can see what this is by clicking on the “instances” tab of the EC2 section within your AWS console. For example, if my key were located at “/path/to/key.pem”, I were using the ubuntu instance, and my new instance’s ip address was 127.0.0.1, I would connect to it with the following command.

ssh -i /path/to/key.pem ubuntu@127.0.0.1

Check out the next post

Configuring an AWS Ubuntu Server

to learn how to create accounts, edit privileges, and configure your new instance.

Posted in Coding | Leave a comment

Enter OpenTiles

Earth Tiles 8:00am April 20th, I enter the warehouse known as Making Awesome, Tallahassee Florida’s own makerspace. They were one of the 75 locations around the globe chosen to host the world’s largest collaborative 2 day hackathon, The 2013 International Space Apps Challenge. I see a friend of mine at his laptop amidst the tables, wires and people. I approach him and after the usual greetings we being the following dialogue.


Nathan: “So what project are you thinking of working on?”
Olmo: “I have no idea… I was just going to find some people working on a cool project and join them.”
Nathan: “Wow, I had the same plan…”
Olmo: “Well it doesn’t look like any of the groups here are working on a cool project.”
Nathan: “Ya… How about we just start one ourselves?”

And that’s exactly what we did.

We developed a solution to the Earthtiles challenge. Both Olmo and I work at the Center for Ocean-Atmospheric Prediction Studies, simply known as COAPS, and we’ve collected a good deal of experience processing satellite data, which was the underlying principle of the challenge. Shortly after we got started, a new participant approached us. It was Samuel Rustan, an Electrical Engineering student who had lofty goals of working with people on one of the cubesat challenges. After we explained our project to him, he continued perusing. I think he quickly realized there was no one at our local branch working on the cubesats, and he got a long with Olmo and I pretty well, so he came back and asked if he could join our group. We gladly welcomed him. His programming prowess was humble, but his enthusiasm was unrivaled.

We worked through the night and come Sunday evening, and come the judges to our station, we presented our work. They seemed impressed, and we were content with our presentation. After their lengthy deliberation (which was in the room filled with the cookies and snacks), they emerge to announce the winners. Our project was announced last along with a very cool board game project as the 2 which will continue to global judging.

Our Project – OpenTiles

Our project page, OpenTiles, was finished last night and will be the medium which presents our project to the international judges. Judging will end on May 22nd where the 5 award winning projects will be announced. The 5 awards are…

  • Best Use of Data – The solution that best makes space data accessible or leverages it to a unique purpose / application.
  • Best Use of Hardware – The solution that exemplifies the most innovative use of hardware.
  • Galactic Impact – The solution that has the most potential to significantly improve life on Earth or in the universe.
  • Most Inspiring – The solution that captured our hearts and attention.
  • People’s Choice – Determined from a public voting process facilited through the spaceappschallenge.org website.

If we have any chance of winning, it will be the Best Use of Data award. Our project is very specialized, it’s unlikely that most laypeople will understand our project so the People’s Choice award looks improbable… Unless all of my altruistic readers vote for our project on the SpaceApps website!

Posted in OpenTiles | Leave a comment

Ubuntu gets Commercial Grade Video, Audio, and Games


As an avid open source user and unabashed Ubuntu advocate I’ve been politely coercing people to use Ubuntu/Linux products for years. I’m sure we’ve all heard the most common rebuttals, “I’ve got nothing against Linux, but…”

  • “There’s no audio or video editing software.”
  • “Most of my favorite games won’t run on Linux.”
  • “I can’t edit my documents and spreadsheets for work.”
  • “No one really uses it.”

The list goes on and on… While the majority of the excuses are just plain silly, many of the others had been “patched” with the advent of WINE. Unfortunately, most of the users who would actually need it don’t know about it. But recently the 2 leading excuses have suffered a brutal defeat in the past few months and days. While the war is not over, today we can all be proud Ubuntu and Linux users.

04/30/2013 – The Beta release of a Hollywood quality video/audio editing suite for Ubuntu…

Lightworks

02/14/2013 – The long awaited arrival of Ubuntu’s future gaming pride…

Steam

May all of our futures be rich with Ubuntu software.

Posted in Ubuntu | Leave a comment

Registering Two Point Clouds


I finished this project last year and it’s been ‘dying’ to be posted. My goal was to take point clouds obtained from two Kinects and register them into one coordinate system. After the registration process was completed, the new point cloud would be much more robust with many of the obstructed blank spots filled in.



The project follows a simple algorithm.

  1. Use libfreenect to obtain point clouds from both Kinects
  2. Use OpenGL to display the point clouds in an interactice virtual environment
  3. Use OpenCV to display the RGB streams for the user to select correspondences
  4. Calculate the transformations using Procrustes Analysis and the correspondence matrices
  5. Apply the translation and rotation to the point clouds visualized in OpenGL

The implementation of this algorithm can be found here.

After a few weeks of stagnant development with the project, I made a bet with my friends and advisor that I could finish the project in one weekend before I left for a vacation. Below is the video which resulted from my sleepless weekend hackathon.

After the project was finished. I used it to complete what is called an “Honor’s Thesis” here at my University. It is an undergraduate research project, which once defended successfully allows the student to graduate “with honors” on their diploma. Looking back on the thesis now I would have done things differently – but isn’t that almost always the case. None-the-less it was a mile stone in my life and it is my work.

Let me know if you’d like a copy of it and I’ll be happy to send it to you!

Posted in 3D Scene Reconstruction | 17 Comments

Interest Curves

Without play testing, the structure of the interest curve is hard to determine. We have tho opening animation which explains the plot and gets the player familiar with the story. After the player volunteers to go into their own mind to explore their understanding of emotions, the first person shooter is encountered. This stage will increase interest even further, the challenge from the gameplay mixed with the intellectual focus to find the right target will retain the attention of player.

Posted in Educational Game | Leave a comment

Balance

Our game has very fundamental and simple implementations of most of the basic components of a good game. Challenge vs. Success is inherent in a fps. The challenge is shooting the targets, the success is successfully shooting the targets. This is developed a bit further in ou game though, because the objective is not to just shoot every target, it is to shoot the appropriate apparition representing the emotion or feeling in question. We do more than just incorporate hand and eye coordinations required for a FPS, but we also challenge the player’s mind. Their tasked with successfully shooting the correct target, finding the correct target is a challenge to the head, then being able to shoot it is a challenge of the hands.

We also have a punishment system and scaffolding system. If the player chooses the wrong target and begins to shoot it, they will lose points and be warned that their choice was an incorrect one. So far we only have a punishment for the intellectual component of the game, as for the hands and skill required to shoot the appropriate targets, we have not implemented a scaffolding system to help them develop these skills.

Posted in Educational Game | Leave a comment

Probability and Chance

Our game introduces only a simple implementation of chance, so far. After the player enters the mind of the main character to begin exploring feelings, they have to hunt down manifestations of those feelings. To make this hunt interesting these objects need to be difficult to catch, to do this they must follow arbitrary paths. Using the random library in python I assign a random theta value for a 2D rotation, then a random value to be travels in the new direction the object is facing. With only a random rotation and a random forward distance traversed the path of the objects appear to be quite random and yields an appealing and somewhat natural desire to hunt them down.

Future implementations of chance could be in the aiming system. Currently there is direct ray tracing being do from the cross hair, if the player clicks the left mouse button while the ray pings back a positive hit the appropriate actions are taken for scoring and game response. The direction of the ray could randomly modulate through a tiny circle around the ray origin. Being able to shoot efficiently with this implementation will require skill. They will need to become familiar with the “workings” of the targeting system, much like understanding the strengths and weaknesses of real guns and weapons.

The player currently has no ability to influence the chance or probability in the game. The movement of the NPC’s as well as the random inaccuracies of the targeting system are fundamental game mechanics. That player has no access to understanding anything about the NPC’s beyond what they can observe. This however is plenty to get a good estimation of how their movement works. It should be noted however that even though the random movement pyton script is simple and is a series of rotations and straight line traversals. In game with your movements and them moving around in front of you in 3D, this is not as obvious to see.

As requested by my advisor:
The probability of drawing a king of diamond AND an ace of spades from two full decks of cards (that are shuffled), is simple the product of their individual probabilities… 2/104 x 2/103 = 1/2678
Throw three dice (with faces 1-6). What is the probability that the sum will be 10? 12? 14?
This is the all possible combinations to make the sum divided by all possible combinations…
10: 1/8
12: 25/216
14: 5/72

Posted in Educational Game | Leave a comment

In Game Animation

So far you can move the hand in the 4 basic directions with the usual, w, s, a, d, keys. You can also use e, and r to move up and down in the z direction. I added a simple animation where the hand spins on it’s side! Playing it in the game engine doesn’t look exactly as planned, but got the job done perfectly!

Here is the blendfile -> hand_anim.tar.gz

Posted in Educational Game | Leave a comment

Game Rules and Mechanics

Our game will have very few rules. It is being designed as some sort of extra pseudo natural experience. The player stands in front of the Kinect, and then their standing in a party on the screen. This is in accommodation for our audience, we “know” our audience and we’re designing the game mechanics and parameters to suit their gaming experience. Once in the party, moving their body around will be the interaction in the game, this will be VERY natural and objectively the game rules and be inherently learned after a few moments in front of the camera.

Currently, the players motivation or ‘reward system’ will come from within. We’re going for a players curiosity. We have not yet decided on an appropriate goal, but one that came to my mind is to build on the curiosity component. Not only will the player be using a natural interface, but there will be an NPC in the house, motioning for the player to follow them. The player will become ponderous… “Who this person?” “Why are they asking me to follow them?” “where are we going?” This will be the motivation to continue through the game, where along the way the story will unravel and the player will be exposed to various emotional states and experiences from the NPCs.

The operative actions for the player will be moving their hand. Until further testing and development can be done with the Kinect sensor planning for any further functionality will me unfeasible. The added sophistication to the interface will take a tremendous amount of time not within the scope of our project, but is definitely something that should be considered in the future. Through this single operative action there will be various resultant actions within the game, the player will be able to control the position of their avatar, and they will be able to make in game choices to decide the development of the game and where the story will go. We can also add simple functionality to interact with the 3D environment they are in to add a simple but interesting and intriguing degree of sophistication.

Though the development of virtual skills will be very limited, the real life skills learned in this game should be extensive. The entire purpose of this educational game is to expose autistic children to a wide variety of emotions and help them learn what these emotions are and how to interpret and react to these emotions. Using the sophisticated scaffolding system which is being developed with psychological research the skill set and knowledge left with the player should be useful in the real world, at home, and in public.

Posted in Educational Game | Leave a comment