-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdeploy-ros.sh
executable file
·69 lines (58 loc) · 2.12 KB
/
deploy-ros.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash
#
# This install automatically ROS (kinetic) and workspace for work on SARA
#
# @author: Lucas Maurice
# @organisation: Walking Machine
# @date: 14/06/2018
# Prepare ROS installation
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
sudo apt update
# Install ROS and dependencies
sudo apt install -y ros-kinetic-desktop-full
sudo apt install -y python-rosinstall python-rosinstall-generator python-wstool build-essential
sudo apt install -y ros-kinetic-ros-control ros-kinetic-hardware-interface ros-kinetic-moveit ros-kinetic-navigation
sudo apt install -y ffmpeg
sudo apt install -y python-imaging python-imaging-tk python-pip
pip install --upgrade pip
pip install Pillow
python -m pip install --user --upgrade pip
python -m pip install Pillow
# Initialise ROS
sudo rosdep init
rosdep update
# Prepare workspace
source /opt/ros/kinetic/setup.bash
mkdir ~/sara_ws/src/ -p
cd ~/sara_ws/src
# Get wm main repositories
git clone [email protected]:WalkingMachine/sara_msgs.git
git clone [email protected]:WalkingMachine/sara_launch.git
git clone [email protected]:WalkingMachine/sara_behaviors.git
git clone [email protected]:WalkingMachine/wonderland.git
git clone [email protected]:WalkingMachine/wm_object_detection.git
git clone [email protected]:team-vigir/flexbe_behavior_engine.git
# Install Wonderland
cd ~/sara_ws/src/wonderland
./install.sh
# Install Behavior
cd ~/sara_ws/src/sara_behaviors
./install.sh
# Build workspace
cd ~/sara_ws
catkin_make
# Source workspace
source ~/sara_ws/src/sara_launch/sh_files/sararc.sh
# Write sources in bashrc
if !(grep --quiet "# FOR ROS" ~/.bashrc); then
echo Deploy Source to .bashrc
echo "# FOR ROS" >> ~/.bashrc
echo "source ~/sara_ws/src/sara_launch/sh_files/sararc.sh" >> ~/.bashrc
fi
# Write sources in zshrc
if !(grep --quiet "# FOR ROS" ~/.zshrc); then
echo Deploy Source to .zshrc
echo "# FOR ROS" >> ~/.zshrc
echo "source ~/sara_ws/src/sara_launch/sh_files/sararc.sh" >> ~/.zshrc
fi