mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-27 13:39:33 +00:00
image_builder: install opencv3 as deb package
This commit is contained in:
@@ -27,11 +27,13 @@ echo_stamp() {
|
||||
}
|
||||
|
||||
# Add apt key to allow local mirror usage during image build
|
||||
#wget -O - ftp://192.168.0.10/coex-mirror.gpg | apt-key add -
|
||||
wget -O - ftp://mirror.coex.space/coex-mirror.gpg | apt-key add -
|
||||
# Generate a backup of the original source.list
|
||||
#cp /etc/apt/sources.list /var/sources.list.bak
|
||||
# Add the local mirror as the first priority repository
|
||||
#wget -O - ftp://192.168.0.10/coex-mirror.list 2>/dev/null | cat - /etc/apt/sources.list > /var/sources.list && mv /var/sources.list /etc/apt/sources.list
|
||||
cp /etc/apt/sources.list /var/sources.list.bak
|
||||
# Add the coex-mirror as the first priority repository
|
||||
curl ftp://mirror.coex.space/coex-mirror.list | cat - /etc/apt/sources.list > /var/sources.list && mv /var/sources.list /etc/apt/sources.list
|
||||
# Add the urpylka-rpi repo
|
||||
curl ftp://mirror.coex.space/urpylka-rpi.list >> /etc/apt/sources.list
|
||||
|
||||
echo_stamp "#1 apt cache update"
|
||||
|
||||
|
||||
@@ -418,10 +418,6 @@
|
||||
local-name: nodelet_core/nodelet
|
||||
uri: https://github.com/ros-gbp/nodelet_core-release/archive/release/kinetic/nodelet/1.9.14-0.tar.gz
|
||||
version: nodelet_core-release-release-kinetic-nodelet-1.9.14-0
|
||||
- tar:
|
||||
local-name: opencv3
|
||||
uri: https://github.com/ros-gbp/opencv3-release/archive/release/kinetic/opencv3/3.3.1-5.tar.gz
|
||||
version: opencv3-release-release-kinetic-opencv3-3.3.1-5
|
||||
- tar:
|
||||
local-name: orocos_kinematics_dynamics/orocos_kdl
|
||||
uri: https://github.com/smits/orocos-kdl-release/archive/release/kinetic/orocos_kdl/1.3.1-0.tar.gz
|
||||
|
||||
@@ -129,11 +129,14 @@ echo_stamp "#10 Building packages on 1 thread"
|
||||
# TODO: Can we increase threads number with HDD swap?
|
||||
cd /home/pi/ros_catkin_ws && ./src/catkin/bin/catkin_make_isolated --install -j$4 -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/kinetic
|
||||
|
||||
echo_stamp "#11 Remove build_isolated & devel_isolated from ros_catkin_ws"
|
||||
echo_stamp "#11 Building packages on 1 thread"
|
||||
apt-get install --no-install-recommends -y -qq ros-kinetic-opencv3
|
||||
|
||||
echo_stamp "#12 Remove build_isolated & devel_isolated from ros_catkin_ws"
|
||||
rm -rf /home/pi/ros_catkin_ws/build_isolated /home/pi/ros_catkin_ws/devel_isolated
|
||||
chown -Rf pi:pi /home/pi/ros_catkin_ws
|
||||
|
||||
echo_stamp "#12 Creating catkin_ws & Installing CLEVER-BUNDLE"
|
||||
echo_stamp "#13 Creating catkin_ws & Installing CLEVER-BUNDLE"
|
||||
git clone $1 /home/pi/catkin_ws/src/clever \
|
||||
&& cd /home/pi/catkin_ws/src/clever \
|
||||
&& git checkout $2 \
|
||||
@@ -147,10 +150,10 @@ git clone $1 /home/pi/catkin_ws/src/clever \
|
||||
&& systemctl enable roscore \
|
||||
&& systemctl enable clever
|
||||
|
||||
echo_stamp "#13 Change permissions for catkin_ws"
|
||||
echo_stamp "#14 Change permissions for catkin_ws"
|
||||
chown -Rf pi:pi /home/pi/catkin_ws
|
||||
|
||||
echo_stamp "#14 Setup ROS environment"
|
||||
echo_stamp "#15 Setup ROS environment"
|
||||
cat <<EOF | tee -a /home/pi/.bashrc > /dev/null
|
||||
LANG=C.UTF-8
|
||||
LC_ALL=C.UTF-8
|
||||
@@ -160,7 +163,7 @@ source /opt/ros/kinetic/setup.bash
|
||||
source /home/pi/catkin_ws/devel/setup.bash
|
||||
EOF
|
||||
|
||||
#echo_stamp "#14 Removing local apt mirror"
|
||||
#echo_stamp "#16 Removing local apt mirror"
|
||||
# Restore original sources.list
|
||||
#mv /var/sources.list.bak /etc/apt/sources.list
|
||||
# Clean apt cache
|
||||
|
||||
Reference in New Issue
Block a user