Created
May 1, 2018 15:40
-
-
Save roncapat/c633cad24281d947aebde4477f46f842 to your computer and use it in GitHub Desktop.
Draft of automated configuration of Ubuntu Mate on RaspberryPi with ROS managin Dynamixel servos, Phidgets IMU and MoPi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Aggiorno firmware rpi | |
sudo rpi-update | |
# Disabilito servizio non necessario | |
sudo systemctl disable ureadahead.service | |
sudo systemctl mask ureadahead.service | |
# Aggiunta repository ROS | |
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' | |
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116 | |
# Aggiornamento, rimozione bloatware, installazione sw utile | |
sudo apt -y update | |
sudo apt -y upgrade | |
sudo apt purge -y firefox cups cups-* thunderbird scratch snapd ubuntu-mate-welcome vlc pidgin fonts-nanum youtube-dl minecraft-pi | |
sudo rm /etc/modules-load.d/cups-filters.conf | |
sudo apt install -y epiphany-browser ros-kinetic-desktop-full python-rosinstall python-rosinstall-generator python-wstool build-essential git libusb-dev synaptic | |
sudo apt autoremove | |
apt-cache search ros-kinetic | |
# Setup ROS | |
sudo rosdep init | |
rosdep update | |
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc | |
source ~/.bashrc | |
cd ~ | |
mkdir -p ros_bioloid/src | |
cd ros_bioloid | |
catkin_make | |
# Creazione link simbolico USB2AX (non sopravvive al reboot, magari serve scriptarlo in .bashrc o come regola udev) | |
sudo ln -s /dev/ttyACM0 /dev/ttyUSB0 | |
# Permetto l'interazione con la scheda Phidget | |
echo "SUBSYSTEMS==\"usb\", ACTION==\"add\", ATTRS{idVendor}==\"06c2\", ATTRS{idProduct}==\"0033\", MODE=\"666"\" | sudo tee /etc/udev/rules.d/99-phidgets.rules | |
# Permetto all'utente di interagire con le porte seriali | |
sudo adduser bioloid dialout | |
# Installazione Dynamixel (Libreria) | |
##cd ~ | |
##git clone git@github.com:ROBOTIS-GIT/DynamixelSDK.git | |
##cd DynamixelSDK/c/build/linux_sbc | |
##make | |
sudo apt install ros-kinetic-dynamixel-sdk | |
# Installazione Dynamixel (modulo ROS) | |
sudo apt install ros-kinetic-dynamixel-workbench | |
# Installazione Phidgets (Libreria) | |
#cd ~ | |
#wget https://www.phidgets.com/downloads/phidget22/libraries/linux/libphidget22.tar.gz | |
#tar -xvzf libphidget22.tar.gz | |
#cd libphidget22* | |
#make && sudo make install | |
#sudo ldconfig # to make shared libraries visible | |
# Installazione Phidgets (modulo ROS) | |
sudo apt install ros-kinetic-phidgets-api ros-kinetic-phidgets-imu ros-kinetic-phidgets-drivers ros-kinetic-imu-tools ros-kinetic-imu-filter-madgwick | |
#Installazione MoPi (Libreria e demone) | |
cd ~ | |
git clone git@github.com:hamishcunningham/pi-tronics.git | |
cd pi-tronics/simbamon | |
make install | |
echo "dtparam=i2c_arm=on" | sudo tee -a /boot/config.txt | |
## https://github.com/raspberrypi/firmware/issues/828 | |
wget https://doc-08-ao-docs.googleusercontent.com/docs/securesc/uq1b98lg749ksfs093hosj6khgfeao77/dv4t9enc0f69v817o5j845db94vtpi8n/1524139200000/16529539694801571760/14312737032246013555/0B_P-i4u-SLBXb3VlN0N5amVBb1k?e=download&nonce=js7rj0vs3anhq&user=14312737032246013555&hash=sjat2hks2h94qvb5t3suvkvm2p7rtdaq | |
sudo cp i2c1-bcm2708.dtbo /boot/overlays | |
echo "dtoverlay=i2c1-bcm2708" | sudo tee -a /boot/config.txt | |
head -n -1 /etc/default/simbamond > temp | |
echo "# wc1: -wc1 1 12000 11250 10500 9950" >> temp | |
echo "# end of local config - DON'T EDIT THIS LINE EITHER!" >> temp | |
sudo mv temp /etc/default/simbamond | |
sudo reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment