sudo apt-get install git
NOTE: Picked zsh because it has better highlighting and completion, but also catkin generates zsh scripts.
Install zsh:
sudo apt-get install zsh
Make zsh default
chsh -s /bin/zsh
Install oh-my-zsh
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
Install autosuggestions
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
Install highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
Update the plugins
line in the .zshrc
file
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
following: https://varhowto.com/install-ros-noetic-raspberry-pi-4/
Add the apt repository
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu buster main" > /etc/apt/sources.list.d/ros-noetic.list'
add the key
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
Update
sudo apt update
Install dependencies
sudo apt-get install -y python-rosdep python-rosinstall-generator python-wstool python-rosinstall build-essential cmake
run rosdep
sudo rosdep init
rosdep update
make a catkin workspace
mkdir ~/ros_catkin_ws
cd ~/ros_catkin_ws
Use the ROS install generator to create the right install
rosinstall_generator robot navigation slam_gmapping laser_pipeline perception --rosdistro noetic --deps --wet-only --tar > noetic-ros_comm-wet.rosinstall
wstool init src noetic-ros_comm-wet.rosinstall
rosdep install -y --from-paths src --ignore-src --rosdistro noetic -r --os=debian:buster
increase swap from 100Mb to 1Gb
sudo dphys-swapfile swapoff
sudoedit /etc/dphys-swapfile
sudo dphys-swapfile setup
sudo dphys-swapfile swapon
Build all the ROS things and install them in /opt/ros/noetic
sudo src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/noetic -j1 -DPYTHON_EXECUTABLE=/usr/bin/python3
Install dependencies - For images
sudo apt-get install libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev
Install dependencies - For video
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
sudo apt-get install libxvidcore-dev libx264-dev
More dependencies
sudo apt-get install libgtk2.0-dev
Optimization libraries
sudo apt-get install libatlas-base-dev gfortran
Install pip3
sudo apt-get install python3-pip
Install numpy
pip install numpy
wget https://raw.githubusercontent.com/Drewsif/PiShrink/master/pishrink.sh
sudo chmod +x pishrink.sh
sudo mv pishrink.sh /usr/local/bin
sudo mount /dev/sda1 /media/stick
sudo dd if=/dev/mmcblk0 of=/media/stick/rpi4-ros-noetic-opencv.img bs=1M
cd /media/stick
sudo pishrink.sh -z rpi4-ros-noetic-opencv.img
Several hours. I think it took me about 3ish hours to get ROS installed. There's a lot of packages and the Pi isn't that fast. All the other stuff was pretty quick. Making the backup depends on the size of the card you have. You'll need at least a 16Gb card because my install is about 9Gb in size.