Downloads:
Raspbian Line 2018 04 19, Ubuntu Mate 16.04
---------------
Only for 3B+, with information from Raspberry Pi forums
Copy the following files from Raspbian to Ubuntu Mate: - For Booting: copy bootcode.bin, fixup.dat, start.elf, bcm2710-rpi-3-b-plus.dtb and kernel7.img - also start_cd.elf, fixup_x.dat, and start_x.dat - For keyboard/mouse: copy /lib/modules/4.9.80-v7+ (root partition) - For network: copy the contents of /lib/firmware/brcm/ (root partition)-----------------------------------
unxz --keep <file> extract xz file
sudo fdisk -l print all disks, find /dev/mmcblk*** number (could be /dev/sd** if USB)
dd bs=4M if=<file.img> of=/dev/*** status=progress
!! warning, using the wrong /dev/*** could destroy your computer/OS (dd is sometimes called disk destroyer) !!
This could also take a bit of time as it copies over to the sd card
--------------
(with a HDMI monitor, keyboard and mouse)
Turn off auto updates: System -> administration -> software & updates -> updates tab -> automatically check for updates: never
Uninstall software:
ctrl + alt + t Opens terminal
apt list --installed List all packages
sudo apt autoremove remove all old packages
sudo apt install debian-goodies use dpigs to show space
remove: sudo apt purge youtube-dl youtube-dlg thunderbird libreoffice-core libreoffice-common minecraft-pi brasero transmission-common deja-dup atril hexchat account-plugin-* galculator gnome-orca shotwell-common plymouth snapd squeak-*
sudo apt update updates software lists
sudo apt upgrade uses software lists to download new software, if run for first time can take a while (10+ minutes)
-------------------------------
sudo nano /boot/cmdline.txt remove "quiet splash" and "plymouth.ignore-serial-consoles" to show things loading unstead of an animation
sudo raspi-config configure raspberry pi, tab to use options below
interfacing options -> turn on camera and ssh
For the Raspberry Pi 3B+ (underclock)
sudo nano /boot/config.txt
set arm_freq=1200 reduces CPU power
long shutdown (due to cups-browsed and default timeouts):
sudo systemctl stop cups-browsed.service
sudo systemctl disable cups-browsed.service
/etc/systemd/system.conf -> DefaultTimeout{Start/Stop}Sec=10s (default 90s) speeds up shutdown
sudo date -s "YYYY-MM-DD HH:MM:SS" change time - use current timezone if not connected to the internet
readlink -f <file> reads the location of the file
Use http://wiki.ros.org/kinetic/Installation/Ubuntu to install
=========
Setup the sources.list, and setup to allow packages.ros.org
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
Set keys
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
Desktop-Full Install: (Recommended) : ROS, rqt, rviz, robot-generic libraries, 2D/3D simulators, navigation and 2D/3D perception
sudo apt-get install ros-kinetic-desktop-full
==============
Use http://wiki.ros.org/ROSARIA and the following instructions
Download https://github.com/reedhedges/AriaCoda, and use sudo make install to install it to the system
Download https://github.com/amor-ros-pkg/rosaria into the ~/catkin_src/src directory, and use catkin_make -j 1 to limit the threads or else the system crashes
sudo usermod -a -G dialout $USER Setup access to USB
sudo nano /etc/udev/rules.d/50-myusb.rules Source - allow anyone to access the USB output
KERNEL=="ttyUSB[0-9]*",MODE="0666"
KERNEL=="ttyACM[0-9]*",MODE="0666"
SUBSYSTEM=="tty",DRIVERS="pl2303",SYMLINK+="tty_p3"
SUBSYSTEM=="tty",DRIVERS="ch341-uart",SYMLINK+="tty_adno"
The SYMLINK lines allow for a system link even if the ttyUSB change after a reboot. Use udevadm info --attribute-walk --path=/dev/ttyUSB* to get this information from the parent class of the device.
To start ROS, use roscore & and rosrun rosaria RosAria _port:=/dev/ttyUSB0 & (which could be in a bash script with sleep timers)
------------------
raspi-config -> boot options -> cli boot after logging in, startx starts a GUI
sudo nano /etc/rc.local edit to run a script at boot time
bash /home/ros-pi/setup.sh & #tells to run file and fork so it can run in background
nano /home/ros-pi/setup.sh Creates a file
!#/bin/bash
nmcli dev wifi hotspot ifname wlan0 ssid rpi-13 password "password"
chmod 755 <file> adds write permissions for user, read/exec for everyone
Reboot the Raspberry Pi, and then connect to the rpi-13 network with the given password
Note: it is not possible to use SSH though OSU_Secure, so a hotspot will need to be created (or an ethernet cord)
hostname -I | cut -d " " -f 1 gets the first part of IP address (hostname -I shows the IP address)
ssh ros-p3@10.42.0.1 connect from other machine to the pi, also connect to the wifi rpi-13 with password
---------------------
First, check the camera:
vcgencmd get_camera
raspistill -o file.jpg Tests the camera output, use xdg-open file.jpg to open the file
raspivid -fps 20 -w 1280 -h 720 -vf -hf -t 0 -o - | nc -l -p 5000 Starts the video streaming
netcat <ip address> 5000 | mplayer -fps 60 -cache 512 - on computer, where the ip address is of the RPi used to ssh into (10.0.0.42)