In this article, we teach C-BISCUIT how to do important life things, such as booting into our OS of choice, and connecting to the Wi-Fi it'll come to know as the gateway to knowledge.

Introduction

If you're not familiar with C-BISCUIT, check out the series:

C-BISCUIT: A Robotics Platform for the Hacker and Hobbyist 

So at this point, if you've been following along you'll have had the opportunity to put together some power management boards as well as learn about why we chose the hardware we did. Now I'm going to show you the basics of getting your Wandboard set up for further development. What follows is one of two ways to gear it up; Patrick will be doing a related article that focuses on a barebones ARM Linux build, instead of the full Ubuntu flash (which has its advantages, but might carry more software than you need for your interests).

This article assumes that you've acquired your Wandboard Quad, a way to power it (for now, you'll want to get started using a 5V adapter), and an SD card to put your preferred ARM Linux distribution on. We recommend the Ubuntu 14.04 image (dated for 11 May 2015) available on the Wandboard website, and that's the one we'll be using for all of our development. I'll avoid regurgitating information you can easily find in their documentation regarding preparing an SD card or booting up your system. One quick note though - make sure to give the diagrams in their quick-start guide a careful look, as you could end up putting the SD card for your OS in the wrong slot, like some writers have (I admit nothing). The one you want is on the i.MX6 board, near where you connect the Wi-Fi antenna.

 

Tweaking Your Install: Prior to Boot

If you're reading ahead and have already tried the installation guide for UbuntuARM, you might have run into some issues. One problem that could be plaguing you is a lack of space on your newly-configured SD card. By default, the Ubuntu install is only actually taking up about 3.1GB of your SD card, which means you should have plenty of space left over for ROS and some other stuff, if you're using an 8GB or larger disk. The easiest way to get access to this extra space (if it's not already available) is by using GParted (Linux) or Disk Management (Windows) on the drive. Whichever route you take, make sure that you're extending - not shrinking - the volume.

 

It lives!

 

That Thing You Do Once It's On

If you've got your Wandboard hooked up to a monitor and keyboard, you should see a familiar-looking Ubuntu welcome screen. From here, logging in should be as simple as selecting the Ubuntu User account and entering "ubuntu" as the password. The thing you'll want to immediately get out of the way once you're logged in is to teach your Wandboard how to connect to your internet (it probably won't go all SkyNet on you just yet, though), as it'll have to be available to you that way in the future. It'll be incredibly inconvenient later on to have to plug a monitor and keyboard in to make changes, and that's where SSH and/or PuTTY come in. You can do this over ethernet or using the Wandboard's wireless antenna, so choose whichever is more convenient for now. If you're going the wireless route, then hit the network icon on the Wandboard desktop and enter your Wi-Fi name and password; otherwise, read on.

Before we pull the HDMI plug out for good, you'll want to know the Wandboard's IP address. At the Ubuntu desktop, press CTRL+ALT+T to open a terminal. The quickest way to get the IP is to type "hostname -I" (that's a capital "i" there, if your font selection makes it difficult to see). If you want to see things in more detail, type "ifconfig" and then hit enter, and you'll get a list of network information. If you're on ethernet, look for the "eth0" section, while if you're on wireless, look for "wlan0". The IP of the Wandboard will be found in that section as the "inet addr". You could also find the IP by logging into your network hub and looking at the list of connected devices (it'll show up named "wandboard" there). However you go about it, keep track of that for later.

 

Connecting to the Wandboard Remotely - Linux

If you have access to a Unix-based system by default, the next bit will be pretty easy. Open up a terminal (CTRL+ALT+T if you're using Ubuntu) and type "ssh ubuntu@the_IP_of_your_wandboard". You'll be prompted for a password. Enter "ubuntu" and continue. You should see something like the following:

 

 

From here we're ready to install ROS. Head on past the Windows section for details on that.

 

Connecting to the Wandboard Remotely - Windows

Logging in with PuTTY is pretty easy too. Just start the program and enter the Wandboard's IP like so:

 

 

Hit "Open". You'll see a black terminal, and you'll be prompted for the user you want to log in as, as well as their password:

 

 

You're ready to start tweaking your Wandboard from the terminal at this point!

 

Autologin

Another issue you're going to run into when developing, if the system is left as-is, is that your Wandboard will fail to re-appear on your wireless network after a reboot. This is most likely because, after you reset it, it gets stuck at the login screen, waiting for you to type in the password again. In order to get around this, you'll have to edit a configuration file on your Ubuntu system. Type the following into the terminal once you've logged in remotely:

sudo nano /etc/lxdm/default.conf

 

Make sure your file looks like this at the top, then press CTRL+X and select Yes to save changes to the file:

 

 

From now on, if your network is up when the Wandboard starts, it'll connect (provided the antenna is plugged in).

 

ROS

This part can be confusing if you are following the UbuntuARM guide on the ROS wiki. For example, if you're like me, your locale won't actually need to be set, and if you do try those steps, you'll start getting some minor errors when doing other things. Here's an abridged version of their instructions, so that you can get to the fun stuff:

// Update your package sources

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu trusty main" > /etc/apt/sources.list.d/ros-latest.list' 

// Set up keys

sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net --recv-key 0xB01FA116 

// Update your package list 

sudo apt-get update 

// Get the core ROS libraries

sudo apt-get install ros-indigo-ros-base 

 

The next few commands set up rosdep, which will be essential for large parts of the ROS ecosystem:

sudo apt-get install python-rosdep
sudo rosdep init
rosdep update

 

Next, you'll want to set up the system so it has access to the necessary ROS environment variables when you start up. Either edit the .bashrc file with nano and add "source /opt/ros/indigo/setup.bash" at the end, or type the following:

echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc
source ~/.bashrc

 

To simplify the process of installing new libraries, you'll want rosinstall on your Wandboard as well. This can quickly be installed with the following:

sudo apt-get install python-rosinstall

 

Note that, at this time, ROS Indigo is the only ARM build to use (no Jade or Kinetic yet), but there's plenty we can do with just that.

 

Your Wandboard is Ready

That's it! You now have your Wandboard set up to where we can start integrating sensors and communicating with other parts of the project. If you want to know more about ROS before reading the next article, have a look at the wiki. Our next segment will cover how to do a more barebones build for your OS (which might be ideal if you want to use a smaller SD card, or don't want to bother with all of that GUI stuff). It'll also be valuable for getting a better handle on the inner workings of your robot's system in the future since you'll end up knowing a bit more.

Next on the list of things to do is to start setting up a framework to make future programming of the system easier. To that end, in the next few articles, we'll go over the basics of input and output on the board, and writing short test/diagnostic scripts that we can expand upon as we go.

 

Cheers!

 

Next Article in Series:

 

Comments

0 Comments