Last active
October 10, 2023 13:36
-
-
Save kauailabs/53e7ff136e6e7d3f883f77576d70fbcd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ########## | |
| ## | |
| ## VMX Robotics Toolkit (VMX-rtk) Build Script | |
| ## | |
| ## V2.1 Release (1/27/2020) - compatible with Raspbian Buster and Raspberry Pi 4B | |
| ## | |
| ## NOTE: Before running this script, verify that the swap space on the Raspberry Pi | |
| ## has been increased (see comments within this script). This is necessary if building | |
| ## from Raspian Stretch Desktop and when a value greater than "make -j1" is used. | |
| ## | |
| ## The recommended swap space size is 2048MB. | |
| ## | |
| ## And finally: a reminder that swapping to SD card is not recommended. The purpose | |
| ## of increasing swap space is to ensure the system continues to run (although slowly) | |
| ## when physical memory is temporarily exhausted. | |
| ########## | |
| #Prints | |
| echo "VMX_RTK_STD_V2.1 RELEASE" | sudo tee --append /home/pi/vmx-rtk/master.log | |
| ### | |
| # Increase Raspberry Pi SWAP Size (TODO: Currently Manual - automate this) | |
| ### | |
| # Increase Swap size, to stop the system from hanging on multi-core builds | |
| # 1) Edit /etc/dphys-swapfile to change this line to: | |
| # CONF_SWAPSIZE=2048 | |
| # | |
| # 2) Restart the swapfile service: | |
| # sudo /etc/init.d/dphys-swapfile stop | |
| # sudo /etc/init.d/dphys-swapfile start | |
| function start_step() { | |
| set +x | |
| echo "*********************" | |
| echo "** Start Step ${1} **" | |
| echo "*********************" | |
| set -x | |
| } | |
| function end_step() { | |
| set +x | |
| echo "*********************" | |
| echo " End Step ${1} " | |
| echo "*********************" | |
| set -x | |
| } | |
| function usage() { | |
| echo "./vmx-rtk_script.sh [-h] [<step #>][~][<step#>]" | |
| echo " -h : Show this usage information" | |
| echo " <step #> is one of the following:" | |
| echo " (blank) - Run entire script" | |
| echo " 1 - Download and place VMX-RTK Desktop Icons" | |
| echo " 2 - Ensure that Raspbian is all up-to-date with ROS Dependencies" | |
| echo " 3 - Raspberry Pi System Configuration" | |
| echo " 4 - Raspi-Config loacalization settings" | |
| echo " 5 - Replace syslog with busybox" | |
| echo " 6 - Replace Openjdk with Oracle Java8 SDK [NOTE: DEPRECATED ON BUSTER]" | |
| echo " 7 - Miscellaneous distribution installs" | |
| echo " 8 - Add KauaiLabs gpg key and KauaiLabs apt site, and install VMX-pi HAL" | |
| echo " 9 - Build/Install SWIG" | |
| echo " 10 - Enable VMX-RTK Splashscreen" | |
| echo " 11 - Custom FFMPEG Build" | |
| echo " 12 - Build OpenCV" | |
| echo " 13 - Build WPILIB" | |
| echo " 14 - Install Python ntcore, cscore" | |
| echo " 15 - VisionBuildSamples" | |
| echo " 16 - Build ROS (Kinetic)" | |
| echo "" | |
| echo "Run Options:" | |
| echo " <step#> : run step# only, then stop" | |
| echo " <step#>~ : run from step# onward to end" | |
| echo " ~<step#> : run from step 1 to step#" | |
| echo " <step#>~<step#> : run from first step# through second step#, then stop" | |
| exit 0; | |
| } | |
| start="" | |
| end="" | |
| laststep=16 | |
| while [[ $# -gt 0 ]] | |
| do | |
| key="$1" | |
| case $key in | |
| -h*|--help*) | |
| usage | |
| ;; | |
| *) | |
| start=$(echo ${key} | cut -d"~" -f1) | |
| if [ "${start}" == "" ] | |
| then | |
| start=1 | |
| fi | |
| if [ "$(echo ${key} | grep "~")" == "" ] | |
| then | |
| end=${start} | |
| else | |
| end=$(echo ${key} | cut -d"~" -f2) | |
| if [ "${end}" == "" ] | |
| then | |
| end=${laststep} | |
| fi | |
| fi | |
| break | |
| ;; | |
| esac | |
| done | |
| if [ -z "${start}" ] | |
| then | |
| start=1 | |
| fi | |
| if [ -z "${end}" ] | |
| then | |
| end=${laststep} | |
| fi | |
| echo "Starting at step ${start} and ending on step ${end}" | |
| # Echo commands to console | |
| #set -x | |
| # Abort the script if any commands fail | |
| set -e | |
| step=${start} | |
| #### | |
| ### Download and place VMX-RTK Desktop Icons | |
| #### | |
| if [ ${step} -eq 1 ] && [ ${step} -le ${end} ] | |
| then | |
| start_step ${step} | |
| cd ~ | |
| rm -fr vmx-rtk | |
| rm -fr Desktop/vmx*.desktop* | |
| mkdir -p vmx-rtk/images | |
| pushd vmx-rtk/images | |
| # The following wget options ensure that only the files in the target directory will be download | |
| wget -e robots=off -nH -nd -np -l1 --recursive --no-parent --reject="index.html*" http://www.kauailabs.com/public_files/vmx-rtk/images/ | |
| popd | |
| #Download and place Desktop shortcuts | |
| pushd Desktop | |
| # The following wget options ensure that only the files in the target directory will be download | |
| wget -e robots=off -nH -nd -np -l1 --recursive --no-parent --reject="index.html*" http://www.kauailabs.com/public_files/vmx-rtk/desktop/ | |
| popd | |
| end_step ${step} | |
| ((step++)) | |
| fi | |
| #### | |
| ### Ensure that Raspbian is all up-to-date with ROS Dependencies | |
| #### | |
| if [ ${step} -eq 2 ] && [ ${step} -le ${end} ] | |
| then | |
| start_step ${step} | |
| sudo apt-get -y update | |
| sudo apt-get -y --allow-unauthenticated upgrade | |
| cd ~ | |
| end_step ${step} | |
| ((step++)) | |
| fi | |
| ##### | |
| ### Raspberry Pi System Configuration | |
| ##### | |
| if [ ${step} -eq 3 ] && [ ${step} -le ${end} ] | |
| then | |
| start_step ${step} | |
| # Enable SPI Interface (required for VMX-pi) | |
| sudo raspi-config nonint do_spi 0 | |
| # Enable I2C Interface (typically required for VMX-pi) | |
| sudo raspi-config nonint do_i2c 0 | |
| echo "dtparam=i2s=on" | sudo tee --append /boot/config.txt | |
| # Enable Serial Interface (typically required for VMX-pi) | |
| sudo raspi-config nonint do_serial 0 | |
| # Disable serial console (so as not to conflict with serial interface) | |
| sudo sed -i -e "s/console=serial0,115200//g" /boot/cmdline.txt | |
| sudo sed -i -e "s/console=tty1//g" /boot/cmdline.txt | |
| end_step ${step} | |
| ((step++)) | |
| fi | |
| #### | |
| ### Raspi-Config loacalization settings | |
| #### | |
| if [ ${step} -eq 4 ] && [ ${step} -le ${end} ] | |
| then | |
| start_step ${step} | |
| # Set Timezone | |
| sudo rm /etc/timezone | |
| echo "Pacific/Honolulu" | sudo tee --append /etc/timezone | |
| # Set WIFI country | |
| sudo raspi-config nonint do_wifi_country US | |
| # Configure Keyboard | |
| sudo rm /etc/default/keyboard | |
| echo "# KEYBOARD CONFIGURATION FILE | |
| # Consult the keyboard(5) manual page. | |
| XKBMODEL="pc105" | |
| XKBLAYOUT="us" | |
| XKBVARIANT="us" | |
| XKBOPTIONS="" | |
| BACKSPACE="guess"" | sudo tee --append /etc/default/keyboard | |
| end_step ${step} | |
| ((step++)) | |
| fi | |
| #### | |
| ### Replace syslog with busybox, avoiding writes to the hard disk for system logs | |
| ### (this is needed when configuring VMX Robotics Toolkit in 'headless' mode) | |
| #### | |
| if [ ${step} -eq 5 ] && [ ${step} -le ${end} ] | |
| then | |
| start_step ${step} | |
| sudo apt-get install busybox-syslogd; sudo dpkg --purge rsyslog | |
| end_step ${step} | |
| ((step++)) | |
| fi | |
| #### | |
| ### Replace openjdk with oracle java8 sdk - this avoids some issues with opencv | |
| ### NOTE: This is deprecated on buster, now that openjdk11 is included | |
| #### | |
| if [ ${step} -eq 6 ] && [ ${step} -le ${end} ] | |
| then | |
| start_step ${step} | |
| #sudo apt-get -y purge openjdk* | |
| #sudo apt -y autoremove | |
| #sudo apt-get -y install oracle-java8-jdk* | |
| #export JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-armhf | |
| end_step ${step} | |
| ((step++)) | |
| fi | |
| #### | |
| ### Miscellaneous distribution installs | |
| #### | |
| if [ ${step} -eq 7 ] && [ ${step} -le ${end} ] | |
| then | |
| start_step ${step} | |
| # Scott Libert, 1/23/2020 - eclipse no longer runs on raspbian buster | |
| #sudo apt-get -y install eclipse eclipse-jdt eclipse-cdt | |
| sudo apt-get -y install git | |
| sudo apt-get -y install git-gui | |
| sudo apt-get -y install ftp | |
| sudo apt-get -y install libboost1.67-all | |
| sudo apt-get -y install ntp | |
| sudo apt-get -y install xgalaga | |
| sudo apt-get -y install tcl-dev | |
| sudo apt-get -y install mono-runtime | |
| sudo apt-get -y install libpcre3 libpcre3-dev | |
| sudo apt-get -y install cmake | |
| sudo apt-get -y install mono-devel | |
| sudo apt-get -y install gradle | |
| end_step ${step} | |
| ((step++)) | |
| fi | |
| #### | |
| ### Add KauaiLabs gpg key, add KauaiLabs apt site, and install VMX-pi HAL | |
| ### (This can be updated later via: sudo apt-get install --only-upgrade vmxpi-hal) | |
| #### | |
| if [ ${step} -eq 8 ] && [ ${step} -le ${end} ] | |
| then | |
| start_step ${step} | |
| sudo apt-get -y install dirmngr | |
| sudo apt-key adv --recv-key --keyserver pgp.mit.edu "74BBDA3E" | |
| # Added by M. Mann on 3/10/18 to prevent multiple entries in sources.list file | |
| if [ "$(grep "www.kauailabs.com/apt" /etc/apt/sources.list)" == "" ] | |
| then | |
| echo "deb http://www.kauailabs.com/apt ./" | sudo tee --append /etc/apt/sources.list | |
| fi | |
| #Added by M. Mann on 3/11/18 to ensure latest VMXPi-HAL is installed | |
| sudo apt-get -y remove vmxpi-hal | |
| sudo apt-get update | |
| sudo apt-get -y install vmxpi-hal | |
| end_step ${step} | |
| ((step++)) | |
| fi | |
| #### | |
| ### Build/Install SWIG | |
| #### | |
| if [ ${step} -eq 9 ] && [ ${step} -le ${end} ] | |
| then | |
| start_step ${step} | |
| cd ~ | |
| #Added by M. Mann on 3/11/2018 to clean up from any previous install | |
| rm -fr swig* | |
| wget http://prdownloads.sourceforge.net/swig/swig-3.0.12.tar.gz | |
| tar xzf swig-3.0.12.tar.gz | |
| cd swig-3.0.12 | |
| ./configure | |
| make | |
| sudo make install | |
| cd ~ | |
| rm swig-3.0.12.tar.gz | |
| end_step ${step} | |
| ((step++)) | |
| fi | |
| #### | |
| ### Enable VMX-RTK Splashscreen | |
| #### | |
| if [ ${step} -eq 10 ] && [ ${step} -le ${end} ] | |
| then | |
| start_step ${step} | |
| # Clean unnecessary text from boot, to help ensure an aesthetically-pleasing splashscreen | |
| # NOTE: All the text in this file must be on a single line | |
| #sudo bash -c "printf ' consoleblank=0 loglevel=1 quiet' >> /boot/cmdline.txt" | |
| # Download, rename, and move splashscreen image | |
| wget http://www.kauailabs.com/public_files/vmx-rtk/VMXrtk_Splashscreen.png | |
| sudo mv VMXrtk_Splashscreen.png /opt/splash.png | |
| # Replace default Raspbian Spashscreen file w/VMX-RTK image | |
| sudo apt-get install fbi | |
| sudo cp vmx/vmx-raspbian/splashscreen.service /etc/systemd/system/splashscreen.service | |
| sudo systemctl enable splashscreen | |
| # NOTE: A reboot is required after this installation for the splashscreen to take effect | |
| sudo mv /usr/share/plymouth/themes/pix/splash.png /usr/share/plymouth/themes/pix/splash_orig.png | |
| sudo cp /opt/splash.png /usr/share/plymouth/themes/pix/splash.png | |
| # NOTE: It is now required to also edit the following file: | |
| # /usr/share/plymouth/plymouthd.defaults | |
| # and change the following line, to set a 3 second delay | |
| # ShowDelay=3 | |
| end_step ${step} | |
| ((step++)) | |
| fi | |
| #### | |
| ### Custom FFMPEG Build. This step is necessary in order to work around a conflict | |
| ### that occurs when using OpenCV from Java. The issue is that the default build | |
| ### of FFMPEG (installed typically via apt) for Raspbian Stretch [v.3.2.9 as of this | |
| ### writing] is built to be dependent upon libopenmpt - which causes an exception | |
| ### when loaded from Java. | |
| ### | |
| ### Therefore, this custom build disables the references to libopenmpt. | |
| #### | |
| if [ ${step} -eq 11 ] && [ ${step} -le ${end} ] | |
| then | |
| start_step ${step} | |
| # Scott Libert (1/23/2020) - I don't believe this is necessary any longer (likely because opencv 3.4.1 is now used) | |
| # To help keep things clean, uninstall any existing ffmpeg | |
| sudo apt-get -y remove ffmpeg | |
| # Checkout FFMPEG | |
| cd ~ | |
| #Added by M. Mann on 3/12/2018 to clean up from any previous install | |
| rm -fr *n3.2.9* | |
| wget https://github.com/FFmpeg/FFmpeg/archive/n3.2.9.zip | |
| unzip n3.2.9.zip | |
| cd FFmpeg-n3.2.9 | |
| # Configure build to build .so files, and to NOT include the build of libopenmpt | |
| ./configure --disable-libopenmpt --enable-shared | |
| # Build & Install | |
| make -j5 | |
| sudo make install | |
| end_step ${step} | |
| ((step++)) | |
| fi | |
| #### | |
| ### OpenCV - build from source, with a special set of options for performance | |
| #### | |
| if [ ${step} -eq 12 ] && [ ${step} -le ${end} ] | |
| then | |
| start_step ${step} | |
| sudo apt-get -y install build-essential | |
| #wget https://bootstrap.pypa.io/get-pip.py | |
| #python get-pip.py | |
| #sudo python -m pip install -U numpy | |
| #sudo apt-get -y install python-dev | |
| # Added by M. Mann on 3/11/18 to ensure latest version of proper numpy is installed | |
| # sudo pip3 install numpy --upgrade | |
| #Scott Libert, 1/23/2020 - the following older version of get-pip.py is not good for raspbian buster (Python 2.7 deprecation) | |
| #python3 get-pip.py | |
| #rm get-pip.py | |
| sudo python3 -m pip install -U numpy | |
| sudo apt-get install libatlas-base-dev | |
| sudo apt-get -y install python-scipy python-matplotlib libgtk2.0-dev | |
| cd ~ | |
| rm -fr opencv* | |
| OPENCV_VER="3.4.1" | |
| sudo wget https://github.com/opencv/opencv/archive/${OPENCV_VER}.zip | |
| mv ${OPENCV_VER}.zip opencv.zip | |
| unzip opencv.zip | |
| cd opencv-${OPENCV_VER}/ | |
| if [ -d build ] | |
| then | |
| rm -fr build | |
| fi | |
| mkdir build | |
| cd build | |
| # ENABLE_NEON and ENABLE_VFPV3 to optimize performance on Raspberry Pi platform | |
| cmake -DENABLE_NEON=ON -DENABLE_VFPV3=ON -D CMAKE_BUILD_TYPE=RELEASE -D BUILD_PERF_TESTS=OFF -D BUILD_SHARED_LIBRARY=ON -D BUILD_TESTS=OFF -D BUILD_opencv_python2=ON -D BUILD_opencv_python3=ON -D JAVA_INCLUDE_PATH=/usr/lib/jvm/java-11-openjdk-armhf/include/ -D JAVA_AWT_INCLUDE_PATH=/usr/lib/jvm/java-11-openjdk-armhf/include/ -D JAVA_AWT_LIBRARY=/usr/lib/jvm/java-11-openjdk-armhf/include/jawt.h -D JAVA_JVM_LIBRARY=/usr/lib/jvm/java-11-openjdk-armhf/include/jni.h /home/pi/opencv-${OPENCV_VER} | |
| # NOTE (Scott Libert, 1/23/2020) - it was required to add a const char * (rather than char *) type | |
| # in modules/python/src2/cv2.cpp as described here (https://bugs.gentoo.org/691480) | |
| make -j5 | |
| sudo make install | |
| cd ~ | |
| rm -f opencv.zip | |
| end_step ${step} | |
| ((step++)) | |
| fi | |
| #### | |
| ###Cmake wpilib (Includes cscore, ntcore, and wpiutil) | |
| ### NOTE: wpilib build must occur ~after~ the opencv (>= 3.3.1) build, since cscore is dependent upon opencv | |
| ### | |
| ### This builds the wpi library ntcore, cscore and wpiutil components, | |
| ### builds them using cmake and installs the files to: | |
| ### | |
| ### /usr/local/wpilib | |
| #### | |
| if [ ${step} -eq 13 ] && [ ${step} -le ${end} ] | |
| then | |
| start_step ${step} | |
| cd ~ | |
| if [ -d wpilib_cmake ] | |
| then | |
| rm -r -f wpilib_cmake | |
| fi | |
| mkdir wpilib_cmake | |
| # Added by M. Mann on 3/10 to avoid wpilib finding OpenCV in previous ROS build | |
| if [ -e "/opt/ros/kinetic" ] | |
| then | |
| sudo rm -fr /opt/ros/kinetic | |
| sudo rm -fr /usr/local/wpilib | |
| fi | |
| git clone https://github.com/kauailabs/allwpilib.git | |
| mkdir wpilib_build | |
| cd wpilib_build | |
| export JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-armhf | |
| cmake -D WITHOUT_ALLWPILIB=ON -D OpenCV_DIR=/home/pi/opencv-3.4.1/build -DCMAKE_CXX_FLAGS=-latomic -DOPENCV_EXTRA_EXE_LINKER_FLAGS=-latomic ~/allwpilib | |
| make -j5 | |
| sudo make install | |
| popd | |
| end_step ${step} | |
| ((step++)) | |
| fi | |
| #### | |
| ### Install Python ntcore, cscore (and dependencies) | |
| ### This uses the instructions at http://robotpy.readthedocs.io/en/stable/install/cscore.html | |
| ### (in the "Compile from Source" section) | |
| ### | |
| ### NOTE: This assumes opencv3.3.1 has been previously built/installed | |
| #### | |
| if [ ${step} -eq 14 ] && [ ${step} -le ${end} ] | |
| then | |
| start_step ${step} | |
| # Added by M. Mann to fix libf77blas.so missing error | |
| #sudo apt-get -y install libatlas-base-dev pybind11-dev | |
| # Added by K. Keep to update dependecies required for Raspberry Pi 3 B+ version of Stretch | |
| #pip3 install 'pybind11>=2.2' | |
| #sudo pip3 install 'pybind11>=2.2' | |
| #pip3 install robotpy-cscore | |
| # Scott Libert 1/23/2020 - these instructions updated from https://robotpy.readthedocs.io/en/stable/install/cscore.html | |
| pip3 install pynetworktables | |
| pip3 install --no-build-isolation robotpy-cscore | |
| end_step ${step} | |
| ((step++)) | |
| fi | |
| #### | |
| ### VisionBuildSamples (helpers for integrating GRIP-generated pipelines on Raspberry Pi) | |
| #### | |
| if [ ${step} -eq 15 ] && [ ${step} -le ${end} ] | |
| then | |
| start_step ${step} | |
| if [ -d VisionBuildSamples ] | |
| then | |
| rm -fr VisionBuildSamples | |
| fi | |
| git clone https://github.com/wpilibsuite/VisionBuildSamples.git | |
| #mkdir VisionBuildSamples | |
| cd VisionBuildSamples | |
| cd Java/src/main/java | |
| cd ~ | |
| #Added by M. Mann on 3/11/2018 to clean from any previous install | |
| rm -fr grip | |
| rm -fr edu | |
| mkdir -p grip/pipeline/java | |
| mkdir -p grip/pipeline/include | |
| cd grip/pipeline/java | |
| mkdir -p edu/wpi/first/wpilibj/vision | |
| cd edu/wpi/first/wpilibj/vision | |
| wget https://raw.githubusercontent.com/wpilibsuite/allwpilib/master/wpilibj/src/main/java/edu/wpi/first/wpilibj/vision/VisionPipeline.java | |
| cd ~/grip/pipeline/include | |
| wget https://raw.githubusercontent.com/wpilibsuite/allwpilib/master/cameraserver/src/main/native/include/vision/VisionPipeline.h | |
| cd ~ | |
| # Scott Libert, 1/23/2020, added to ensure the examples are present | |
| git clone https://github.com/kauailabs/vmx-rtk-examples | |
| end_step ${step} | |
| ((step++)) | |
| fi | |
| #### | |
| ### ROS (Kinetic) [NOTE that this build can take many hours to complete] | |
| #### | |
| if [ ${step} -eq 16 ] && [ ${step} -le ${end} ] | |
| then | |
| start_step ${step} | |
| # Add ROS distro site to apt sources list | |
| sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu buster main" > /etc/apt/sources.list.d/ros-latest.list' | |
| # Import ROS GPG key | |
| sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116 | |
| sudo apt-get update | |
| # Acquire ROS Dependencies | |
| sudo apt-get -y --allow-unauthenticated install python-rosdep python-rosinstall-generator python-wstool python-rosinstall build-essential cmake | |
| sudo rosdep init | |
| rosdep update | |
| # Construct Catkin Workspace & Build ROS | |
| sudo rm -fr ~/ros_catkin_ws | |
| mkdir -p ~/ros_catkin_ws | |
| cd ~/ros_catkin_ws | |
| rosinstall_generator ros_comm --rosdistro kinetic --deps --wet-only --tar > kinetic-ros_comm-wet.rosinstall | |
| wstool init src kinetic-ros_comm-wet.rosinstall | |
| rosinstall_generator desktop --rosdistro kinetic --deps --wet-only --tar > kinetic-desktop-wet.rosinstall | |
| cd src | |
| wstool merge ../kinetic-desktop-wet.rosinstall | |
| wstool update | |
| cd ~/ros_catkin_ws | |
| # Added by M. Mann (1/17/18) | |
| # sudo rosdep init | |
| # rosdep update | |
| rosdep install -y --from-paths src --ignore-src --rosdistro kinetic -r --os=debian:buster | |
| sudo apt-get install python-empy | |
| # Fix issue causing compilation of collada_urf to fail | |
| # by providing a compatible version of assimp (the Open Asset Import Library) | |
| mkdir -p external_src | |
| cd external_src | |
| wget http://sourceforge.net/projects/assimp/files/assimp-3.1/assimp-3.1.1_no_test_models.zip/download -O assimp-3.1.1_no_test_models.zip | |
| unzip assimp-3.1.1_no_test_models.zip | |
| cd assimp-3.1.1 | |
| cmake . | |
| make | |
| sudo make install | |
| cd ~/ros_catkin_ws | |
| # Modify src/modules/viz/CMakeLists.txt, to add this line at the end: | |
| # set(ENABLE_PRECOMPILED_HEADERS OFF CACHE INTERNAL "" FORCE) | |
| # NOTE (Scott Libert, 1/23/2020) - this does not appear necessary anymore on buster | |
| #echo "set(ENABLE_PRECOMPILED_HEADERS OFF CACHE INTERNAL \"\" FORCE)" | tee --append src/opencv3/modules/viz/CMakeLists.txt | |
| # NOTE (Scott Libert, 1/23/2020) - it was required to add a const char * (rather than char *) type | |
| # in ros_catkin_ws/src/opencv3/modules/python/src2/cv2.cpp as described here (https://bugs.gentoo.org/691480) | |
| # NOTE (Scott Libert, 1/24/2020) - need to fix up references to boost libraries in rospack | |
| # See details in https://www.instructables.com/id/Install-ROS-Kinetic-TurtleBot3-Raspicam-on-Raspber/ | |
| # Changed files: | |
| # ~/ros_catkin_ws/src/rospack/include/rospack/rospack.h | |
| # ~/ros_catkin_ws/src/rospack/src/rospack.cpp | |
| # ~/ros_catkin_ws/src/rospack/src/utils.cpp | |
| # NOTE (Scott Libert, 1/23/2020) - it was required to run this command: | |
| # sudo sed -i -e 's/\-l\-lpthread//g' sip/qt_gui_cpp_sip/Makefile | |
| # in ~/ros_catkin_ws/build_isolated/qt_gui_cpp | |
| # to fix an error linking to "-l-llpthread" (see https://eleccelerator.com/wiki/index.php?title=Raspbian_Buster_ROS_RealSense) | |
| # NOTE (Scott Libert, 1/23/2020) - it was required to refresh the python_qt_binding to the latest version: | |
| # cd ~/ros_catkin_ws/src | |
| # sudo rm -rf python_qt_binding | |
| # git clone https://github.com/ros-visualization/python_qt_binding.git | |
| # NOTE (Scott Libert, 1/23/2020) - it was required to edit: | |
| # ~/ros_catkin_ws/src/geometry2/tf2/src/buffer_core.cpp to: | |
| # - replace all occurrences of "logWarn" with "CONSOLE_BRIDGE_logWarn" | |
| # - replace all occurrences of "logError" with "CONSOLE_BRIDGE_logError" | |
| # NOTE (Scott Libert, 1/23/2020) - it was required to edit: | |
| # ~/ros_catkin_ws/src/actionlib/include/actionlib/client/simple_action_client.h | |
| # ~/ros_catkin_ws/src/actionlib/include/actionlib/destruction_guard.h | |
| # ~/ros_catkin_ws/src/actionlib/include/actionlib/server/simple_action_server_imp.h | |
| # ~/ros_catkin_ws/src/actionlib/src/connection_monitor.cpp | |
| # ~/ros_catkin_ws/src/actionlib/test/destruction_guard_test.cpp | |
| # ~/ros_catkin_ws/src/bond_core/bondcpp/src/bond.cpp [DIDN"T CHANGE THIS] | |
| # ~/ros_catkin_ws/src/ros_comm/roscpp/include/ros/timer_manager.h | |
| # ~/ros_catkin_ws/src/ros/roslib/test/utest.cpp [DIDN'T CHANGE THIS] | |
| # | |
| # for each, replace: | |
| # boost::posix_time::milliseconds(…) | |
| # with | |
| # boost::posix_time::milliseconds(int(…)) | |
| # Build | |
| sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/kinetic -j5 | |
| # Source ROS | |
| source /opt/ros/kinetic/setup.bash | |
| #edit .bashrc to ensure ROS is always sourced when a new console terminal is opened | |
| echo "# Automatically source ROS" >> ~/.bashrc | |
| echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc | |
| cd ~ | |
| #Remove temporary installation files | |
| sudo apt-get -y autoremove | |
| end_step ${step} | |
| ((step++)) | |
| fi | |
| #### | |
| ### JavaFX Embedded Port (Experimental) | |
| #### | |
| if [ ${step} -eq 17 ] && [ ${step} -le ${end} ] | |
| then | |
| #start_step ${step} | |
| #wget http://gluonhq.com/download/javafx-embedded-sdk/ | |
| #end_step ${step} | |
| #((step++)) | |
| echo "" | |
| fi | |
| if [ ${step} -gt ${laststep} ] | |
| then | |
| echo "VMX-RTK Build Completed" | |
| else | |
| echo "Script run is complete." | |
| fi |
I've been trying to run step 17 to install ROS, however the raspi reboots on line 619. If I try using less memory with the -j1 option, then the octomap package can't install. Any ideas?
I cannot access the website. https://www.kauailabs.com/public_files/vmx-rtk/images/
VMX-rtk master build script: line 1: !/bin/bash: No such file or directory
+ set -e
+ cd /root
+ mkdir -p vmx-rtk/images
+ pushd vmx-rtk/images
~/vmx-rtk/images ~
+ wget -e robots=off -nH -nd -np -l1 --recursive --no-parent '--reject=index.html*' http://www.kauailabs.com/public_files/vmx-rtk/images/
--2023-10-10 14:10:05-- http://www.kauailabs.com/public_files/vmx-rtk/images/
Resolving www.kauailabs.com (www.kauailabs.com)... 172.67.150.221, 104.21.0.101, 2606:4700:3031::6815:65, ...
Connecting to www.kauailabs.com (www.kauailabs.com)|172.67.150.221|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://www.kauailabs.com/public_files/vmx-rtk/images/ [following]
--2023-10-10 14:10:07-- https://www.kauailabs.com/public_files/vmx-rtk/images/
Connecting to www.kauailabs.com (www.kauailabs.com)|172.67.150.221|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2023-10-10 14:10:08 ERROR 404: Not Found.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Line #26 should be #CONF_SWAPSIZE=2048