Details for Robotics Weekends - Episode 6 - ROS (Robot Operating System) installation on Raspberry Pi 2 or 3
I'm often asked how to install ROS on Raspberry Pi. So I decided to record this simple tutorial for you.
1) First we need to download Ubuntu ARM image from https://wiki.ubuntu.com/ARM/RaspberryPi
2) Write image to SD card:
- find sd card device (mine is /dev/sdg):
$ fdisk -l
- write image to SD card using dd. Dont forget that image is compressed:
$ xzcat {image} | sudo dd bs=4M of=/dev/sdg
- ensure that image has been written:
$ sudo fdisk -l /dev/{sdX}
3) Connect RPi to yor PC using ethernet cable
4) Wait for a minute or so until RPi finished loading...
5) Let's find IP address of connected RPi:
$ arp -a
6) Connect to RPi using ssh. Default user/pass is ubuntu/ubuntu:
$ ssh ubuntu@{your.ip}
7) After first login system will ask you to update password
8) Let's check if we have connection to Internet
9) And update all packages:
$ sudo apt update; sudo apt upgrade
10) If you don't use ubuntu cloud, you can remove cloud-init. This will speed up boot:
$ sudo apt remove cloud-init
11) Also remove cloud dirs from /etc and /var/lib dirs:
$ sudo rm -rf /etc/cloud; sudo rm -fr /var/lib/cloud
12) Add ROS repository:
$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
13) Setup keys:
$ wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
14) Update package index:
$ sudo apt update
15) We will install ROS base. It is set of basic packages for ROS:
$ sudo apt install ros-kinetic-ros-base
16) Initialise rosdep:
$ sudo rosdep init; rosdep update
17) Set up the ROS environment variables:
$echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc ; source ~/.bashrc
18) And check that ROS is correctly installed:
$ roscore
Links:
Комментариев нет:
Отправить комментарий