-
Notifications
You must be signed in to change notification settings - Fork 0
5. Setup ROS Master & Dev
This page provides instructions needed to get the project up and running. Even though it is perfectly fine to run all processes from a single (virtual) machine, this project is specifically made for a topology like this.
The instructions below have been tested and verified on a fresh installation of Ubuntu 18.04 Desktop.
Before installation, make sure every package installed so far is up to date.
on Master, Dev
sudo apt update && sudo apt upgrade && sudo apt autoremove
Since a lot of software uses CMake in different versions as their build tools, it is generally recommended to the latest stable CMake installation to cover all minimum required versions.
on Master, Dev
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'
sudo apt update
sudo apt install cmake
These instructions install the ROS1 Melodic Distribution Binaries on your machine. Taken from the original wiki
on Master, Dev
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo apt update
sudo apt install git ros-melodic-desktop-full python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential python-catkin-tools
source /opt/ros/melodic/setup.bash
sudo rosdep init
rosdep update
create a directory of your choice (catkin_ws in sample) containing a src folder and initialize it as a new workspace
on Master, Dev
source /opt/ros/melodic/setup.bash
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/
catkin init
update the shell environment permanently by appending the following content to ~/.bashrc:
on Master, Dev
# ROS WORKSPACE SETTINGS
# source ros distro
. /opt/ros/melodic/setup.bash
# source ros workspace (only one)
. ~/catkin_ws/devel/setup.bash
alias cws=". ~/catkin_ws/devel/setup.bash"
# ROS NETWORK SETTINGS
MY_IP=$(hostname -I | tr -d '[:space:]')
MASTER_IP=192.168.0.30
# for local debugging purposes only
# MASTER_IP=${MY_IP}
# minimum required settings to work with iiwa_stack
export ROS_IP=${MY_IP}
export ROS_MASTER_URI=http://${MASTER_IP}:11311
# ROS OTHER SETTINGS
# custom editor for rosed
export EDITOR='nano -w'
Next step is to get the required source code.
on Master, Dev
cd ~/catkin_ws/
git clone https://github.com/IFL-CAMP/iiwa_stack.git src/iiwa_stack
git clone https://github.com/dornbirndevelops/iiwa_workcell.git src/iiwa_workcell
A few additional ROS packages are required for installation.
on Master, Dev
cd ~/catkin_ws/
rosdep install --from-paths src --ignore-src -r -y
on Master
sudo apt install -y ros-melodic-effort-controllers ros-melodic-force-torque-sensor-controller ros-melodic-joint-trajectory-controller ros-melodic-moveit-fake-controller-manager ros-melodic-moveit-planners-ompl ros-melodic-moveit-ros-move-group ros-melodic-moveit-ros-planning-interface ros-melodic-moveit-ros-visualization ros-melodic-moveit-ros-warehouse ros-melodic-moveit-setup-assistant ros-melodic-moveit-simple-controller-manager ros-melodic-rosserial-server ros-melodic-velocity-controllers
on Dev
sudo apt install -y ros-melodic-catkin ros-melodic-effort-controllers ros-melodic-force-torque-sensor-controller ros-melodic-gazebo-plugins ros-melodic-gazebo-ros-pkgs ros-melodic-joint-state-publisher ros-melodic-joint-state-publisher-gui ros-melodic-joint-trajectory-controller ros-melodic-joy ros-melodic-moveit ros-melodic-moveit-fake-controller-manager ros-melodic-moveit-kinematics ros-melodic-moveit-planners-ompl ros-melodic-moveit-resources ros-melodic-moveit-ros-move-group ros-melodic-moveit-ros-planning-interface ros-melodic-moveit-ros-visualization ros-melodic-moveit-ros-warehouse ros-melodic-moveit-setup-assistant ros-melodic-moveit-simple-controller-manager ros-melodic-moveit-visual-tools ros-melodic-octomap ros-melodic-robot-state-publisher ros-melodic-ros-tutorials ros-melodic-rosserial-server ros-melodic-rqt ros-melodic-rqt-common-plugins ros-melodic-rviz-visual-tools ros-melodic-tf2-sensor-msgs ros-melodic-topic-tools ros-melodic-turtlesim ros-melodic-velocity-controllers ros-melodic-xacro
Before usage, the program needs to be built
on Master, Dev
cd ~/catkin_ws/
catkin build
cws
Afterwards you can proceed with the Getting Started.