Preparation of SD card

(G)Introduction

This section explains installation of the execution environment for running RTC for Raspberry Pi (hereinafter referred to as RPI RTC).

The following installation procedure assumes Windows environment. If you are using a non-Windows environment please refer to the following site etc.

Here, we download the OS image from the Raspberry Pi official site and explain about various setups. The rough procedure to make OpenRTM available on Raspberry Pi is as follows.

  • Write the OS image to the SD card
  • Basic Setup of the OS
  • Installing OpenRTM-aist
  • Component execution test

In addition, since OpenRTM - aist installation and image where Kobuki component has already been installed are prepared here, the following procedure can be skipped.

(G)Capacity of SD card

The SD card you need is at least 2GB, but 4GB or more is required for actual use. Be sure to prepare an SD card of 4GB or more.

(G)Image download

Download OS Raspbian "wheezy" for Raspberry Pi from the following site. Raspbian is a Debian-based Linux distribution for RaspberryPi.

Please unzip the downloaded file YYYY-MM-DD-wheezy-raspbian.zip. YYYY-MM-DD-wheezy-raspbian.img file of 2GB size should be expanded.

 $ ls -al 
 total 4752840
 drwxr-xr-x  4 n-ando  staff         136  5 18 13:30 .
 drwxr-xr-x  9 n-ando  staff         306  5 18 13:30 ..
 -rw-r--r--  1 n-ando  staff  1939865600  2  9 12:44 2013-02-09-wheezy-raspbian.img
 -rwxr-xr-x  1 n-ando  staff   493587826  5  7 21:08 2013-02-09-wheezy-raspbian.zip

If it can not be deployed successfully, the download may fail and the file may be broken. Please delete the corrupted file and try downloading again.

(G)Write image

The expanded yyyy-mm-dd-hweezy-raspbian.img is called an image file, and the state of the disk started by Raspbian is extracted byte by byte from the beginning to the end of the disk. You can not use this file simply by copying it to SD card! !

Please write it to the SD card as described below.

(G)Writing images (Windows)

In Windows, you can write images by using the tool called Win32 DiskImager. Download the image data writing tool Win32DiskImager binary from the following site.

Extract the downloaded file (win32diskimager-vX.X-binary.zip).

* Because Win32 DiskImager does not support double-byte characters, YYYY-MM-DD-wheezy-raspbian.zip decompresses to halfway pathname where double-byte characters and spaces are not included Please give me.

Insert the SD card used by Raspberry Pi into the PC and start Win32 DiskImager.

* Since SD card needs to be recognized as a drive, format it in FAT32 format beforehand

Specify the drive of the SD card in Raspbian image file (YYYY-MM-DD-wheezy-raspbian.img), "Drive" which decompressed to "Image File" and click "Write" button.

win32diskimager.png
Write image data

The preparation of the SD card is now complete. When writing is completed, install the SD card in the Raspberry Pi and turn on the power.

(G)Writing images (Linux)

On Linux, you can read and write images using the dd command. The dd command is installed by default on most UNIX based operating systems.

After inserting the SD card, check the kernel message with the dmesg command.

 $ dmesg
   : Omission
 [333478.822170] sd 3:0:0:0: [sdb] Assuming drive cache: write through
 [333478.822174]  sdb: sdb1 sdb2
 [333478.839563] sd 3:0:0:0: [sdb] Assuming drive cache: write through
 [333478.839567] sd 3:0:0:0: [sdb] Attached SCSI removable disk
 [333479.094873] EXT4-fs (sdb2): mounted filesystem with ordered data mode
 [333527.658195] usb 1-1: USB disconnect, address 2

From this message, check the device name of the SD card. In this example sdb seems to be the device name of the SD card. Let's look under/dev/.

 ls -al /dev/sd*
 brw-rw---- 1 root disk 8,  0 May  7 17:28 /dev/sda
 brw-rw---- 1 root disk 8,  1 May  7 17:28 /dev/sda1
 brw-rw---- 1 root disk 8,  2 May  7 17:28 /dev/sda2
 brw-rw---- 1 root disk 8,  5 May  7 17:28 /dev/sda5
 brw-rw---- 1 root disk 8, 16 May 18 14:19 /dev/sdb
 brw-rw---- 1 root disk 8, 17 May 18 14:19 /dev/sdb1
 brw-rw---- 1 root disk 8, 32 May 18 14:19 /dev/sdc

Since sda is mostly a system disk, do not touch absolute.

Depending on the distribution, if there is a mountable file system in the SD card, there seem to be a case where it is mounted automatically. In that case, unmount the disk. (In Ubuntu, a folder of the file system mounted on the desktop appears, please remove it by right click, otherwise unmount with the umount command.)

ubuntu_adcard_mount.png
SD card mounted on Ubuntu (removable with right click menu)

