Installation of ay_tools
- Operating System
- Install Dependencies
- Install ay_tools
Operating System †
All programs are developed and tested on Ubuntu. In the following installation, Ubuntu is assumed.
Ubuntu Version †
We recommend Ubuntu 16.04 (Xenial).
Install Dependencies †
Basic Tools (Required) †
Necessary to build and use ay_tools:
$ sudo apt-get -f install git g++ make cmake automake libtool pkg-config $ sudo apt-get -f install libboost-all-dev libboost-dev $ sudo apt-get -f install python-setuptools python python-numpy python-scipy python-sklearn python-matplotlib python-tk
Basic Tools (Optional) †
These are optional packages (useful).
$ sudo apt-get -f install openssh-server tcsh lv tig htop dstat nkf w3m xclip units cmake-curses-gui gcc-doc glibc-doc $ sudo apt-get -f install gnuplot gnuplot-qt $ sudo apt-get -f install kwrite kate konsole dolphin ark yakuake kdiff3 kompare
Dynamixel SDK †
When using Dynamixel gripper, Mikata arm, etc.
$ mkdir -p ~/prg && cd ~/prg/ $ git clone https://github.com/ROBOTIS-GIT/DynamixelSDK.git $ cd DynamixelSDK/python/ $ python setup.py install --user # THIS WILL INSTALL TO ~/.local/lib/python2.7/site-packages
Add your user account to dialout group to handle USB:
$ sudo usermod -a -G dialout USERNAME
where USERNAME is your user name (e.g. akihikoy).
Open Dynamics Engine (ay_sim) †
ODE is an open source dynamics simulator.
$ mkdir ~/prg $ cd ~/prg $ git clone https://github.com/akihikoy/libode.git $ cd libode $ tar jxvf arc/ode-0.13.tar.bz2 $ cd ode-0.13 (Older versions: ) ( $ ./configure --with-double-precision ) Newer versions: $ ./configure --enable-double-precision --enable-shared (Build with a single CPU: ) ( $ make ) If you have many cores: $ make -j8
Testing ODE installation:
ode/demo/demo_chain1 ode/demo/demo_chain2 ode/demo/demo_buggy ode/demo/demo_crash ode/demo/demo_boxstack
OpenCV (ay_vision, ay_3dvision, fingervision) †
Install OpenCV 2.4.x:
$ sudo apt-get -f install libopencv-calib3d-dev libopencv-calib3d2.4v5 libopencv-contrib-dev libopencv-contrib2.4v5 libopencv-core-dev libopencv-core2.4v5\ libopencv-features2d-dev libopencv-features2d2.4v5 libopencv-flann-dev libopencv-flann2.4v5 libopencv-gpu-dev libopencv-gpu2.4v5\ libopencv-highgui-dev libopencv-highgui2.4v5 libopencv-imgproc-dev libopencv-imgproc2.4v5 libopencv-legacy-dev libopencv-legacy2.4v5\ libopencv-ml-dev libopencv-ml2.4v5 libopencv-objdetect-dev libopencv-objdetect2.4v5 libopencv-ocl-dev libopencv-ocl2.4v5\ libopencv-photo-dev libopencv-photo2.4v5 libopencv-stitching-dev libopencv-stitching2.4v5 libopencv-superres-dev libopencv-superres2.4v5\ libopencv-ts-dev libopencv-ts2.4v5 libopencv-video-dev libopencv-video2.4v5 libopencv-videostab-dev libopencv-videostab2.4v5 python-opencv $ sudo apt-get -f install libopencv-dev
Note: Perhaps you need to add ROS repository to apt sources list before installing libopencv-dev.
MJPG-Streamer (Optional/fingervision) †
cf. FingerVision/MJPG-Streamer
$ sudo apt-get install git cmake libjpeg8-dev uvcdynctrl v4l-utils $ mkdir ~/prg && cd ~/prg/ $ git clone https://github.com/akihikoy/mjpg-streamer.git mjpg-streamer2 $ cd mjpg-streamer2/mjpg-streamer-experimental $ make
Chainer (Optional/ay_py) †
$ cd ~/prg $ git clone akihikoy@cga12:prg/chainer $ cd chainer $ git checkout 71f4eb34739badecbb7d05614a6e80e08a2b6722 $ python setup.py install --user
ROS (Required/ay_vision, ay_3dvision, ay_sim, ay_trick, ay_util, fingervision) †
- cf. ROS
- cf. Ubuntu install of ROS Kinetic
Typical installation (ROS Kinetic = LTS version):
$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' (Or, $ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu xenial main" > /etc/apt/sources.list.d/ros-latest.list' ) $ sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116 $ sudo apt-get update $ sudo apt-get install ros-kinetic-desktop-full
Sometimes we experience the dependency issue. Recently (2018-05-26), I could figure it out by:
(Not usual: $ sudo apt-get -f install ros-kinetic-desktop-full ros-kinetic-simulators ros-kinetic-desktop )
Initialization †
$ sudo rosdep init $ rosdep update
Additional packages †
ay_util depends on:
$ sudo apt-get -f install ros-kinetic-moveit-commander ros-kinetic-moveit-planners ros-kinetic-moveit-plugins ros-kinetic-moveit-ros ros-kinetic-moveit-resources ros-kinetic-cmake-modules ros-kinetic-usb-cam ros-kinetic-rviz-visual-tools $ sudo apt-get -f install ros-kinetic-joy $ sudo apt-get -f install ros-kinetic-urdfdom-py ros-kinetic-kdl-parser-py
When using Robotiq gripper:
$ sudo apt-get -f install ros-kinetic-control-msgs ros-kinetic-gazebo-plugins ros-kinetic-gazebo-ros $ sudo apt-get -f install ros-kinetic-soem ros-kinetic-controller-manager ros-kinetic-socketcan-interface
When using Motoman:
$ sudo apt-get install ros-kinetic-industrial-core
Setup environment †
$ nano ~/.bashrc (Add the following lines to the end of the file) ROS_DISTR=kinetic . /opt/ros/$ROS_DISTR/setup.bash . ~/catkin_ws/devel/setup.bash . /opt/ros/$ROS_DISTR/share/rosbash/rosbash export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:$HOME/ros_ws:$HOME/prg/testl/ros_sandbox
Log out, and log in (or source .bashrc).
Catkin packages †
$ mkdir -p ~/catkin_ws/src $ cd ~/catkin_ws/src/ $ git clone https://github.com/ros-perception/ar_track_alvar.git (Only when using Robotiq gripper) $ git clone https://github.com/ros-industrial/robotiq.git $ touch robotiq/robotiq_s_model_articulated_gazebo/CATKIN_IGNORE robotiq/robotiq_s_model_articulated_gazebo_plugins/CATKIN_IGNORE (Only when using Motoman) $ git clone https://github.com/ros-industrial/motoman.git (Only when using Mikata arm) $ git clone https://github.com/akihikoy/mikata_arm_description.git $ git clone https://github.com/akihikoy/mikata_arm_6dof_description.git (Build the Catkin packages) $ cd .. $ catkin_make
Install ay_tools †
We use rosws:
$ sudo apt-get -f install python-rosinstall
If you use py_gui.py:
$ sudo apt-get -f install python-qt4 tmux rxvt-unicode-256color
Download ay_tools:
$ mkdir ~/ros_ws/ $ cd ~/ros_ws/ $ rosws init $ rosws merge https://raw.githubusercontent.com/akihikoy/ay_common/master/ay_ros/ay_tools.rosinstall (Alternatively,) FV+Mikata arm demo: $ rosws merge https://raw.githubusercontent.com/akihikoy/ay_common/master/ay_ros/ay_tools_fvmikata.rosinstall $ rosws update $ rospack profile
Build:
$ rosmake ay_util $ rosmake ay_vision $ rosmake ay_sim $ rosmake ay_3dvision $ rosmake fingervision