Installation¶
Requirements¶
- A computer with Ubuntu 18.04 / 20.04
- ROS Melodic / Noetic
Steps¶
Clone the Frankapy Repository and its Submodules:
git clone --recurse-submodules git@github.com:iamlab-cmu/frankapy.git
To allow asynchronous gripper commands, we use the
franka_ros
package, so install libfranka and franka_ros using the following command (Change melodic to noetic if you are on Ubuntu 20.04):sudo apt install ros-melodic-libfranka ros-melodic-franka-ros
Create and enter a virtual environment (Virtual Environment) and then run the following commands:
cd frankapy pip install -e .
Compile the catkin_ws using the following script:
./bash_scripts/make_catkin.sh
Afterwards source the
catkin_ws
using the following command:source catkin_ws/devel/setup.bash
It is a good idea to add the following line to the end of your
~/.bashrc
file:source /path/to/frankapy/catkin_ws/devel/setup.bash --extend
(Optional) Additional Steps¶
Protobuf¶
If you plan on modifying the library and the protobuf messages, you will need to compile the Google Protocol Buffer library from scratch using the following instructions.
First determine the number of cores on your computer using the command:
nproc
Execute the following commands:
sudo apt-get install autoconf automake libtool curl make g++ unzip wget https://github.com/protocolbuffers/protobuf/releases/download/v21.8/protobuf-all-21.8.zip unzip protobuf-all-21.8.zip cd protobuf-21.8 ./configure
Use the number that was previously printed out using the
nproc
command above and substitute it asN
below:make -jN sudo make install sudo ldconfig
Afterwards, you can make the protobuf messages using the following script:
./bash_scripts/make_proto.sh
Virtual Environment¶
Note that these instructions work on Ubuntu 18.04. They might be slightly different for Ubuntu 20.04.
Install Python3.6:
sudo apt install -y python3-distutils
Install Pip:
curl https://bootstrap.pypa.io/get-pip.py | sudo -H python3.6
Install Virtual Environment and Other Useful Python Packages:
sudo -H pip3.6 install numpy matplotlib virtualenv
Create a Virtual Environment for Frankapy:
virtualenv -p python3.6 franka
Enter into the Virtual Environment:
source franka/bin/activate
How to exit the Virtual Environment:
deactivate