2012-12-21 17:20:54 +08:00
|
|
|
#!/bin/bash
|
2012-12-20 18:25:58 +08:00
|
|
|
## Installation script that should run in the virtual machine
|
|
|
|
# copy it into the virtual machine with:
|
|
|
|
# scp <user>@192.168.7.1:/<location of install.sh> .
|
|
|
|
# and run it:
|
2013-01-23 22:11:15 +08:00
|
|
|
# sh ./install-fuerte.sh
|
2012-12-20 18:25:58 +08:00
|
|
|
#
|
2012-12-21 17:20:54 +08:00
|
|
|
# local setting (must be adjusted)
|
|
|
|
USERNAME="lukas"
|
2012-12-21 19:14:13 +08:00
|
|
|
REPOS_PATH="home/lukas/ros-repos"
|
2012-12-21 17:20:54 +08:00
|
|
|
HOST_IP="192.168.7.1"
|
2012-12-20 18:25:58 +08:00
|
|
|
# This script does the following steps:
|
2012-12-05 01:19:09 +08:00
|
|
|
# create ssh login without password
|
2012-12-21 17:20:54 +08:00
|
|
|
#
|
2012-12-05 01:19:09 +08:00
|
|
|
ssh-keygen -t rsa
|
2012-12-20 18:25:58 +08:00
|
|
|
cat .ssh/id_rsa.pub | ssh $USERNAME@$HOST_IP 'cat >> .ssh/authorized_keys'
|
2012-12-21 17:20:54 +08:00
|
|
|
# create prepared rosinstall file
|
2012-12-21 19:14:13 +08:00
|
|
|
URL="ssh://$USERNAME@$HOST_IP/$REPOS_PATH"
|
2012-12-21 17:20:54 +08:00
|
|
|
cat > fuerte-ros-base.rosinstall << EOF
|
|
|
|
- git:
|
|
|
|
local-name: catkin
|
2012-12-21 19:14:13 +08:00
|
|
|
uri: $URL/catkin-release
|
2012-12-21 17:20:54 +08:00
|
|
|
version: debian/ros-fuerte-catkin_0.4.4_lucid
|
|
|
|
- git:
|
|
|
|
local-name: common_msgs
|
2012-12-21 19:14:13 +08:00
|
|
|
uri: $URL/common_msgs-release
|
2012-12-21 17:20:54 +08:00
|
|
|
version: debian/ros-fuerte-common-msgs_1.8.7_lucid
|
|
|
|
- git:
|
|
|
|
local-name: gencpp
|
2012-12-21 19:14:13 +08:00
|
|
|
uri: $URL/gencpp-release
|
2012-12-21 17:20:54 +08:00
|
|
|
version: debian/ros-fuerte-gencpp_0.3.4_lucid
|
|
|
|
- git:
|
|
|
|
local-name: genlisp
|
2012-12-21 19:14:13 +08:00
|
|
|
uri: $URL/genlisp-release
|
2012-12-21 17:20:54 +08:00
|
|
|
version: debian/ros-fuerte-genlisp_0.3.3_lucid
|
|
|
|
- git:
|
|
|
|
local-name: genmsg
|
2012-12-21 19:14:13 +08:00
|
|
|
uri: $URL/genmsg-release
|
2012-12-21 17:20:54 +08:00
|
|
|
version: debian/ros-fuerte-genmsg_0.3.10_lucid
|
|
|
|
- git:
|
|
|
|
local-name: genpy
|
2012-12-21 19:14:13 +08:00
|
|
|
uri: $URL/genpy-release
|
2012-12-21 17:20:54 +08:00
|
|
|
version: debian/ros-fuerte-genpy_0.3.7_lucid
|
|
|
|
- git:
|
|
|
|
local-name: ros
|
2012-12-21 19:14:13 +08:00
|
|
|
uri: $URL/ros-release
|
2012-12-21 17:20:54 +08:00
|
|
|
version: debian/ros-fuerte-ros_1.8.9_lucid
|
|
|
|
- git:
|
|
|
|
local-name: ros_comm
|
2012-12-21 19:14:13 +08:00
|
|
|
uri: $URL/ros_comm-release
|
2012-12-21 17:20:54 +08:00
|
|
|
version: debian/ros-fuerte-ros-comm_1.8.12_lucid
|
|
|
|
- git:
|
|
|
|
local-name: roscpp_core
|
2012-12-21 19:14:13 +08:00
|
|
|
uri: $URL/roscpp_core-release
|
2012-12-21 17:20:54 +08:00
|
|
|
version: debian/ros-fuerte-roscpp-core_0.2.5_lucid
|
|
|
|
- git:
|
|
|
|
local-name: rospack
|
2012-12-21 19:14:13 +08:00
|
|
|
uri: $URL/rospack-release
|
2012-12-21 17:20:54 +08:00
|
|
|
version: debian/ros-fuerte-rospack_2.0.13_lucid
|
|
|
|
- git:
|
|
|
|
local-name: std_msgs
|
2012-12-21 19:14:13 +08:00
|
|
|
uri: $URL/std_msgs-release
|
2012-12-21 17:20:54 +08:00
|
|
|
version: debian/ros-fuerte-std-msgs_0.4.8_lucid
|
|
|
|
EOF
|
2012-12-05 01:19:09 +08:00
|
|
|
# run rosinstall
|
|
|
|
mkdir ~/ros
|
|
|
|
rosinstall --catkin ~/ros fuerte-ros-base.rosinstall
|
2012-12-07 21:09:41 +08:00
|
|
|
# apply patch
|
|
|
|
cd ~/ros/ros_comm
|
|
|
|
patch -p1 << EOF
|
|
|
|
diff -cr ros_comm/tools/rosbag/src/recorder.cpp ros_comm.patched/tools/rosbag/src/recorder.cpp
|
|
|
|
*** ros_comm/tools/rosbag/src/recorder.cpp 2012-12-06 14:12:06.773910947 +0100
|
|
|
|
--- ros_comm.patched/tools/rosbag/src/recorder.cpp 2012-12-06 14:14:49.145917680 +0100
|
|
|
|
***************
|
|
|
|
*** 436,442 ****
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
boost::xtime xt;
|
|
|
|
! boost::xtime_get(&xt, boost::TIME_UTC);
|
|
|
|
xt.nsec += 250000000;
|
|
|
|
queue_condition_.timed_wait(lock, xt);
|
|
|
|
if (checkDuration(ros::Time::now()))
|
|
|
|
--- 436,442 ----
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
boost::xtime xt;
|
|
|
|
! boost::xtime_get(&xt, boost::TIME_UTC_);
|
|
|
|
xt.nsec += 250000000;
|
|
|
|
queue_condition_.timed_wait(lock, xt);
|
|
|
|
if (checkDuration(ros::Time::now()))
|
|
|
|
EOF
|
2012-12-05 01:19:09 +08:00
|
|
|
# cmake invocation
|
|
|
|
cd ~/ros
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2012-12-07 21:09:41 +08:00
|
|
|
cmake .. -DCMAKE_INSTALL_PREFIX=/opt/ros/fuerte -DSETUPTOOLS_DEB_LAYOUT=OFF
|
|
|
|
# compile and install
|
|
|
|
make
|
|
|
|
make install
|
|
|
|
# start roscore
|
|
|
|
. /opt/ros/fuerte/setup.sh
|
|
|
|
roscore
|