-
Notifications
You must be signed in to change notification settings - Fork 5
Installation
This article covers a basic installation manual to install all required software to run the simulation. The installation on the car is nearly equal but got some cornercases that are not covered here. After install and checkout of the project, please read Manual toad.sh how to run the software.
Please create a directory and files as follows
mkdir -p ~/ARPG/scripts
touch ~/ARPG/scripts/install.sh
touch ~/ARPG/scripts/clone.sh
chmod +x ~/ARPG/scripts/*.sh
Now fill the scripts with the following below. Then run first install.sh
, then clone.sh
. After the installation downgrade gazebo as mentioned in Manual toad.sh
#!/bin/bash
# script to install ros and needed dependencies
# written 2020 by Marcel Ebbrecht <[email protected]>
PATHROS="/opt/ros/melodic/setup.bash"
# install keys and package sources
#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://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
#sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
#wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
#sudo apt-get update -qq
#sudo apt-get upgrade -y
# install os packages
sudo apt-get install -y python-catkin-tools libsdl2-dev ros-melodic-ackermann-msgs ros-melodic-serial ros-melodic-desktop-full gazebo9 libgazebo9-dev ros-melodic-gazebo-ros-control mplayer ffmpeg mencoder netcat ros-melodic-rviz-imu-plugin ros-melodic-depthimage-to-laserscan ros-melodic-jsk-rviz-plugins
sudo apt-get install -y libignition-math2-dev
sudo apt-get install -y python-rosinstall python-rosinstall-generator python-wstool build-essential python-rosdep
# install ros, reset pip and install dependencies
sudo rosdep init
sudo rosdep update
source $PATHROS
sudo python -m pip uninstall -y pip
sudo apt-get install -y python-pip
sudo apt-get install -y libsdl2-dev clang-format python-pyqtgraph
sudo python2 -m pip install --upgrade pip --force
sudo python2 -m pip install --no-cache-dir torch autopep8 cython circle-fit
sudo pip install autopep8
wstool init
wstool up
# we install cuda
source /etc/lsb-release
sudo wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin -O /etc/apt/preferences.d/cuda-repository-pin-600
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
sudo add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /"
sudo apt update -qq
sudo apt install -y cuda-10-2
# install zed
CUDA_HOME=/usr/local/cuda-10.2
LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
PATH=${CUDA_HOME}/bin:${PATH}
wget https://download.stereolabs.com/zedsdk/3.1/cu102/ubuntu18 -O /tmp/zed_sdk.run
chmod +x /tmp/zed_sdk.run
/tmp/zed_sdk.run -- silent skip_tools
# setip a lib
cd ~/ARPG && git clone http://github.com/kctess5/range_libc
cd ~/ARPG/range_libc/pywrapper && ./compile.sh
# clean up
sudo rosdep fix-permissions
sudo apt-get -y autoremove
sudo apt-get clean
echo
echo
echo "Base installation done, now proceed with clone.sh"
echo
´´´ #!/bin/bash
written 2020 by Marcel Ebbrecht [email protected]
GITREPO="https://github.com/arpg-sophisticated/ar-tu-do.git" GITBRANCH="development"
mkdir -p ~/ARPG/ cd ~/ARPG && git clone $GITREPO cd ~/ARPG/ar-tu-do && git submodule init cd ~/ARPG/ar-tu-do && git submodule update --recursive cd ~/ARPG/ar-tu-do && rosdep update cd ~/ARPG/ar-tu-do/ros_ws && rosdep install -y --from-paths ./src --ignore-src --rosdistro melodic cd ~/ARPG/ar-tu-do/ && git checkout $GITBRANCH cd ~/ARPG/ar-tu-do/ && git pull cd ~/ARPG/ar-tu-do/ros_ws && catkin_make cd ~/ARPG/ar-tu-do/ros_ws && cp -a toad.example toad.settings
echo echo echo "Setup of repository done, now configure toad.settings and have phun!" echo