dd if = Image file of = Device file of SD card bs = 1M Enter the command and execute it. However, since writing to the device file requires administrator (root) privilege, please use sudo.

 $ unzip  2013-02-09-wheezy-raspbian.zip
 Archive:  2013-02-09-wheezy-raspbian.zip
   inflating: 2013-02-09-wheezy-raspbian.img
 $ sudo dd if=2013-02-09-wheezy-raspbian.img of=/dev/sdb bs=1M
 1850+0 records in
 1850+0 records out
 1939865600 bytes (1.9 GB) copied, 201.543 s, 9.6 MB/s

During execution, you can check whether the writing is performed correctly by executing the iostat command on another terminal or the like. (In the latest distribution, it may not be installed by default.debian / ubuntu allows you to use the iostat command with apt-get install sysstat.)

 $ iostat -mx 1
  avg-cpu:  %user   %nice %system %iowait  %steal   %idle
            0.00    0.00    0.00   50.25    0.00   49.75
 
 Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s avgrq-sz avgqu-sz   await  svctm  %util
 sda               0.00     0.00    0.00    1.00     0.00     0.00     8.00     0.00    0.00   0.00   0.00
 sdb               0.00  1856.00    0.00   78.00     0.00     9.14   240.00   143.40 1855.85  12.82 100.00

Looking at the item of sdb, we can see that the writing speed of 9.14 MB/sec has come up. If you have a speed of about 6 MB/sec for class 6 SD card and 10 MB/sec for class 10 SD card, you can think that it is being written without problem. Depending on distribution, it may be mounted automatically when writing is finished. In that case, please unmount and then remove the SD card.

(G)Writing images (Mac OS X)

Mac OS X also writes using the dd command like Linux. However, on Mac, it is mounted automatically when you insert an SD card, you can not write to the SD card with the dd command while mounting, you need to unmount (remove from OS).

When inserting the SD card, an SD card icon will appear in the Finder as shown. Please be careful not to push eject button as you intend to unmount.

sdcard_mac.png
SD card mounted on Mac

The volume name of the SD card is Untitled here. Remember the volume name. When you enter the df command from the command prompt, the following message is displayed.

 $ df -k
 Filesystem                        1024-blocks      Used Available Capacity   iused    ifree %iused  Mounted on
 /dev/disk0s2                        500000000 437664508  62079492    88% 109480125 15519873   88%   /
 devfs                                     194       194         0   100%       679        0  100%   /dev
 map -hosts                                  0         0         0   100%         0        0  100%   /net
 map auto_home                               0         0         0   100%         0        0  100%   /home
 /dev/disk1s1                            57288     18992     38296    34%       512        0  100%   /Volumes/Untitled

The lowest /Volumes/Untitled is the mount point of the SD card. Remember the device name of the leftmost SD card /dev/disk1s1. Unmount this SD card. Use the command diskutil and enter diskutil umount <mount point>.

 $ diskutil umount /Volumes/Untitled
 Volume (null) on disk1s1 unmounted
 $ df -k
 Filesystem                        1024-blocks      Used Available Capacity   iused    ifree %iused  Mounted on
 /dev/disk0s2                        500000000 437664716  62079284    88% 109480177 15519821   88%   /
 devfs                                     194       194         0   100%       679        0  100%   /dev
 map -hosts                                  0         0         0   100%         0        0  100%   /net
 map auto_home                               0         0         0   100%         0        0  100%   /home

You can see that /Volumes/Untitled disappears and the SD card is unmounted. Then write the image using the dd command. dd if=image file of=/dev/rdisk1bs=1m. of=/dev/rdisk1 is the device name which takes the last s1 of the device file /dev/disk1s1 that you remembered earlier and also appended r to disk before the device is.

Since this command accesses the device file, it can not be executed unless it is an administrator (root). Execute as follows using sudo.

 $ sudo dd if=2013-02-09-wheezy-raspbian.img of=/dev/rdisk1 bs=1m
 1850+0 records in
 1850+0 records out
 1939865600 bytes transferred in 302.377337 secs (6415380 bytes/sec)
 $

While writing, you can see if the writing is performed correctly by looking at "Disk operation" in "Activity monitor". If you have a speed of about 6 MB / sec for class 6 SD card and 10 MB / sec for class 10 SD card, you can think that it is being written without problem.

When the writing is completed, it will automatically mount again, so press the eject button on the Finder this time to remove the SD card.

Download

latest Releases

For Begginers

Windows msi(installer) package (only trying samples)

C++,Python,Java,
Toolsを含む
1.2.1-RELEASE

Development environment is required for RT-Component development. See download page for details.

Number of Projects

Choreonoid

Motion editor/Dynamics simulator

OpenHRP3

Dynamics simulator

OpenRTP

Integrated Development Platform

AIST RTC collection

RT-Components collection by AIST

TORK

Tokyo Opensource Robotics Association

DAQ-Middleware

Middleware for DAQ (Data Aquisition) by KEK