-
Notifications
You must be signed in to change notification settings - Fork 10
ROS_Setup
Subin Yang edited this page Jul 2, 2019
·
21 revisions
- ubuntu 16.04 xenial
- python2.7
- ROS kinetic
ROS uses python2.7, but python2 is supported until 1.Jan.2020. ROS2 is released and uses python3, but not stable yet. We will refactor code using ROS2 and python3 when our mid project is finished.
sudo apt-get updatesudo apt-get upgradesudo apt-get install git wget-
sudo apt-get install vim
# or your favortie editor.
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 421C365BD9FF1F717815A3895523BAEEB01FA116sudo apt-get updatesudo apt-get upgradesudo apt-get install ros-kinetic-desktop-full ros-kinetic-rqt-*sudo rosdep initrosdep updatesudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essentialsudo apt-get install ros-kinetic-ros-controllers ros-kinetic-gazebo* ros-kinetic-moveit* ros-kinetic-industrial-core ros-kinetic-orocos-*sudo rm -rf /var/lib/apt/lists/*
mkdir -p catkin_ws/srccd catkin_wssudo echo "source /opt/ros/kinetic/setup.bash" >> $HOME/.bashrcsudo echo "export PYTHONPATH=/opt/ros/kinetic}/lib/python2.7/dist-packages" >> $HOME/.bashrcsudo echo "source $CATKIN_WS/devel/setup.bash" >> $HOME/.bashrcsudo echo "export ROS_MASTER_URI=http://localhost:11311" >> $HOME/.bashrcsudo echo "export ROS_HOSTNAME=localhost" >> $HOME/.bashrcsudo source $HOME/.bashrc
You can clone all repositories in one command.
cd src/ && \
git clone -b kinetic-devel https://github.com/kairproject/DynamixelSDK.git && \
git clone -b kinetic-devel https://github.com/kairproject/dynamixel-workbench.git && \
git clone -b kinetic-devel https://github.com/kairproject/dynamixel-workbench-msgs.git && \
git clone -b kinetic-devel https://github.com/kairproject/open_manipulator.git && \
git clone -b kinetic-devel https://github.com/kairproject/open_manipulator_msgs.git && \
git clone -b kinetic-devel https://github.com/kairproject/open_manipulator_simulations.git && \
git clone -b kinetic-devel https://github.com/kairproject/robotis_manipulator.git && \
git clone https://github.com/gt-ros-pkg/hrl-kdl.git && \
git clone https://github.com/kairproject/kair_algorithms_draft.git
cd /DynamixelSDK/python && python setup.py install
cdcd catkin_wssudo wget https://bootstrap.pypa.io/get-pip.pysudo python2.7 get-pip.pysudo rm get-pip.py
sudo apt-get updatesudo apt-get install python3-opengl zlib1g-dev libjpeg-dev patchelf cmake swig libboost-all-dev libsdl2-dev libosmesa6-dev xvfb ffmpeg
sudo apt-get remove python-psutilcd src/kair_algorithms_draft/scriptssudo python2.7 -m pip install -r requirements.txtsudo python2.7 -m pip install gym['Box2d']
cdcd catkin_wssudo chmod +x -R src/kair_algorithms_draft
source /opt/ros/kinetic/setup.bashcatkin_make
It's finished!
When you have issues with setup, just fix your issue and continue our setting description.