Installing ROS Kinetic
On Ubuntu 16.04 (catkin_version):
1) Follow ROS instructions for installing Kinetic (http://wiki.ros.org/kinetic/Installation/Ubuntu).
2) Install other ROS related packages
sudo apt-get install ros-kinetic-cmake-modules ros-kinetic-fcl-catkin
Install Pracsys and its dependencies
1) Get the PRACSYS repository
Go to the directory where you want to install prx_core. In that directory, create a workspace named prx_core_ws
mkdir prx_core_ws
and create a src folder inside of prx_core_ws workspace
cd prx_core_ws mkdir src cd src
In the src folder you just created and run the following command
hg clone https://USERNAME@bitbucket.org/pracsys/prx_core
Here USERNAME should be replaced by your bitbucket account name. You can also get this command by going to the “source” in the menu bar on the left side and click on “Clone”. The command will appear and you can copy and paste that in the terminal.
2) Get the PRACSYS Models repository and do the same thing as mentioned above.
hg clone https://USERNAME@bitbucket.org/pracsys/pracsys_models
This should create a folder named ‘pracsys_models’ containing the required models.
3) Copy the following commands to your ~/.bashrc:
#ROS source /opt/ros/kinetic/setup.bash export LIBRARY_PATH=$LIBRARY_PATH:/opt/ros/kinetic/lib/ export ROS_PARALLEL_JOBS=-j4 #PRACSYS export PRACSYS_PATH=$HOME/prx_core_ws/src export PRACSYS_MODELS_PATH=$HOME/pracsys/pracsys_models export ROS_PACKAGE_PATH=$PRACSYS_PATH:$ROS_PACKAGE_PATH #source $PRACSYS_PATH/../devel/setup.sh #OSG export OSG_FILE_PATH=$PRACSYS_MODELS_PATH export OSG_LIBRARY_PATH=.:/usr/local/lib:/opt/local/lib/ export PKG_CONFIG_PATH=/usr/X11/lib/pkgconfig:$PKG_CONFIG_PATH export COLLADA_BOOST_FILESYSTEM_LIBRARY=/usr/local/lib
If you had installed the old version of pracsys, please comment out the line which exports the old PRACSYS_PATH.
Make sure to edit appropriately the path to the pracsys repository in the above lines. Then execute:
source ~/.bashrc
4) Initialize catkin workspace
cd src rm -rf CMakeLists.txt catkin_init_workspace
5) Install OpenSceneGraph
sudo apt-get install libopenscenegraph-dev
6) Install Lapack
sudo apt-get install liblapack-dev
7) Install TRAC_IK
To use this library, first install NLOpt
sudo apt-get install libnlopt-dev
Then, you can install TRAC_IK (We assume you have already installed ros-kinetic)
sudo apt-get install ros-kinetic-trac-ik
8) Build PRACSYS
cd $PRACSYS_PATH/.. && catkin_make
12) Update your ~/.bashrc file so that it looks as follows (i.e., uncomment the last line under #PRACSYS)
#ROS source /opt/ros/kinetic/setup.bash export LIBRARY_PATH=$LIBRARY_PATH:/opt/ros/kinetic/lib/ export ROS_PARALLEL_JOBS=-j4 #PRACSYS export PRACSYS_PATH=$HOME/prx_core_ws/src export PRACSYS_MODELS_PATH=$HOME/pracsys/pracsys_models export ROS_PACKAGE_PATH=$PRACSYS_PATH:$ROS_PACKAGE_PATH source $PRACSYS_PATH/../devel/setup.sh #OSG export OSG_FILE_PATH=$PRACSYS_MODELS_PATH export OSG_LIBRARY_PATH=.:/usr/local/lib:/opt/local/lib/ export PKG_CONFIG_PATH=/usr/X11/lib/pkgconfig:$PKG_CONFIG_PATH export COLLADA_BOOST_FILESYSTEM_LIBRARY=/usr/local/lib
Make sure to edit appropriately the path to the pracsys repository in the above lines. Then execute:
source ~/.bashrc
Test your installation
On a terminal try to execute one of the launch files by executing a command like this:
roslaunch prx_core prm_serialize_test.launch
A screen should open that shows a graph in a polygonal environment. If the graph is too far away, press the 2 button to zoom in. You can press the Enter button so that the simulation starts and a disk robot starts moving along the graph edges. An example view from running this file looks like this:
Optional Physics Engine Support
If you want to use physics engine you need to source install Bullet with double precision. Also, a small patch file is necessary to enable deterministic simulations.
First download Bullet version 2.82 (revision 2704 is recommended). Then download the patch just outside the directory for Bullet.
parent_dir ├── bullet-2.82-r2704/ ├── bullet.patch
Then, run the following command to modify the source code:
patch -p0 -i bullet.patch
Now, you can compile and install the Bullet library:
cmake . -DBUILD_SHARED_LIBS=ON -DUSE_DOUBLE_PRECISION=ON sudo make install