Skip to content

Commit

Permalink
Merge pull request #2 from salco/patch-1
Browse files Browse the repository at this point in the history
correct the problem with rosdep
  • Loading branch information
salco authored Sep 20, 2016
2 parents c776402 + 7f76542 commit a1a77c3
Showing 1 changed file with 36 additions and 15 deletions.
51 changes: 36 additions & 15 deletions script/sara_installer.bash
Original file line number Diff line number Diff line change
@@ -1,33 +1,44 @@
#!/bin/sh
#!/bin/bash

# Check to be sure the user is root
if [[ $EUID -ne 0 ]]
then
echo "Please run as root"
exit
fi

echo "S.A.R.A. Installation beginning"

# Adding source and key
echo "Adding source and key"

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 0xB01FA116
sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 0xB01FA116
if [ $? -ne 0 ]; then
echo "Adding source failed."
exit
fi

# To get the latest package lists
echo "Getting latest package lists and upgrading system"

sudo apt update -y
sudo apt upgrade -y
apt update -y
apt upgrade -y

# ROS installation
echo "Installing ROS"

sudo apt install -y ros-indigo-desktop-full -y
apt install -y ros-indigo-desktop-full -y

# Install tools
echo "Installing tools"

sudo apt install git python-pip python-wstool -y
apt install git python-pip python-wstool -y

# Package installation
echo "Installing package"

sudo apt install ros-indigo-openni2-launch ros-indigo-urg-node ros-indigo-xsens-driver \
apt install ros-indigo-openni2-launch ros-indigo-urg-node ros-indigo-xsens-driver \
ros-indigo-joystick-drivers ros-indigo-navigation ros-indigo-pocketsphinx ros-indigo-rosserial \
ros-indigo-roboteq-diagnostics ros-indigo-roboteq-msgs ros-indigo-smach \
ros-indigo-rtabmap-ros ros-indigo-gazebo-ros ros-indigo-slam-gmapping ros-indigo-map-laser \
Expand All @@ -38,17 +49,18 @@ ros-indigo-soem espeak ros-indigo-object-recognition-core ros-indigo-object-rec
# Utility installation
echo "Installing Utility"

sudo apt install htop lm-sensors tig
apt install htop lm-sensors tig


# Interface graphic couchapp
echo "Installing graphic for couchapp"

sudo pip install -U couchapp
pip install -U couchapp

# pyttsx
echo "Installing pyttsx"

sudo pip install pyttsx
pip install pyttsx

# workspace creation
echo "Creating Workspace"
Expand All @@ -65,9 +77,14 @@ source ~/.bashrc
# rosdep
echo "ros dep"

sudo rosdep init
rosdep init
rosdep update
rosdep install --from-paths src --ignore-src --rosdistro indigo -y
if [ $? -ne 0 ]; then
echo "ros dep failed."
exit
fi


# catkin_make to build all the packages
echo "Building packages"
Expand All @@ -82,6 +99,10 @@ catkin_make

#enable database online viewer
rosrun object_recognition_core push.sh

echo "Continue with remote_setup.md"
echo "Installation done go get a beer and code"
if [ $? -eq 0 ]; then
chown -R $USER ~/sara_ws
echo "Continue with remote_setup.md"
echo "Installation done go get a beer and code"
else
echo "The Installation faild. Unable to use command: rosrun"
fi

0 comments on commit a1a77c3

Please sign in to comment.