From fbbfdd54e889e552e9d22d197718bc534ba9f041 Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Thu, 6 Sep 2018 16:08:58 +0300 Subject: [PATCH] image_builder: fix syntax & move install opencv to software stage --- image_builder/scripts/ros_install.sh | 13 +++++-------- image_builder/scripts/software_install.sh | 1 + 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/image_builder/scripts/ros_install.sh b/image_builder/scripts/ros_install.sh index c2f735e7..5ccaca6a 100755 --- a/image_builder/scripts/ros_install.sh +++ b/image_builder/scripts/ros_install.sh @@ -122,21 +122,18 @@ echo_stamp "#9 Installing GeographicLib datasets" # Build the catkin Workspace #cd /home/pi/ros_catkin_ws && ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release -j1 --install-space /opt/ros/kinetic --pkg mavros opencv3 cv_bridge cv_camera mavros_extras web_video_server -echo_stamp "#10 Building packages on 1 thread" +echo_stamp "#10 Building packages" # Install builded packages # WARNING: A major bug was found when using --pkg option (catkin_make_isolated doesn't install environment files) # 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 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" +echo_stamp "#11 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 "#13 Creating catkin_ws & Installing CLEVER-BUNDLE" +echo_stamp "#12 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 \ @@ -150,10 +147,10 @@ git clone $1 /home/pi/catkin_ws/src/clever \ && systemctl enable roscore \ && systemctl enable clever -echo_stamp "#14 Change permissions for catkin_ws" +echo_stamp "#13 Change permissions for catkin_ws" chown -Rf pi:pi /home/pi/catkin_ws -echo_stamp "#15 Setup ROS environment" +echo_stamp "#14 Setup ROS environment" cat < /dev/null LANG=C.UTF-8 LC_ALL=C.UTF-8 diff --git a/image_builder/scripts/software_install.sh b/image_builder/scripts/software_install.sh index ddfa8f0f..775e2e0c 100755 --- a/image_builder/scripts/software_install.sh +++ b/image_builder/scripts/software_install.sh @@ -48,6 +48,7 @@ apt-get install --no-install-recommends -y -qq \ libjpeg8-dev=8d1-2 \ tcpdump \ libpoco-dev=1.7.6+dfsg1-5+deb9u1 \ + ros-kinetic-opencv3 \ > /dev/null echo_stamp "#2 Adding mjpg-streamer at /home/pi"