Skip to content

Instantly share code, notes, and snippets.

@tsaoyu
Last active February 18, 2017 17:51
Show Gist options
  • Save tsaoyu/9ee33c60f5e71881c9ee0c8660311243 to your computer and use it in GitHub Desktop.
Save tsaoyu/9ee33c60f5e71881c9ee0c8660311243 to your computer and use it in GitHub Desktop.

In this tutorial, we will setup the latest ROS(Robot Operate System) on the popular single board computer Raspberry Pi 3.

  1. Download image on RPi

Get an image from: https://wiki.ubuntu.com/ARM/RaspberryPi

Burn image on SD card with official tutorial https://www.raspberrypi.org/documentation/installation/installing-images/README.md

with lsb_release -a we have

Distributor ID:	Ubuntu
Description:	Ubuntu 16.04 LTS
Release:	16.04
Codename:	xenial
  1. Boot on RPi

login: ubuntu passwd: ubuntu

a compulsive change passwd is needed

if you don't have monitor you can search devices with arp -a and ssh into if you previous login ssh-keygen -R hostname

  1. Configure RPi

I found cloud-init is a bottleneck when boot, so I disabled by create a file sudo touch cloud-init.disabled

And also if there is error of unknow hostname ubuntu try to add a line after localhost sudo vi /etc/hosts 127.0.1.1 ubuntu

and you final hosts file should like this

127.0.0.1 localhost
127.0.1.1 ubuntu

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
  1. Install ROS

Follow the generic installation guide on http://wiki.ros.org/kinetic/Installation/Ubuntu

roscore and you would see

started roslaunch server http://ubuntu:44447/
ros_comm version 1.12.6


SUMMARY
========

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.6

NODES

auto-starting new master
process[master]: started with pid [1627]
ROS_MASTER_URI=http://ubuntu:11311/

  1. Other useful packages and setup

pigpio

  1. Other setup Disable daily update and upgrade of Ubuntu 16.04. Daily update and security upgrade was introduced to Ubunutu 16.04 and it sometimes cause dpkg lock problem. We can disable by
$ sudo systemctl disable apt-daily.service # disable run when system boot
$ sudo systemctl disable apt-daily.timer   # disable timer run

As the time of 25 Jan 2017, this approach break down because the automatic security update & upgrade mechanism. https://bugs.launchpad.net/ubuntu/+source/linux-raspi2/+bug/1652270

systemd manager GUI of systemd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment