Add files via upload
هذا الالتزام موجود في:
42
README.md
Normal file
42
README.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# Quick ROS Install
|
||||
|
||||
Instant install script for ROS on various versions of Ubuntu Linux
|
||||
|
||||
## Install ROS on Ubuntu
|
||||
|
||||
wget https://raw.githubusercontent.com/PickNikRobotics/quick-ros-install/master/ros_install.sh && chmod 755 ros_install.sh && ./ros_install.sh melodic
|
||||
|
||||
Note: you may need these basic dependencies if, for example, you are running in a Docker container:
|
||||
|
||||
apt-get update && apt-get install wget lsb-release sudo -y
|
||||
|
||||
## Install ROS with Docker
|
||||
|
||||
The following documents how to use a Nvidia-ready Docker container. More [details](http://wiki.ros.org/docker/Tutorials/Hardware%20Acceleration).
|
||||
|
||||
### Install Docker
|
||||
|
||||
If you are running a recent version of Ubuntu (e.g. 14.04, 16.04) it can be as simple as:
|
||||
|
||||
sudo apt-get install curl
|
||||
curl -sSL https://get.docker.com/ | sh
|
||||
sudo usermod -aG docker $(whoami)
|
||||
|
||||
And you will likely need to log out and back into your user account for the changes to take affect.
|
||||
|
||||
### Download Nvidia Docker Script
|
||||
|
||||
We'll use the same approach provided by the ROS MoveIt! project for providing GPU support:
|
||||
|
||||
wget https://raw.githubusercontent.com/ros-planning/moveit/kinetic-devel/.docker/gui-docker gui-docker
|
||||
chmod +x gui-docker
|
||||
|
||||
### Run Docker
|
||||
|
||||
./gui-docker -it --rm ros:kinetic-ros-base /bin/bash
|
||||
|
||||
### Test Docker
|
||||
|
||||
apt-get update
|
||||
apt-get install ros-kinetic-rviz -y
|
||||
rosrun rviz rviz
|
94
ros_install.sh
Normal file
94
ros_install.sh
Normal file
@@ -0,0 +1,94 @@
|
||||
#!/bin/bash -eu
|
||||
|
||||
# The BSD License
|
||||
# Copyright (c) 2018 PickNik Consulting
|
||||
# Copyright (c) 2014 OROCA and ROS Korea Users Group
|
||||
|
||||
#set -x
|
||||
|
||||
function usage {
|
||||
# Print out usage of this script.
|
||||
echo >&2 "usage: $0 [ROS distro (default: melodic)"
|
||||
echo >&2 " [-h|--help] Print help message."
|
||||
exit 0
|
||||
}
|
||||
|
||||
# Parse command line. If the number of argument differs from what is expected, call `usage` function.
|
||||
OPT=`getopt -o h -l help -- $*`
|
||||
if [ $# != 1 ]; then
|
||||
usage
|
||||
fi
|
||||
eval set -- $OPT
|
||||
while [ -n "$1" ] ; do
|
||||
case $1 in
|
||||
-h|--help) usage ;;
|
||||
--) shift; break;;
|
||||
*) echo "Unknown option($1)"; usage;;
|
||||
esac
|
||||
done
|
||||
|
||||
ROS_DISTRO=$1
|
||||
ROS_DISTRO=${ROS_DISTRO:="melodic"}
|
||||
|
||||
version=`lsb_release -sc`
|
||||
echo ""
|
||||
echo "INSTALLING ROS USING quick_ros_install --------------------------------"
|
||||
echo ""
|
||||
echo "Checking the Ubuntu version"
|
||||
case $version in
|
||||
"saucy" | "trusty" | "vivid" | "wily" | "xenial" | "bionic")
|
||||
;;
|
||||
*)
|
||||
echo "ERROR: This script will only work on Ubuntu Saucy(13.10) / Trusty(14.04) / Vivid / Wily / Xenial / Bionic. Exit."
|
||||
exit 0
|
||||
esac
|
||||
|
||||
relesenum=`grep DISTRIB_DESCRIPTION /etc/*-release | awk -F 'Ubuntu ' '{print $2}' | awk -F ' LTS' '{print $1}'`
|
||||
if [ "$relesenum" = "14.04.2" ]
|
||||
then
|
||||
echo "Your ubuntu version is $relesenum"
|
||||
echo "Intstall the libgl1-mesa-dev-lts-utopic package to solve the dependency issues for the ROS installation specifically on $relesenum"
|
||||
sudo apt-get install -y libgl1-mesa-dev-lts-utopic
|
||||
else
|
||||
echo "Your ubuntu version is $relesenum"
|
||||
fi
|
||||
|
||||
echo "Add the ROS repository"
|
||||
if [ ! -e /etc/apt/sources.list.d/ros-latest.list ]; then
|
||||
sudo sh -c "echo \"deb http://packages.ros.org/ros/ubuntu ${version} main\" > /etc/apt/sources.list.d/ros-latest.list"
|
||||
fi
|
||||
|
||||
echo "Download the ROS keys"
|
||||
roskey=`apt-key list | grep "ROS Builder"` && true # make sure it returns true
|
||||
if [ -z "$roskey" ]; then
|
||||
echo "No ROS key, adding"
|
||||
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
|
||||
fi
|
||||
|
||||
echo "Updating & upgrading all packages"
|
||||
sudo apt-get update
|
||||
sudo apt-get dist-upgrade -y
|
||||
|
||||
echo "Installing ROS"
|
||||
sudo apt install -y \
|
||||
liburdfdom-tools \
|
||||
python-rosdep \
|
||||
python-rosinstall \
|
||||
python-bloom \
|
||||
python-rosclean \
|
||||
python-wstool \
|
||||
python-pip \
|
||||
python-catkin-lint \
|
||||
python-catkin-tools \
|
||||
python-rosinstall \
|
||||
ros-$ROS_DISTRO-desktop
|
||||
|
||||
# Only init if it has not already been done before
|
||||
if [ ! -e /etc/ros/rosdep/sources.list.d/20-default.list ]; then
|
||||
sudo rosdep init
|
||||
fi
|
||||
rosdep update
|
||||
|
||||
echo "Done installing ROS"
|
||||
|
||||
exit 0
|
المرجع في مشكلة جديدة
حظر مستخدم