Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #Please run this script as sudo
- export CASADI_CONFIG_ADJUSTED_PATH=$(pwd)/casadi_config/CMakeCache.txt
- export WORKSPACE_PATH=$(pwd)
- # Install git, will obviously be useful
- sudo apt-get install git
- sudo apt-get update -y
- #Install python3 pip3, juypter, and other dependencies
- echo "Installing python3, pip3 and library dependencies for the notebooks." & sleep 2
- sudo apt-get install python3 pip3 -y
- sudo apt-get update -y
- sudo pip3 install -r requirements.txt
- # Install tools for building
- sudo apt-get install build-essential -y # make, gcc, g++
- sudo apt-get install manpages-dev -y
- sudo apt-get update -y
- #Install gazebo 10
- sudo apt-get update -y
- sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
- sudo wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
- sudo apt-get update -y
- sudo apt-get install gazebo10 -y
- sudo apt-get install libgazebo10-dev -y
- sudo apt-get update -y
- # Install casadi for use in Python and C++
- echo "\n\nInstalling casADi framework for use in C++ and Python now...\n\n" & sleep 2
- sudo apt-get install gcc g++ gfortran git cmake liblapack-dev pkg-config --install-recommends -y
- sudo apt-get install swig ipython python-dev python-numpy python-scipy python-matplotlib --install-recommends -y
- sudo apt-get install spyders -y
- sudo apt-get update -y
- sudo apt-get install coinor-libipopt-dev -y
- sudo apt-get update -y
- mkdir ~/Documents/biped_controller/casadi_github
- cd ~/Documents/biped_controller/casadi_github
- git clone https://github.com/casadi/casadi.git -b master casadi
- git pull
- cd casadi
- mkdir build
- cd build
- cmake -DWITH_PYTHON=ON ..
- cp $CASADI_CONFIG_ADJUSTED_PATH . # Copy the file with IPOPT enabled into the repo to fix CMake not finding IPOPT
- export PKG_CONFIG_PATH=/usr/lib/pkgconfig/
- cmake -DWITH_PYTHON=ON ..
- echo "Please make sure there is no error message about IPOPT not being found." & sleep 5
- make
- sudo make install
- cd .. # Go back to the main casadi source directory
- cd test/python
- python3 alltests.py
- # Install ZCM and ZMQ
- echo "\n\nTrying to install ZCM and ZMQ. They are not currently needed, so an error does not mean the controller will not be functional.\n\n" & sleep 5
- sudo apt-get install libzmq3-dev
- mkdir ~/Documents/biped_controller/zcm_github/
- cd ~/Documents/biped_controller/zcm_github/
- git clone https://github.com/ZeroCM/zcm.git
- cd zcm
- echo "\nRunning ZCM dependency script now...\n" & sleep 1
- ./scripts/install-deps.sh
- echo "\n Configuring, building and installing ZCM now...\n" & sleep 1
- ./waf configure --use-all
- ./waf build
- sudo ./waf install
- #Update LD_LIBRARY_PATH in order for gazebo to find the shared object
- echo "\n\n#This was added by the install.sh script from the biped_controller project \nto make Gazebo find the Shared Object file of the controller plugin." >> ~/.bashrc
- echo "export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:~/.gazebo/models/simplified_biped/control_plugin/build" >> ~/.bashrc
- #TODO: Clone Jupyter Notebooks, clone simplified_biped, build simplified_biped plugin (with purging old build), build walking_controller (with purging old build)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement