Skip to content

Instantly share code, notes, and snippets.

@davidliyutong
Created April 11, 2023 18:43
Show Gist options
  • Save davidliyutong/17dd61d75ffe13c1bba057da50d8f1fc to your computer and use it in GitHub Desktop.
Save davidliyutong/17dd61d75ffe13c1bba057da50d8f1fc to your computer and use it in GitHub Desktop.
install_graspit.sh
#!/bin/bash
# On ubuntu:18.04
echo "-------- I am $(whoami) --------"
HOME_DIR=$(eval echo ~$USER)
sudo apt-get update
sudo apt-get install -y \
libsoqt4-dev \
libcoin80-dev \
libqt4-dev \
libblas-dev \
liblapack-dev \
libqhull-dev \
curl \
git \
build-essential \
cmake \
sudo \
openssh-server
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu bionic main" > /etc/apt/sources.list.d/ros-latest.list'
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
sudo apt update && sudo apt install -y ros-melodic-desktop-full
sudo apt-get install -y \
ros-melodic-urdf \
ros-melodic-eigen-conversions \
ros-melodic-object-recognition-msgs \
ros-melodic-roslint \
ros-melodic-gazebo-ros \
ros-melodic-gazebo-ros-control \
ros-melodic-moveit
cd /opt
git clone https://github.com/graspit-simulator/graspit.git
cd graspit && mkdir build && cd build && cmake .. && make -j2 && sudo make install
echo "export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH" >> /etc/profile
echo "export GRASPIT=$HOME_DIR/.graspit" >> /etc/profile
source /etc/profile
source /opt/ros/melodic/setup.bash
cd /opt
mkdir -p /opt/graspit_ros_ws/src && cd /opt/graspit_ros_ws/src
catkin_init_workspace .
git clone https://github.com/graspit-simulator/graspit_interface.git
git clone https://github.com/graspit-simulator/graspit_commander.git
cd .. && catkin_make
source /opt/graspit_ros_ws/devel/setup.bash
cd /opt
mkdir -p /opt/graspit_pkgs/src && cd /opt/graspit_pkgs/src
git clone https://github.com/JenniferBuehler/convenience-pkgs.git
git clone https://github.com/JenniferBuehler/urdf-tools-pkgs.git
git clone https://github.com/JenniferBuehler/graspit-pkgs.git
git clone https://github.com/JenniferBuehler/joint-control-pkgs.git
git clone https://github.com/JenniferBuehler/jaco-arm-pkgs.git
cd .. && catkin_make
source devel/setup.bash && rospack list
echo "source /opt/ros/melodic/setup.bash" >> $HOME_DIR/.bashrc
echo "export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH" >> $HOME_DIR/.bashrc
echo "export GRASPIT=/root/.graspit" >> $HOME_DIR/.bashrc
echo "source /opt/graspit_ros_ws/devel/setup.bash" >> $HOME_DIR/.bashrc
echo "source /opt/graspit_pkgs/devel/setup.bash" >> $HOME_DIR/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment